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

Method reject

DSView/pv/dialogs/waitingdialog.cpp:128–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128void WaitingDialog::reject()
129{
130 using namespace Qt;
131
132 movie->stop();
133 timer->stop();
134 QDialog::reject();
135
136 QFuture<void> future;
137 future = QtConcurrent::run([&]{
138 _device_agent->set_config_bool(_key, false);
139 _device_agent->set_config_bool(SR_CONF_ZERO_LOAD, true);
140 });
141
142 Qt::WindowFlags flags = Qt::CustomizeWindowHint;
143 QProgressDialog dlg(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_LOAD_CURRENT_SETTING), "Load current setting... It can take a while."),
144 L_S(STR_PAGE_DLG, S_ID(IDS_DLG_CANCEL), "Cancel"),0,0,this,flags);
145 dlg.setWindowModality(Qt::WindowModal);
146 dlg.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint |
147 Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
148 dlg.setCancelButton(NULL);
149
150 QFutureWatcher<void> watcher;
151 connect(&watcher,SIGNAL(finished()),&dlg,SLOT(cancel()));
152 watcher.setFuture(future);
153
154 dlg.exec();
155}
156
157void WaitingDialog::stop()
158{

Callers

nothing calls this directly

Calls 3

set_config_boolMethod · 0.80
stopMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected