| 275 | } |
| 276 | |
| 277 | void Calibration::on_save() |
| 278 | { |
| 279 | this->hide(); |
| 280 | QFuture<void> future; |
| 281 | |
| 282 | future = QtConcurrent::run([&]{ |
| 283 | _device_agent->set_config_bool( SR_CONF_ZERO_SET, true); |
| 284 | }); |
| 285 | |
| 286 | Qt::WindowFlags flags = Qt::CustomizeWindowHint; |
| 287 | QProgressDialog dlg(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SAVE_CALIBRATION_RESULTS), |
| 288 | "Save calibration results... It can take a while."), |
| 289 | L_S(STR_PAGE_DLG, S_ID(IDS_DLG_CANCEL), "Cancel"), |
| 290 | 0,0,this,flags); |
| 291 | dlg.setWindowModality(Qt::WindowModal); |
| 292 | dlg.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | |
| 293 | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint); |
| 294 | dlg.setCancelButton(NULL); |
| 295 | |
| 296 | QFutureWatcher<void> watcher; |
| 297 | connect(&watcher,SIGNAL(finished()),&dlg,SLOT(cancel())); |
| 298 | watcher.setFuture(future); |
| 299 | |
| 300 | dlg.exec(); |
| 301 | this->show(); |
| 302 | } |
| 303 | |
| 304 | void Calibration::on_abort() |
| 305 | { |
nothing calls this directly
no test coverage detected