]> sigrok.org Git - pulseview.git/blobdiff - pv/view/signal.cpp
Removed TimeMarker copy constructor
[pulseview.git] / pv / view / signal.cpp
index cdbb65b1638e5ac145c1aaa66cf6c3d99bf12971..ae180e19a47a228a35f8d1151658b3f1b14973c2 100644 (file)
@@ -32,15 +32,13 @@ namespace pv {
 namespace view {
 
 const int Signal::LabelHitPadding = 2;
-const int Signal::LabelHighlightRadius = 6;
 
 const QPen Signal::SignalAxisPen(QColor(128, 128, 128, 64));
 
 Signal::Signal(const sr_probe *const probe) :
        _probe(probe),
        _name(probe->name),
-       _v_offset(0),
-       _selected(false)
+       _v_offset(0)
 {
        assert(_probe);
 }
@@ -75,16 +73,6 @@ void Signal::set_v_offset(int v_offset)
        _v_offset = v_offset;
 }
 
-bool Signal::selected() const
-{
-       return _selected;
-}
-
-void Signal::select(bool select)
-{
-       _selected = select;
-}
-
 void Signal::paint_label(QPainter &p, int y, int right, bool hover)
 {
        p.setBrush(_colour);
@@ -114,10 +102,8 @@ void Signal::paint_label(QPainter &p, int y, int right, bool hover)
                QPointF(label_rect.left() + 1, label_rect.bottom() - 1)
        };
 
-       if (_selected) {
-               p.setPen(QPen(QApplication::palette().brush(
-                       QPalette::Highlight), LabelHighlightRadius,
-                       Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
+       if (selected()) {
+               p.setPen(highlight_pen());
                p.setBrush(Qt::transparent);
                p.drawPolygon(points, countof(points));
        }