| 160 | } |
| 161 | |
| 162 | void 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 | |
| 198 | void LissajousOptions::reject() |
| 199 | { |
nothing calls this directly
no test coverage detected