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

Method MeasureDock

DSView/pv/dock/measuredock.cpp:53–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51using namespace pv::view;
52
53MeasureDock::MeasureDock(QWidget *parent, View &view, SigSession *session) :
54 QScrollArea(parent),
55 _session(session),
56 _view(view)
57{
58 _widget = new QWidget(this);
59
60 _dist_pannel = NULL;
61 _edge_pannel = NULL;
62 _bSetting = false;
63
64 _mouse_groupBox = new QGroupBox(_widget);
65 _fen_checkBox = new QCheckBox(_widget);
66 _fen_checkBox->setChecked(true);
67 _width_label = new QLabel(_widget);
68 _period_label = new QLabel(_widget);
69 _freq_label = new QLabel(_widget);
70 _duty_label = new QLabel(_widget);
71
72 _w_label = new QLabel(_widget);
73 _p_label = new QLabel(_widget);
74 _f_label = new QLabel(_widget);
75 _d_label = new QLabel(_widget);
76
77 QGridLayout *mouse_layout = new QGridLayout();
78 mouse_layout->setVerticalSpacing(5);
79 mouse_layout->setHorizontalSpacing(5);
80 mouse_layout->addWidget(_fen_checkBox, 0, 0, 1, 5);
81 mouse_layout->addWidget(_w_label, 1, 0);
82 mouse_layout->addWidget(_width_label, 1, 1);
83 mouse_layout->addWidget(_p_label, 1, 3);
84 mouse_layout->addWidget(_period_label, 1, 4);
85
86 mouse_layout->addWidget(_d_label, 2, 0);
87 mouse_layout->addWidget(_duty_label, 2, 1);
88 mouse_layout->addWidget(_f_label, 2, 3);
89 mouse_layout->addWidget(_freq_label, 2, 4);
90
91 _mouse_groupBox->setLayout(mouse_layout);
92 mouse_layout->setContentsMargins(5, 15, 5, 5);
93
94 /* cursor distance group */
95 _dist_groupBox = new QGroupBox(_widget);
96 _dist_groupBox->setMinimumWidth(300);
97 _dist_add_btn = new XToolButton(_widget);
98
99 _dist_layout = new QGridLayout(_widget);
100 _dist_layout->setVerticalSpacing(5);
101 _dist_layout->addWidget(_dist_add_btn, 0, 0);
102 _dist_layout->addWidget(new QLabel(_widget), 0, 1, 1, 3);
103 _add_dec_label = new QLabel(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_TIME_SAMPLES), "Time/Samples"), _widget);
104 _dist_layout->addWidget(_add_dec_label, 0, 4);
105 _dist_layout->addWidget(new QLabel(_widget), 0, 5, 1, 2);
106 _dist_layout->setColumnStretch(1, 50);
107 _dist_layout->setColumnStretch(6, 100);
108 _dist_groupBox->setLayout(_dist_layout);
109 _dist_layout->setContentsMargins(5, 15, 5, 5);
110

Callers

nothing calls this directly

Calls 1

setGeometryMethod · 0.80

Tested by

no test coverage detected