for (const shared_ptr<Trace> t : traces)
if (t->selected())
_drag_traces.push_back(
- make_pair(t, t->get_v_offset()));
+ make_pair(t, t->v_offset()));
}
// Select the signal if it has been clicked
if (event->button() & Qt::LeftButton)
_drag_traces.push_back(
make_pair(mouse_over_trace,
- mouse_over_trace->get_v_offset()));
+ mouse_over_trace->v_offset()));
}
}
{
}
-int RowItem::get_v_offset() const
+int RowItem::v_offset() const
{
return _v_offset;
}
/**
* Gets the vertical layout offset of this signal.
*/
- int get_v_offset() const;
+ int v_offset() const;
/**
* Sets the vertical layout offset of this signal.
stable_sort(traces.begin(), traces.end(),
[](const shared_ptr<Trace> &a, const shared_ptr<Trace> &b) {
- return a->get_v_offset() < b->get_v_offset(); });
+ return a->v_offset() < b->v_offset(); });
return traces;
}
int v_min = INT_MAX;
for (const shared_ptr<Trace> t : traces)
- v_min = min(t->get_v_offset(), v_min);
+ v_min = min(t->v_offset(), v_min);
const int delta = -min(v_min, 0);
for (shared_ptr<Trace> t : traces)
- t->set_v_offset(t->get_v_offset() + delta);
+ t->set_v_offset(t->v_offset() + delta);
verticalScrollBar()->setSliderPosition(_v_offset + delta);
v_scroll_value_changed(verticalScrollBar()->sliderPosition());
const vector< shared_ptr<Trace> > traces(_view.get_traces());
for (const shared_ptr<Trace> t : traces) {
assert(t);
- h = max(t->get_v_offset() + View::SignalHeight, h);
+ h = max(t->v_offset() + View::SignalHeight, h);
}
return h;