]> sigrok.org Git - pulseview.git/commitdiff
RowItem: Make label_rect a const function
authorJoel Holdsworth <redacted>
Wed, 1 Oct 2014 20:37:59 +0000 (21:37 +0100)
committerJoel Holdsworth <redacted>
Wed, 19 Nov 2014 10:23:02 +0000 (10:23 +0000)
pv/view/rowitem.h
pv/view/trace.cpp
pv/view/trace.h
pv/view/tracegroup.cpp
pv/view/tracegroup.h

index fb09edaa3cc76b52e00f3bca94c613efc7de8fbe..90036389dd39dea17d04d860d2422a1bc474bcc3 100644 (file)
@@ -106,7 +106,7 @@ public:
         *      area.
         * @return Returns the rectangle of the signal label.
         */
-       virtual QRectF label_rect(int right) = 0;
+       virtual QRectF label_rect(int right) const = 0;
 
 public:
        virtual void hover_point_changed();
index f6c27430942a4d258cb93297b86114c9397354c3..3409ecf75cb7a471dba4ebe73b6adf5532cf4762 100644 (file)
@@ -143,7 +143,7 @@ pv::widgets::Popup* Trace::create_popup(QWidget *parent)
        return _popup;
 }
 
-QRectF Trace::label_rect(int right)
+QRectF Trace::label_rect(int right) const
 {
        using pv::view::View;
 
index e3754b6e73a6fdf566a1f8ecfe464db429d07418..7fd8c67afb8e917a5384d27fe87b61edd996c7b0 100644 (file)
@@ -92,7 +92,7 @@ public:
         *      area.
         * @return Returns the rectangle of the signal label.
         */
-       QRectF label_rect(int right);
+       QRectF label_rect(int right) const;
 
 protected:
 
index 2c49ae430642ba965f634fc1cc1c36355eba4350..f99b19666ba27892902a97fde42801a47a8ddca2 100644 (file)
@@ -72,7 +72,7 @@ void TraceGroup::paint_label(QPainter &p, int right, bool hover)
        (void)hover;
 }
 
-QRectF TraceGroup::label_rect(int right)
+QRectF TraceGroup::label_rect(int right) const
 {
        (void)right;
        return QRectF();
index 297afa82eaec28c1002bc79cbbd33a4ee47466e4..0d246cee3c05471c88dbe4f99425eafcea395230 100644 (file)
@@ -77,7 +77,7 @@ public:
         *      area.
         * @return Returns the rectangle of the signal label.
         */
-       QRectF label_rect(int right);
+       QRectF label_rect(int right) const;
 
        /**
         * Determines if a point is in the header label rect.