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

Method accept

DSView/pv/dialogs/dsomeasure.cpp:155–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void DsoMeasure::accept()
156{
157 using namespace Qt;
158
159 auto sc = dynamic_cast<QToolButton*>(sender());
160 if(sc != NULL) {
161 QVariant id = sc->property("id");
162 enum DSO_MEASURE_TYPE ms_type = DSO_MEASURE_TYPE(id.toInt());
163
164 for(auto s : _session->get_signals()) {
165 if (s->signal_type() == SR_CHANNEL_DSO) {
166 view::DsoSignal *dsoSig = (view::DsoSignal*)s;
167 if (_measure_tab->currentWidget()->property("index").toInt() == dsoSig->get_index()) {
168 _view.get_viewstatus()->set_measure(_position, false, dsoSig->get_index(), ms_type);
169 break;
170 }
171 }
172 }
173 }
174 QDialog::accept();
175}
176
177void DsoMeasure::reject()
178{

Callers

nothing calls this directly

Calls 5

signal_typeMethod · 0.80
get_viewstatusMethod · 0.80
DSO_MEASURE_TYPEEnum · 0.70
get_indexMethod · 0.45
set_measureMethod · 0.45

Tested by

no test coverage detected