]> sigrok.org Git - pulseview.git/blobdiff - pv/view/signal.h
Added fallback toolbar icons
[pulseview.git] / pv / view / signal.h
index 8adee96f9ae765b07d296d7b8b504e260df59578..72019032e06a74e221f92c4d9ea0ddf57fa968e6 100644 (file)
 #include <stdint.h>
 
 namespace pv {
-namespace view {
 
+namespace data {
 class SignalData;
+}
+
+namespace view {
 
 class Signal
 {
 private:
        static const int LabelHitPadding;
+       static const int LabelHighlightRadius;
 
 protected:
        Signal(QString name);
@@ -64,6 +68,26 @@ public:
         */
        void set_colour(QColor colour);
 
+       /**
+        * Gets the vertical layout offset of this signal.
+        */
+       int get_v_offset() const;
+
+       /**
+        * Sets the vertical layout offset of this signal.
+        */
+       void set_v_offset(int v_offset);
+
+       /**
+        * Returns true if the signal has been selected by the user.
+        */
+       bool selected() const;
+
+       /**
+        * Selects or deselects the signal.
+        */
+       void select(bool select = true);
+
        /**
         * Paints the signal with a QPainter
         * @param p the QPainter to paint into.
@@ -117,6 +141,9 @@ protected:
 protected:
        QString _name;
        QColor _colour;
+       int _v_offset;
+
+       bool _selected;
 
        QSizeF _text_size;
 };