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

Method changeText

DSView/pv/dialogs/waitingdialog.cpp:173–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void WaitingDialog::changeText()
174{
175 index++;
176 if(index == WPOINTS_NUM + 1)
177 {
178 tips->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_WAITING), "Waiting"));
179 index = 0;
180 bool comb_comp_en = false;
181 bool zero_fgain = false;
182
183 if (_device_agent->get_config_bool(SR_CONF_PROBE_COMB_COMP_EN, comb_comp_en) && comb_comp_en) {
184
185 if (_device_agent->get_config_bool(SR_CONF_ZERO_COMB_FGAIN, zero_fgain) && zero_fgain) {
186
187 for(auto s : _session->get_signals()){
188 if (s->signal_type() == SR_CHANNEL_DSO){
189 view::DsoSignal *dsoSig = (view::DsoSignal*)s;
190 dsoSig->set_enable(dsoSig->get_index() == 0);
191 }
192 }
193
194 std::this_thread::sleep_for(std::chrono::milliseconds(100));
195 _device_agent->set_config_bool(SR_CONF_ZERO_COMB, true);
196 }
197 }
198
199 bool bzero = false;
200 if (_device_agent->get_config_bool(_key, bzero)) {
201 if (!bzero) {
202 movie->stop();
203 movie->jumpToFrame(0);
204 timer->stop();
205 tips->setAlignment(Qt::AlignHCenter);
206 tips->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_FINISHED), "Finished!"));
207 _button_box.addButton(QDialogButtonBox::Save);
208 }
209 }
210 }
211 else {
212 tips->setText(tips->text()+".");
213 }
214}
215
216} // namespace dialogs
217} // namespace pv

Callers

nothing calls this directly

Calls 6

get_config_boolMethod · 0.80
signal_typeMethod · 0.80
set_config_boolMethod · 0.80
set_enableMethod · 0.45
get_indexMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected