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

Method accept

DSView/pv/dialogs/lissajousoptions.cpp:162–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void LissajousOptions::accept()
163{
164 using namespace Qt;
165 QDialog::accept();
166
167 int xindex = -1;
168 int yindex = -1;
169 for (QVector<QRadioButton *>::const_iterator i = _x_radio.begin();
170 i != _x_radio.end(); i++) {
171 if ((*i)->isChecked()) {
172 xindex = (*i)->property("index").toInt();
173 break;
174 }
175 }
176 for (QVector<QRadioButton *>::const_iterator i = _y_radio.begin();
177 i != _y_radio.end(); i++) {
178 if ((*i)->isChecked()) {
179 yindex = (*i)->property("index").toInt();
180 break;
181 }
182 }
183 bool enable = (xindex != -1 && yindex != -1 && _enable->isChecked());
184 _session->lissajous_rebuild(enable, xindex, yindex, _percent->value());
185
186 for(auto s : _session->get_signals()) {
187 if (s->signal_type() == SR_CHANNEL_DSO) {
188 view::DsoSignal *dsoSig = (view::DsoSignal*)s;
189 dsoSig->set_show(!enable);
190 }
191 }
192 auto mathTrace = _session->get_math_trace();
193 if (mathTrace && mathTrace->enabled()) {
194 mathTrace->set_show(!enable);
195 }
196}
197
198void LissajousOptions::reject()
199{

Callers

nothing calls this directly

Calls 7

lissajous_rebuildMethod · 0.80
signal_typeMethod · 0.80
get_math_traceMethod · 0.80
endMethod · 0.45
valueMethod · 0.45
set_showMethod · 0.45
enabledMethod · 0.45

Tested by

no test coverage detected