MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / onToggleScan

Method onToggleScan

Components/PanoramicDialog.cpp:926–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

924}
925
926void
927PanoramicDialog::onToggleScan(void)
928{
929 if (this->ui->scanButton->isChecked()) {
930 Suscan::Source::Device dev;
931 this->getSelectedDevice(dev);
932
933 if (this->bannedDevice.length() > 0
934 && dev.getDesc() == this->bannedDevice.toStdString()) {
935 (void) QMessageBox::critical(
936 this,
937 "Panoramic spectrum error error",
938 "Scan cannot start because the selected device is in use by the main window.",
939 QMessageBox::Ok);
940 this->ui->scanButton->setChecked(false);
941 } else {
942 emit start();
943 }
944 } else {
945 emit stop();
946 }
947
948 this->ui->waterfall->setRunningState(this->ui->scanButton->isChecked());
949 this->ui->scanButton->setText(
950 this->ui->scanButton->isChecked()
951 ? "Stop"
952 : "Start scan");
953
954}
955
956void
957PanoramicDialog::onNewZoomLevel(float)

Callers 1

runMethod · 0.95

Calls 3

getSelectedDeviceMethod · 0.95
lengthMethod · 0.80
getDescMethod · 0.80

Tested by

no test coverage detected