X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fviewitem.hpp;h=ee77c4ae5610ef915578eac82de0e13e7ae95723;hp=eb0823e47e8f1b55b897597a0c8bf14a0b960742;hb=7a01bd3654ed046216308fa64edfd79be7cd525f;hpb=23e75650eba0491b2636de3cef87f893e38ae6f3 diff --git a/pv/view/viewitem.hpp b/pv/view/viewitem.hpp index eb0823e..ee77c4a 100644 --- a/pv/view/viewitem.hpp +++ b/pv/view/viewitem.hpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_VIEWITEM_H -#define PULSEVIEW_PV_VIEWITEM_H +#ifndef PULSEVIEW_PV_VIEWITEM_HPP +#define PULSEVIEW_PV_VIEWITEM_HPP #include @@ -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. @@ -159,4 +167,4 @@ private: } // namespace view } // namespace pv -#endif // PULSEVIEW_PV_VIEWITEM_H +#endif // PULSEVIEW_PV_VIEWITEM_HPP