X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fmarginwidget.hpp;fp=pv%2Fview%2Fmarginwidget.hpp;h=54ace028fcda121bd79588c20a1b32d6af159c67;hb=2f7982367e8382e05c862de7afc71075ded5f606;hp=35d557d10ccab7dcae57f57f6c990bce7c85e9d6;hpb=e47b69882ca7299041123c664dbcc8b552c5db99;p=pulseview.git diff --git a/pv/view/marginwidget.hpp b/pv/view/marginwidget.hpp index 35d557d1..54ace028 100644 --- a/pv/view/marginwidget.hpp +++ b/pv/view/marginwidget.hpp @@ -67,6 +67,18 @@ protected: */ void show_popup(const std::shared_ptr &item); + /** + * Returns true if the selection of row items allows dragging. + * @return Returns true if the drag is acceptable. + */ + virtual bool accept_drag() const = 0; + + /** + * Drag the dragging items by the delta offset. + * @param delta the drag offset in pixels. + */ + virtual void drag_items(const QPoint &delta) = 0; + /** * Handles left mouse button press events. * @param event the mouse event that triggered this handler. @@ -82,6 +94,7 @@ protected: protected: void mousePressEvent(QMouseEvent * event); void mouseReleaseEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); void leaveEvent(QEvent *event);