MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / on_abort

Method on_abort

DSView/pv/dialogs/calibration.cpp:304–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304void Calibration::on_abort()
305{
306 this->hide();
307 QFuture<void> future;
308
309 future = QtConcurrent::run([&]{
310 _device_agent->set_config_bool(SR_CONF_ZERO_LOAD, true);
311 reload_value();
312 });
313
314 Qt::WindowFlags flags = Qt::CustomizeWindowHint;
315 QProgressDialog dlg(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_RELOAD_CALIBRATION_RESULTS),
316 "Reload last calibration results... It can take a while."),
317 L_S(STR_PAGE_DLG, S_ID(IDS_DLG_CANCEL), "Cancel"),0,0,this,flags);
318 dlg.setWindowModality(Qt::WindowModal);
319 dlg.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
320 Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
321 dlg.setCancelButton(NULL);
322
323 QFutureWatcher<void> watcher;
324 connect(&watcher,SIGNAL(finished()),&dlg,SLOT(cancel()));
325 watcher.setFuture(future);
326
327 dlg.exec();
328 this->show();
329}
330
331void Calibration::reload_value()
332{

Callers

nothing calls this directly

Calls 4

hideMethod · 0.80
set_config_boolMethod · 0.80
execMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected