]> sigrok.org Git - pulseview.git/blobdiff - pv/view/signal.h
Use static signal offsets instead of offsets calculated on-the-fly
[pulseview.git] / pv / view / signal.h
index 8adee96f9ae765b07d296d7b8b504e260df59578..b3212394115df5c5b043d27969cb8dcdfd117d84 100644 (file)
 #include <stdint.h>
 
 namespace pv {
-namespace view {
 
 class SignalData;
 
+namespace view {
+
 class Signal
 {
 private:
@@ -64,6 +65,16 @@ 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);
+
        /**
         * Paints the signal with a QPainter
         * @param p the QPainter to paint into.
@@ -117,6 +128,7 @@ protected:
 protected:
        QString _name;
        QColor _colour;
+       int _v_offset;
 
        QSizeF _text_size;
 };