X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fview.hpp;h=7df0f3de23bfdebf9439f7f7fc02248e603f50d4;hp=8e78b6260e2143dcbb141ad2a5aa0f1b4836c822;hb=fb64180193664005567570724d52b685913e15ed;hpb=cbd9ec7f751a5403d1465e966ccecd31b7086e8a diff --git a/pv/views/trace/view.hpp b/pv/views/trace/view.hpp index 8e78b62..7df0f3d 100644 --- a/pv/views/trace/view.hpp +++ b/pv/views/trace/view.hpp @@ -129,6 +129,8 @@ public: virtual void remove_decode_signal(shared_ptr signal); #endif + shared_ptr get_signal_under_mouse_cursor() const; + /** * Returns the view of the owner. */ @@ -301,6 +303,15 @@ public: const QPoint& hover_point() const; + /** + * Determines the closest level change (i.e. edge) to a given point, which + * is useful for e.g. the "snap to edge" functionality. + * + * @param p The current position of the mouse cursor + * @return The sample number of the nearest level change or -1 if none + */ + int64_t get_nearest_level_change(const QPoint &p) const; + void restack_all_trace_tree_items(); int header_width() const; @@ -517,6 +528,8 @@ private: vector< shared_ptr > trigger_markers_; QPoint hover_point_; + shared_ptr signal_under_mouse_cursor_; + uint16_t snap_distance_; unsigned int sticky_events_; QTimer lazy_event_handler_;