X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fview.hpp;h=94082189be41bc1b47b7abfff094045ed703138c;hp=8e78b6260e2143dcbb141ad2a5aa0f1b4836c822;hb=eeceee9955e7db4ac777d49d1b7a766069476b08;hpb=b4bc9b55381ff22196785291d3862c8c8c131885 diff --git a/pv/views/trace/view.hpp b/pv/views/trace/view.hpp index 8e78b626..94082189 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,7 @@ private: vector< shared_ptr > trigger_markers_; QPoint hover_point_; + shared_ptr signal_under_mouse_cursor_; unsigned int sticky_events_; QTimer lazy_event_handler_;