| 162 | } |
| 163 | |
| 164 | void |
| 165 | TLESourceTab::triggerDownloadTLEs(void) |
| 166 | { |
| 167 | auto sus = Suscan::Singleton::get_instance(); |
| 168 | |
| 169 | this->currSrc = sus->getFirstTLESource(); |
| 170 | this->endSrc = sus->getLastTLESource(); |
| 171 | |
| 172 | if (this->currSrc != this->endSrc) { |
| 173 | this->srcNum = 1; |
| 174 | this->srcFailed = 0; |
| 175 | this->srcCount = static_cast<unsigned>(sus->getTLESourceMap().count()); |
| 176 | this->pushDownloadTask(); |
| 177 | this->refreshDownloadStatus(); |
| 178 | this->ui->downloadProgress->setFormat("Starting update..."); |
| 179 | this->ui->downloadProgress->setValue(0); |
| 180 | this->ui->downloadProgress->setEnabled(true); |
| 181 | this->downloading = true; |
| 182 | } else { |
| 183 | this->ui->downloadStatusLabel->setText("Ready"); |
| 184 | this->ui->downloadProgress->setFormat("%p%"); |
| 185 | this->ui->downloadProgress->setValue(0); |
| 186 | this->ui->downloadProgress->setEnabled(false); |
| 187 | this->downloading = false; |
| 188 | } |
| 189 | |
| 190 | this->refreshUi(); |
| 191 | } |
| 192 | |
| 193 | void |
| 194 | TLESourceTab::downloadNext(void) |
no test coverage detected