From: Joel Holdsworth Date: Sun, 16 Nov 2014 18:55:53 +0000 (+0000) Subject: Trace: Renamed get_colour() to colour() X-Git-Tag: pulseview-0.3.0~480 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=06149d431d48726903ace7216c20f3a8d110cdf8;p=pulseview.git Trace: Renamed get_colour() to colour() --- diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index 367891a2..f6c27430 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -58,7 +58,7 @@ void Trace::set_name(QString name) _name = name; } -QColor Trace::get_colour() const +QColor Trace::colour() const { return _colour; } @@ -77,8 +77,6 @@ void Trace::paint_label(QPainter &p, int right, bool hover) if (!enabled()) return; - const QColor colour = get_colour(); - const QRectF r = label_rect(right); // Paint the label @@ -105,14 +103,14 @@ void Trace::paint_label(QPainter &p, int right, bool hover) } p.setPen(Qt::transparent); - p.setBrush(hover ? colour.lighter() : colour); + p.setBrush(hover ? _colour.lighter() : _colour); p.drawPolygon(points, countof(points)); - p.setPen(colour.lighter()); + p.setPen(_colour.lighter()); p.setBrush(Qt::transparent); p.drawPolygon(highlight_points, countof(highlight_points)); - p.setPen(colour.darker()); + p.setPen(_colour.darker()); p.setBrush(Qt::transparent); p.drawPolygon(points, countof(points)); diff --git a/pv/view/trace.h b/pv/view/trace.h index 7cfa3c2e..e3754b6e 100644 --- a/pv/view/trace.h +++ b/pv/view/trace.h @@ -66,7 +66,7 @@ public: /** * Get the colour of the signal. */ - QColor get_colour() const; + QColor colour() const; /** * Set the colour of the signal.