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

Method View

DSView/pv/view/view.cpp:83–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83View::View(SigSession *session, pv::toolbars::SamplingBar *sampling_bar, QWidget *parent) :
84 QScrollArea(parent),
85 _sampling_bar(sampling_bar),
86 _scale(10),
87 _preScale(1e-6),
88 _maxscale(1e9),
89 _minscale(1e-15),
90 _offset(0),
91 _preOffset(0),
92 _updating_scroll(false),
93 _trig_hoff(0),
94 _show_cursors(false),
95 _search_hit(false),
96 _show_xcursors(false),
97 _hover_point(-1, -1),
98 _dso_auto(true),
99 _show_lissajous(false),
100 _back_ready(false)
101{
102 _trig_cursor = NULL;
103 _search_cursor = NULL;
104 _cali = NULL;
105
106 _session = session;
107 _device_agent = session->get_device();
108
109 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
110
111 // trace viewport map
112 _trace_view_map[SR_CHANNEL_LOGIC] = TIME_VIEW;
113 _trace_view_map[SR_CHANNEL_GROUP] = TIME_VIEW;
114 _trace_view_map[SR_CHANNEL_DECODER] = TIME_VIEW;
115 _trace_view_map[SR_CHANNEL_ANALOG] = TIME_VIEW;
116 _trace_view_map[SR_CHANNEL_DSO] = TIME_VIEW;
117 _trace_view_map[SR_CHANNEL_FFT] = FFT_VIEW;
118 _trace_view_map[SR_CHANNEL_LISSAJOUS] = TIME_VIEW;
119 _trace_view_map[SR_CHANNEL_MATH] = TIME_VIEW;
120
121 _active_viewport = NULL;
122 _ruler = new Ruler(*this);
123 _header = new Header(*this);
124 _devmode = new DevMode(this, session);
125
126 setViewportMargins(headerWidth(), RulerHeight, 0, 0);
127
128 // windows splitter
129 _time_viewport = new Viewport(*this, TIME_VIEW);
130 _time_viewport->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
131 _time_viewport->setMinimumHeight(100);
132
133 _fft_viewport = new Viewport(*this, FFT_VIEW);
134 _fft_viewport->setVisible(false);
135 _fft_viewport->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
136 _fft_viewport->setMinimumHeight(100);
137
138 _vsplitter = new QSplitter(this);
139 _vsplitter->setOrientation(Qt::Vertical);
140 _vsplitter->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);

Callers

nothing calls this directly

Calls 3

get_deviceMethod · 0.80
colorMethod · 0.80
set_colourMethod · 0.45

Tested by

no test coverage detected