X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fview.hpp;h=7df0f3de23bfdebf9439f7f7fc02248e603f50d4;hp=1cff6ab7bbf245f52a7508c20b52b446e26d15bc;hb=fb64180193664005567570724d52b685913e15ed;hpb=d9b55cc8ab01e83b392762ed1fa400fdafafb60b diff --git a/pv/views/trace/view.hpp b/pv/views/trace/view.hpp index 1cff6ab..7df0f3d 100644 --- a/pv/views/trace/view.hpp +++ b/pv/views/trace/view.hpp @@ -64,12 +64,10 @@ namespace views { namespace trace { -class CursorHeader; class DecodeTrace; class Header; class Ruler; class Signal; -class Trace; class Viewport; class TriggerMarker; @@ -131,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. */ @@ -303,8 +303,19 @@ 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; + void on_setting_changed(const QString &key, const QVariant &value); Q_SIGNALS: @@ -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_;