]> sigrok.org Git - pulseview.git/commitdiff
Trace: Renamed get_colour() to colour()
authorJoel Holdsworth <redacted>
Sun, 16 Nov 2014 18:55:53 +0000 (18:55 +0000)
committerJoel Holdsworth <redacted>
Wed, 19 Nov 2014 10:23:01 +0000 (10:23 +0000)
pv/view/trace.cpp
pv/view/trace.h

index 367891a22c67e72b21a68057ba553c9d0ba50e7a..f6c27430942a4d258cb93297b86114c9397354c3 100644 (file)
@@ -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));
 
index 7cfa3c2e0681c76663319939f246f983f8a2c31f..e3754b6e73a6fdf566a1f8ecfe464db429d07418 100644 (file)
@@ -66,7 +66,7 @@ public:
        /**
         * Get the colour of the signal.
         */
-       QColor get_colour() const;
+       QColor colour() const;
 
        /**
         * Set the colour of the signal.