]> sigrok.org Git - pulseview.git/commitdiff
RowItem: Renamed get_v_offset to v_offset
authorJoel Holdsworth <redacted>
Mon, 25 Aug 2014 13:34:24 +0000 (14:34 +0100)
committerJoel Holdsworth <redacted>
Wed, 19 Nov 2014 10:23:01 +0000 (10:23 +0000)
pv/view/header.cpp
pv/view/rowitem.cpp
pv/view/rowitem.h
pv/view/view.cpp
pv/view/viewport.cpp

index 17dd382dd4846bf8d44b85a8c5e881596bd47f88..653cac483bc0d36ec37b4c57b01f168cf5f3f586 100644 (file)
@@ -143,7 +143,7 @@ void Header::mousePressEvent(QMouseEvent *event)
                for (const shared_ptr<Trace> t : traces)
                        if (t->selected())
                                _drag_traces.push_back(
                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
        }
 
        // 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,
                        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()));
                }
        }
 
                }
        }
 
index fe194bf72ea3b8e9be963dba40dd2beb5d7f8929..81c1ab2cc8d510c55cea03813fb1bb6d3bcdccd0 100644 (file)
@@ -33,7 +33,7 @@ RowItem::RowItem() :
 {
 }
 
 {
 }
 
-int RowItem::get_v_offset() const
+int RowItem::v_offset() const
 {
        return _v_offset;
 }
 {
        return _v_offset;
 }
index a48af5ce5fa0e2cb62e2b7baa507c35b0a6aaf88..edf4573eb376104c0c3ca428fc14690cdf136bd6 100644 (file)
@@ -44,7 +44,7 @@ public:
        /**
         * Gets the vertical layout offset of this signal.
         */
        /**
         * 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.
 
        /**
         * Sets the vertical layout offset of this signal.
index 82be599b2ff951c61da3ef4e6dbbc7aa523c855e..2cb3f3ed9b6f3dd1f2591b94911b150004f4ba94 100644 (file)
@@ -257,7 +257,7 @@ vector< shared_ptr<Trace> > View::get_traces() const
 
        stable_sort(traces.begin(), traces.end(),
                [](const shared_ptr<Trace> &a, const shared_ptr<Trace> &b) {
 
        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;
 }
 
        return traces;
 }
@@ -361,11 +361,11 @@ void View::normalize_layout()
 
        int v_min = INT_MAX;
        for (const shared_ptr<Trace> t : 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)
 
        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());
 
        verticalScrollBar()->setSliderPosition(_v_offset + delta);
        v_scroll_value_changed(verticalScrollBar()->sliderPosition());
index c45e455b0ac091abe812f67279d4500196c2064c..7108638588b054a42562b556984236302704c6a9 100644 (file)
@@ -67,7 +67,7 @@ int Viewport::get_total_height() const
        const vector< shared_ptr<Trace> > traces(_view.get_traces());
        for (const shared_ptr<Trace> t : traces) {
                assert(t);
        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;
        }
 
        return h;