From: Joel Holdsworth Date: Mon, 25 Aug 2014 13:34:24 +0000 (+0100) Subject: RowItem: Renamed get_v_offset to v_offset X-Git-Tag: pulseview-0.3.0~482 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=1ef49ddd04f44a4369403fbab19ed235483e2975 RowItem: Renamed get_v_offset to v_offset --- diff --git a/pv/view/header.cpp b/pv/view/header.cpp index 17dd382d..653cac48 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -143,7 +143,7 @@ void Header::mousePressEvent(QMouseEvent *event) for (const shared_ptr 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 @@ -163,7 +163,7 @@ void Header::mousePressEvent(QMouseEvent *event) 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())); } } diff --git a/pv/view/rowitem.cpp b/pv/view/rowitem.cpp index fe194bf7..81c1ab2c 100644 --- a/pv/view/rowitem.cpp +++ b/pv/view/rowitem.cpp @@ -33,7 +33,7 @@ RowItem::RowItem() : { } -int RowItem::get_v_offset() const +int RowItem::v_offset() const { return _v_offset; } diff --git a/pv/view/rowitem.h b/pv/view/rowitem.h index a48af5ce..edf4573e 100644 --- a/pv/view/rowitem.h +++ b/pv/view/rowitem.h @@ -44,7 +44,7 @@ public: /** * 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. diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 82be599b..2cb3f3ed 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -257,7 +257,7 @@ vector< shared_ptr > View::get_traces() const stable_sort(traces.begin(), traces.end(), [](const shared_ptr &a, const shared_ptr &b) { - return a->get_v_offset() < b->get_v_offset(); }); + return a->v_offset() < b->v_offset(); }); return traces; } @@ -361,11 +361,11 @@ void View::normalize_layout() int v_min = INT_MAX; for (const shared_ptr 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 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()); diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp index c45e455b..71086385 100644 --- a/pv/view/viewport.cpp +++ b/pv/view/viewport.cpp @@ -67,7 +67,7 @@ int Viewport::get_total_height() const const vector< shared_ptr > traces(_view.get_traces()); for (const shared_ptr t : traces) { assert(t); - h = max(t->get_v_offset() + View::SignalHeight, h); + h = max(t->v_offset() + View::SignalHeight, h); } return h;