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

Method mousePressEvent

DSView/pv/view/viewstatus.cpp:212–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void ViewStatus::mousePressEvent(QMouseEvent *event)
213{
214 assert(event);
215
216 if (_session->get_device()->get_work_mode() != DSO)
217 return;
218
219 if (event->button() == Qt::LeftButton) {
220 for(size_t i = 0; i < _mrects.size(); i++) {
221 const QRect rect = std::get<0>(_mrects[i]);
222 if (rect.contains(event->pos())) {
223 _hit_rect = (int)i;
224 pv::dialogs::DsoMeasure dsoMeasureDialog(_session, _view, i, _last_sig_index);
225 dsoMeasureDialog.exec();
226 break;
227 }
228 }
229 update();
230 }
231}
232
233void ViewStatus::set_measure(unsigned int index, bool canceled,
234 int sig_index, enum DSO_MEASURE_TYPE ms_type)

Callers

nothing calls this directly

Calls 4

get_work_modeMethod · 0.80
get_deviceMethod · 0.80
sizeMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected