]> sigrok.org Git - pulseview.git/blobdiff - pv/signal.h
Moved Signal label layout to get_label_rect
[pulseview.git] / pv / signal.h
index 2351a2f911256c0a591c953a6d7d9d63e1421848..1b2f5df92a7221813e0dbb6afbdb7de74eac172c 100644 (file)
@@ -52,6 +52,14 @@ public:
        virtual void paint(QPainter &p, const QRect &rect, double scale,
                double offset) = 0;
 
        virtual void paint(QPainter &p, const QRect &rect, double scale,
                double offset) = 0;
 
+       /**
+        * Computes the outline rectangle of a label.
+        * @param p the QPainter to lay out text with.
+        * @param rect The rectangle of the signal header.
+        * @return Returns the rectangle of the signal label.
+        */
+       virtual QRectF get_label_rect(QPainter &p, const QRect &rect);
+       
        /**
         * Paints the signal label into a QGLWidget.
         * @param p the QPainter to paint into.
        /**
         * Paints the signal label into a QGLWidget.
         * @param p the QPainter to paint into.