| 153 | } |
| 154 | |
| 155 | void 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 | |
| 177 | void DsoMeasure::reject() |
| 178 | { |
nothing calls this directly
no test coverage detected