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

Method mouseDoubleClickEvent

DSView/pv/view/header.cpp:147–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void Header::mouseDoubleClickEvent(QMouseEvent *event)
148{
149 assert(event);
150
151 std::vector<Trace*> traces;
152
153 _view.get_traces(ALL_VIEW, traces);
154
155 if (event->button() & Qt::LeftButton) {
156 _mouse_down_point = event->pos();
157
158 // Save the offsets of any Traces which will be dragged
159 for(auto t : traces){
160 if (t->selected())
161 _drag_traces.push_back(
162 make_pair(t, t->get_v_offset()));
163 }
164
165 // Select the Trace if it has been clicked
166 for(auto t : traces){
167 if (t->mouse_double_click(width(), event->pos()))
168 break;
169 }
170 }
171
172}
173
174void Header::mousePressEvent(QMouseEvent *event)
175{

Callers

nothing calls this directly

Calls 4

get_tracesMethod · 0.80
selectedMethod · 0.80
get_v_offsetMethod · 0.80
mouse_double_clickMethod · 0.80

Tested by

no test coverage detected