| 151 | } |
| 152 | |
| 153 | void 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 | |
| 184 | void ViewStatus::repeat_unshow() |
| 185 | { |
nothing calls this directly
no test coverage detected