| 924 | } |
| 925 | |
| 926 | void |
| 927 | PanoramicDialog::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 | |
| 956 | void |
| 957 | PanoramicDialog::onNewZoomLevel(float) |
no test coverage detected