MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / accept

Method accept

DSView/pv/dialogs/waitingdialog.cpp:101–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void WaitingDialog::accept()
102{
103 using namespace Qt;
104 movie->stop();
105 timer->stop();
106 QDialog::accept();
107
108 QFuture<void> future;
109 future = QtConcurrent::run([&]{
110 _device_agent->set_config_bool(SR_CONF_ZERO_SET, true);
111 });
112
113 Qt::WindowFlags flags = Qt::CustomizeWindowHint;
114 QProgressDialog dlg(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SAVE_CALIBRATION_RESULTS), "Save calibration results... It can take a while."),
115 L_S(STR_PAGE_DLG, S_ID(IDS_DLG_CANCEL), "Cancel"),0,0,this,flags);
116 dlg.setWindowModality(Qt::WindowModal);
117 dlg.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
118 Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
119 dlg.setCancelButton(NULL);
120
121 QFutureWatcher<void> watcher;
122 connect(&watcher,SIGNAL(finished()),&dlg,SLOT(cancel()));
123 watcher.setFuture(future);
124
125 dlg.exec();
126}
127
128void WaitingDialog::reject()
129{

Callers

nothing calls this directly

Calls 3

set_config_boolMethod · 0.80
stopMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected