]> sigrok.org Git - pulseview.git/blobdiff - pv/view/viewitem.hpp
ViewItem: Added hit_box_rect
[pulseview.git] / pv / view / viewitem.hpp
index eb0823e47e8f1b55b897597a0c8bf14a0b960742..7579b555cdc460b36207c1f64fcab7f260eca2a9 100644 (file)
@@ -100,6 +100,14 @@ public:
         */
        virtual QRectF label_rect(const QRectF &rect) const = 0;
 
+       /**
+        * Computes the outline rectangle of the viewport hit-box.
+        * @param rect the rectangle of the viewport area.
+        * @return Returns the rectangle of the hit-box.
+        * @remarks The default implementation returns an empty hit-box.
+        */
+       virtual QRectF hit_box_rect(const QRectF &rect) const;
+
        /**
         * Paints the signal label.
         * @param p the QPainter to paint into.