]> sigrok.org Git - pulseview.git/blobdiff - pv/view/signal.h
Added _session reference to Signal objects
[pulseview.git] / pv / view / signal.h
index ece2e5a446218591f066a435454004a550b267f3..eeef55389eb79384f5f84ccaa9542bb631b28999 100644 (file)
 #include <boost/shared_ptr.hpp>
 
 #include <QColor>
+#include <QComboBox>
 #include <QPainter>
 #include <QPen>
 #include <QRect>
 #include <QString>
+#include <QWidgetAction>
 
 #include <stdint.h>
 
@@ -37,6 +39,8 @@
 
 namespace pv {
 
+class SigSession;
+
 namespace data {
 class SignalData;
 }
@@ -53,7 +57,7 @@ private:
        static const QPen SignalAxisPen;
 
 protected:
-       Signal(const sr_probe *const probe);
+       Signal(pv::SigSession &session, const sr_probe *const probe);
 
 public:
        /**
@@ -150,7 +154,14 @@ private:
         */
        QRectF get_label_rect(int y, int right);
 
+private slots:
+       void on_text_changed(const QString &text);
+
+signals:
+       void text_changed();    
+
 protected:
+       pv::SigSession &_session;
        const sr_probe *const _probe;
 
        QString _name;
@@ -158,6 +169,10 @@ protected:
        int _v_offset;
 
        QSizeF _text_size;
+
+       QWidgetAction _name_action;
+       QComboBox _name_widget;
+       bool _updating_name_widget;
 };
 
 } // namespace view