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

Method reload

DSView/pv/view/viewstatus.cpp:153–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void ViewStatus::reload()
154{
155 const int COLUMN = 5;
156 const int ROW = 2;
157 const int MARGIN = 3;
158
159 if (_session->get_device()->get_work_mode() == DSO)
160 {
161 const double width = _view.get_view_width() * 1.0 / COLUMN;
162 const int height = (this->height() - 2*MARGIN) / ROW;
163
164 for (size_t i = 0; i < COLUMN*ROW; i++) {
165 QRect rect(this->rect().left() + (i%COLUMN)*width,
166 this->rect().top() + (i/COLUMN+1)*MARGIN + (i/COLUMN)*height,
167 width-MARGIN, height);
168
169 if (_mrects.size() <= i) {
170 std::tuple<QRect, int, enum DSO_MEASURE_TYPE> rect_tuple;
171 std::get<0>(rect_tuple) = rect;
172 std::get<1>(rect_tuple) = -1;
173 std::get<2>(rect_tuple) = DSO_MS_BEGIN;
174 _mrects.push_back(rect_tuple);
175 }
176 else {
177 std::get<0>(_mrects[i]) = rect;
178 }
179 }
180 }
181 update();
182}
183
184void ViewStatus::repeat_unshow()
185{

Callers

nothing calls this directly

Calls 4

get_work_modeMethod · 0.80
get_deviceMethod · 0.80
get_view_widthMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected