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

Method on_row_check

DSView/pv/dialogs/protocollist.cpp:168–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void 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 {

Callers

nothing calls this directly

Calls 6

get_rows_lshowMethod · 0.80
set_rows_lshowMethod · 0.80
setDecoderStackMethod · 0.80
get_decoder_modelMethod · 0.80
decoderMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected