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

Method on_save

DSView/pv/dialogs/calibration.cpp:277–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277void 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
304void Calibration::on_abort()
305{

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