From 0067d80499d36944277e6fed2d7ad5394c85c03f Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 1 Oct 2014 21:37:59 +0100 Subject: [PATCH] RowItem: Make label_rect a const function --- pv/view/rowitem.h | 2 +- pv/view/trace.cpp | 2 +- pv/view/trace.h | 2 +- pv/view/tracegroup.cpp | 2 +- pv/view/tracegroup.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pv/view/rowitem.h b/pv/view/rowitem.h index fb09edaa..90036389 100644 --- a/pv/view/rowitem.h +++ b/pv/view/rowitem.h @@ -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(); diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index f6c27430..3409ecf7 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -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; diff --git a/pv/view/trace.h b/pv/view/trace.h index e3754b6e..7fd8c67a 100644 --- a/pv/view/trace.h +++ b/pv/view/trace.h @@ -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: diff --git a/pv/view/tracegroup.cpp b/pv/view/tracegroup.cpp index 2c49ae43..f99b1966 100644 --- a/pv/view/tracegroup.cpp +++ b/pv/view/tracegroup.cpp @@ -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(); diff --git a/pv/view/tracegroup.h b/pv/view/tracegroup.h index 297afa82..0d246cee 100644 --- a/pv/view/tracegroup.h +++ b/pv/view/tracegroup.h @@ -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. -- 2.30.2