X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fviewwidget.hpp;h=003c0eeda09b57f31d9f26e31b54244045876ac6;hb=08d9c3caec0a3ad1c624af685f948e17b91d278a;hp=b6b1a5b48ec99a8166ba426c03f8425d43437578;hpb=c9743553584975b338890c16ef22943d7beaacdd;p=pulseview.git diff --git a/pv/view/viewwidget.hpp b/pv/view/viewwidget.hpp index b6b1a5b4..003c0eed 100644 --- a/pv/view/viewwidget.hpp +++ b/pv/view/viewwidget.hpp @@ -40,6 +40,15 @@ class ViewWidget : public QWidget protected: ViewWidget(View &parent); + /** + * Indicates when a view item is being hovered over. + * @param item The item that is being hovered over, or @c nullptr + * if no view item is being hovered over. + * @remarks the default implementation does nothing. + */ + virtual void item_hover( + const std::shared_ptr &item); + /** * Indicates the event an a view item has been clicked. * @param item the view item that has been clicked. @@ -65,6 +74,23 @@ protected: */ void drag_items(const QPoint &delta); + /** + * Sets this item into the dragged state. + */ + virtual void drag(); + + /** + * Drag the background by the delta offset. + * @param delta the drag offset in pixels. + * @remarks The default implementation does nothing. + */ + virtual void drag_by(const QPoint &delta); + + /** + * Sets this item into the un-dragged state. + */ + virtual void drag_release(); + /** * Gets the items in the view widget. */