| 323 | } |
| 324 | |
| 325 | void |
| 326 | TLESourceTab::onRemoveTLESource(void) |
| 327 | { |
| 328 | if (this->ui->tleSourceTable->currentRow() >= 0) { |
| 329 | auto sus = Suscan::Singleton::get_instance(); |
| 330 | |
| 331 | QString text = this->ui->tleSourceTable->itemAt( |
| 332 | 0, |
| 333 | this->ui->tleSourceTable->currentRow())->text(); |
| 334 | if (sus->removeTLESource(text.toStdString())) { |
| 335 | this->ui->tleSourceTable->removeRow( |
| 336 | this->ui->tleSourceTable->currentRow()); |
| 337 | this->refreshUi(); |
| 338 | } else { |
| 339 | QMessageBox::warning( |
| 340 | this, |
| 341 | "Source " + text + " is a default source and cannot be removed.", |
| 342 | "Remove TLE source"); |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | void |
| 348 | TLESourceTab::onDownloadStart(void) |
nothing calls this directly
no test coverage detected