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

Method load_options_view

DSView/pv/dialogs/decoderoptionsdlg.cpp:90–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void DecoderOptionsDlg::load_options_view()
91{
92 DSDialog *dlg = this;
93
94 dlg->setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_DECODER_OPTIONS), "Decoder Options"));
95
96 QFormLayout *form = new QFormLayout();
97 form->setContentsMargins(0, 0, 0, 0);
98 form->setVerticalSpacing(5);
99 form->setFormAlignment(Qt::AlignLeft);
100 form->setLabelAlignment(Qt::AlignLeft);
101 dlg->layout()->addLayout(form);
102
103 //scroll pannel
104 QWidget *scroll_pannel = new QWidget();
105 QVBoxLayout *scroll_lay = new QVBoxLayout();
106 scroll_lay->setContentsMargins(0, 0, 0, 0);
107 scroll_lay->setAlignment(Qt::AlignLeft);
108 scroll_pannel->setLayout(scroll_lay);
109 form->addRow(scroll_pannel);
110
111 // decoder options
112 QWidget *container_panel = new QWidget();
113 QVBoxLayout *decoder_lay = new QVBoxLayout();
114 decoder_lay->setContentsMargins(0, 0, 0, 0);
115 decoder_lay->setDirection(QBoxLayout::TopToBottom);
116 container_panel->setLayout(decoder_lay);
117 scroll_lay->addWidget(container_panel);
118
119 load_decoder_forms(container_panel);
120
121 //Add region combobox
122 _start_comboBox = new DsComboBox(dlg);
123 _end_comboBox = new DsComboBox(dlg);
124 _start_comboBox->addItem("Start");
125 _end_comboBox->addItem("End");
126 _start_comboBox->setMinimumContentsLength(7);
127 _end_comboBox->setMinimumContentsLength(7);
128 _start_comboBox->setMinimumWidth(30);
129 _end_comboBox->setMinimumWidth(30);
130
131 // Add cursor list
132 auto view = _trace->get_view();
133 int dex1 = 0;
134 int dex2 = 0;
135
136 if (view)
137 {
138 int num = 1;
139 auto &cursor_list = view->get_cursorList();
140
141 for (auto c : cursor_list){
142 //tr
143 QString cursor_name = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_CURSOR), "Cursor") +
144 QString::number(num);
145 _start_comboBox->addItem(cursor_name, QVariant((quint64)c->get_key()));
146 _end_comboBox->addItem(cursor_name, QVariant((quint64)c->get_key()));
147

Callers

nothing calls this directly

Calls 6

layoutMethod · 0.80
get_viewMethod · 0.80
get_keyMethod · 0.80
is_lang_enMethod · 0.80
setTitleMethod · 0.45
update_fontMethod · 0.45

Tested by

no test coverage detected