| 366 | } |
| 367 | |
| 368 | void 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 | } |
nothing calls this directly
no test coverage detected