Trace: Converted on_hover_point_changed signal to direct notification
[pulseview.git] / pv / view / trace.cpp
index d4bc69f2f93346222c57861d5b26c4bc3157754f..799a1fe3fac5d70ac421b68c35e690c69c129e85 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <QApplication>
 #include <QFormLayout>
+#include <QKeyEvent>
 #include <QLineEdit>
 
 #include "trace.h"
@@ -41,6 +42,7 @@ const QPen Trace::AxisPen(QColor(128, 128, 128, 64));
 const int Trace::LabelHitPadding = 2;
 
 Trace::Trace(QString name) :
+       _view(NULL),
        _name(name),
        _v_offset(0),
        _popup(NULL),
@@ -165,7 +167,7 @@ bool Trace::pt_in_label_rect(int left, int right, const QPoint &point)
        (void)left;
 
        const QRectF label = get_label_rect(right);
-       return QRectF(
+       return enabled() && QRectF(
                QPointF(label.left() - LabelHitPadding,
                        label.top() - LabelHitPadding),
                QPointF(right, label.bottom() + LabelHitPadding)
@@ -218,6 +220,10 @@ QRectF Trace::get_label_rect(int right)
                label_size.width(), label_size.height());
 }
 
+void Trace::hover_point_changed()
+{
+}
+
 QColor Trace::get_text_colour() const
 {
        return (_colour.lightness() > 64) ? Qt::black : Qt::white;