MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / update_view

Method update_view

DSView/pv/dock/dsotriggerdock.cpp:368–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368void DsoTriggerDock::update_view()
369{
370 bool bDisable = _session->get_device()->is_file();
371 bool ret;
372
373 if (_session->get_device()->is_demo()){
374 bDisable = true;
375 }
376
377 for(QAbstractButton * btn : _source_group->buttons()){
378 btn->setDisabled(bDisable);
379 }
380
381 for(QAbstractButton * btn : _type_group->buttons()){
382 btn->setDisabled(bDisable);
383 }
384
385 _holdoff_slider->setDisabled(bDisable);
386 _holdoff_spinBox->setDisabled(bDisable);
387 _holdoff_comboBox->setDisabled(bDisable);
388 _margin_slider->setDisabled(bDisable);
389 _channel_comboBox->setDisabled(bDisable);
390
391 _position_spinBox->setDisabled(bDisable);
392 _position_slider->setDisabled(bDisable);
393
394 if (_session->get_device()->is_demo()){
395 _position_spinBox->setDisabled(false);
396 _position_slider->setDisabled(false);
397 }
398
399 if (_session->get_device()->is_file()){
400 return;
401 }
402
403 int pos;
404 int src;
405 int slope;
406
407 // TRIGGERPOS
408 if (_session->get_device()->get_config_byte(
409 SR_CONF_HORIZ_TRIGGERPOS, pos)) {
410 _position_slider->setValue(pos);
411 }
412
413 if (_session->get_device()->get_config_byte(SR_CONF_TRIGGER_SOURCE, src)) {
414 _source_group->button(src)->setChecked(true);
415 }
416
417 // setup _channel_comboBox
418 disconnect(_channel_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(channel_changed(int)));
419 _channel_comboBox->clear();
420
421 for(auto s : _session->get_signals()) {
422 if (s->signal_type() == SR_CHANNEL_DSO) {
423 view::DsoSignal *dsoSig = (view::DsoSignal*)s;
424 _channel_comboBox->addItem(dsoSig->get_name(), QVariant::fromValue(dsoSig->get_index()));
425 }

Callers

nothing calls this directly

Calls 11

get_deviceMethod · 0.80
is_demoMethod · 0.80
get_config_byteMethod · 0.80
setValueMethod · 0.80
signal_typeMethod · 0.80
get_nameMethod · 0.80
get_config_uint64Method · 0.80
setRangeMethod · 0.80
is_fileMethod · 0.45
clearMethod · 0.45
get_indexMethod · 0.45

Tested by

no test coverage detected