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

Method TriggerDock

DSView/pv/dock/triggerdock.cpp:62–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60const int TriggerDock::MinTrigPosition = 1;
61
62TriggerDock::TriggerDock(QWidget *parent, SigSession *session) :
63 QScrollArea(parent),
64 _session(session)
65{
66
67 _cur_ch_num = 16;
68 if (_session->get_device()->have_instance()) {
69 _session->get_device()->get_config_int16(SR_CONF_TOTAL_CH_NUM, _cur_ch_num);
70 }
71
72 _serial_hex_label = NULL;
73 _serial_hex_lineEdit = NULL;
74 _serial_hex_ck_label = NULL;
75 _is_serial_val_setting = false;
76
77 _widget = new QWidget(this);
78 _simple_radioButton = new QRadioButton(_widget);
79 _simple_radioButton->setChecked(true);
80 _adv_radioButton = new QRadioButton(_widget);
81
82 _position_label = new QLabel(_widget);
83 _position_spinBox = new PopupLineEdit(_widget);
84 _position_spinBox->setRange(MinTrigPosition, DS_MAX_TRIG_PERCENT);
85 _position_spinBox->setValue(1);
86 // _position_spinBox->setButtonSymbols(QAbstractSpinBox::NoButtons);
87 _position_slider = new QSlider(Qt::Horizontal, _widget);
88 _position_slider->setRange(MinTrigPosition, DS_MAX_TRIG_PERCENT);
89 connect(_position_slider, SIGNAL(valueChanged(int)), _position_spinBox, SLOT(setValue(int)));
90 connect(_position_spinBox, SIGNAL(valueChanged(int)), _position_slider, SLOT(setValue(int)));
91
92 _stages_label = new QLabel(_widget);
93 _stages_label->setDisabled(true);
94 stages_comboBox = new DsComboBox(_widget);
95
96 for (int i = 1; i <= TriggerStages; i++){
97 stages_comboBox->addItem(QString::number(i));
98 }
99
100 stages_comboBox->setDisabled(true);
101
102 _adv_tabWidget = new QTabWidget(_widget);
103 _adv_tabWidget->setTabPosition(QTabWidget::North);
104 _adv_tabWidget->setDisabled(true);
105 setup_adv_tab();
106
107 connect(_simple_radioButton, SIGNAL(clicked()), this, SLOT(simple_trigger()));
108 connect(_adv_radioButton, SIGNAL(clicked()), this, SLOT(adv_trigger()));
109 connect(stages_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(widget_enable(int)));
110
111
112 QVBoxLayout *layout = new QVBoxLayout(_widget);
113 QGridLayout *gLayout = new QGridLayout();
114 gLayout->setVerticalSpacing(5);
115 gLayout->addWidget(_simple_radioButton, 0, 0);
116 gLayout->addWidget(_adv_radioButton, 1, 0);
117 gLayout->addWidget(_position_label, 2, 0);
118 gLayout->addWidget(_position_spinBox, 2, 1);
119 //tr

Callers

nothing calls this directly

Calls 5

have_instanceMethod · 0.80
get_deviceMethod · 0.80
get_config_int16Method · 0.80
setRangeMethod · 0.80
setValueMethod · 0.80

Tested by

no test coverage detected