X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fviewitem.hpp;h=5b80c4e86efdb8fe3e9a95320bcd3aa232cd65a4;hb=e71eb81c946c3524e01eaef9781ccbf170143d0c;hp=eb0823e47e8f1b55b897597a0c8bf14a0b960742;hpb=23e75650eba0491b2636de3cef87f893e38ae6f3;p=pulseview.git diff --git a/pv/view/viewitem.hpp b/pv/view/viewitem.hpp index eb0823e4..5b80c4e8 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. @@ -141,7 +149,7 @@ public: public: virtual QMenu* create_context_menu(QWidget *parent); - virtual pv::widgets::Popup* create_popup(QWidget *parent) = 0; + virtual pv::widgets::Popup* create_popup(QWidget *parent); virtual void delete_pressed(); @@ -159,4 +167,4 @@ private: } // namespace view } // namespace pv -#endif // PULSEVIEW_PV_VIEWITEM_H +#endif // PULSEVIEW_PV_VIEWITEM_HPP