X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fview.h;h=2f7462978943a84362ff295f95a29011bef6599d;hp=07bd5d9caeade08c0f75b90da5003c423f8dde7a;hb=3e769a374963f37f7d52b65ef6c56bcdf1ef11fe;hpb=4f82e4f613aced3594f07fa219a9d8c247eaed11 diff --git a/pv/view/view.h b/pv/view/view.h index 07bd5d9c..2f746297 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -29,6 +29,7 @@ #include #include +#include #include @@ -49,6 +50,12 @@ class Viewport; class View : public QAbstractScrollArea, public RowItemOwner { Q_OBJECT +private: + enum StickyEvents { + SelectableItemHExtentsChanged = 1, + SelectableItemVExtentsChanged = 2 + }; + private: static const double MaxScale; static const double MinScale; @@ -92,6 +99,11 @@ public: double offset() const; int owner_v_offset() const; + /** + * Returns the number of nested parents that this row item owner has. + */ + unsigned int depth() const; + void zoom(double steps); void zoom(double steps, int offset); @@ -188,6 +200,11 @@ private: void resizeEvent(QResizeEvent *e); +public: + void appearance_changed(bool label, bool content); + + void extents_changed(bool horz, bool vert); + private Q_SLOTS: void h_scroll_value_changed(int value); @@ -200,7 +217,7 @@ private Q_SLOTS: void on_signals_moved(); - void on_geometry_updated(); + void process_sticky_events(); void on_hover_point_changed(); @@ -225,6 +242,9 @@ private: CursorPair _cursors; QPoint _hover_point; + + unsigned int _sticky_events; + QTimer _lazy_event_handler; }; } // namespace view