| 166 | } |
| 167 | |
| 168 | void ProtocolList::on_row_check(bool show) |
| 169 | { |
| 170 | QCheckBox *sc = dynamic_cast<QCheckBox*>(sender()); |
| 171 | QVariant id = sc->property("index"); |
| 172 | int index = id.toInt(); |
| 173 | |
| 174 | pv::data::DecoderStack *decoder_stack = NULL; |
| 175 | const auto &decode_sigs = _session->get_decode_signals(); |
| 176 | int cur_index = 0; |
| 177 | |
| 178 | for(auto d : decode_sigs) { |
| 179 | if (cur_index == _protocol_combobox->currentIndex()) { |
| 180 | decoder_stack = d->decoder(); |
| 181 | break; |
| 182 | } |
| 183 | cur_index++; |
| 184 | } |
| 185 | |
| 186 | if (!decoder_stack) |
| 187 | return; |
| 188 | |
| 189 | std::map<const pv::data::decode::Row, bool> rows = decoder_stack->get_rows_lshow(); |
| 190 | for (std::map<const pv::data::decode::Row, bool>::const_iterator i = rows.begin(); |
| 191 | i != rows.end(); i++) { |
| 192 | if (index-- == 0) { |
| 193 | decoder_stack->set_rows_lshow((*i).first, show); |
| 194 | break; |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | _session->get_decoder_model()->setDecoderStack(decoder_stack); |
| 199 | } |
| 200 | |
| 201 | void ProtocolList::on_set_map_zoom(int index) |
| 202 | { |
nothing calls this directly
no test coverage detected