]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/viewport.hpp
Fix #1292/1294 by snapping to any edge when not hovering over a signal
[pulseview.git] / pv / views / trace / viewport.hpp
index ab67f69f3ee2d618895b6d5595a7251f97ef538c..1b77a0d0699e7264170f869f39097216d923103b 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <boost/optional.hpp>
 
+#include <QPoint>
 #include <QTimer>
 #include <QTouchEvent>
 
@@ -48,14 +49,6 @@ class Viewport : public ViewWidget
 public:
        explicit Viewport(View &parent);
 
-private:
-       /**
-        * 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.
-        */
-       void item_hover(const shared_ptr<ViewItem> &item);
-
        /**
         * Gets the first view item which has a hit-box that contains @c pt .
         * @param pt the point to search with.
@@ -64,6 +57,14 @@ private:
         */
        shared_ptr<ViewItem> get_mouse_over_item(const QPoint &pt);
 
+private:
+       /**
+        * 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.
+        */
+       void item_hover(const shared_ptr<ViewItem> &item, QPoint pos);
+
        /**
         * Sets this item into the dragged state.
         */