Trace view: Allow setting cursors via shift-drag
[pulseview.git] / pv / views / trace / viewwidget.hpp
index e4fb73c8255debedb73963acddc0984e635a0433..0e012560859e7aa939fe746d1ebe55660d751add 100644 (file)
 
 #include <memory>
 
+#include <QPoint>
 #include <QWidget>
 
+#include <pv/util.hpp>
+
 using std::shared_ptr;
 using std::vector;
 
@@ -49,7 +52,7 @@ protected:
         * if no view item is being hovered over.
         * @remarks the default implementation does nothing.
         */
-       virtual void item_hover(const shared_ptr<ViewItem> &item);
+       virtual void item_hover(const shared_ptr<ViewItem> &item, QPoint pos);
 
        /**
         * Indicates the event an a view item has been clicked.
@@ -142,6 +145,7 @@ protected:
        pv::views::trace::View &view_;
        QPoint mouse_point_;
        QPoint mouse_down_point_;
+       pv::util::Timestamp mouse_down_offset_;
        shared_ptr<ViewItem> mouse_down_item_;
        bool item_dragging_;
 };