X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fview.hpp;h=b29fb157dce383eec55535fcd187ecf104eaa9b7;hp=3e0a347142fb91b69b72301c4adeaa60e109e07b;hb=c7b03d9daa9574bd633fbac2d5976716f58027f5;hpb=476f9ebf07dc64993d30192ed01d3c7a3c53f1b7 diff --git a/pv/view/view.hpp b/pv/view/view.hpp index 3e0a347..b29fb15 100644 --- a/pv/view/view.hpp +++ b/pv/view/view.hpp @@ -69,6 +69,7 @@ private: static const double MinScale; static const int MaxScrollValue; + static const int MaxViewAutoUpdateRate; static const int ScaleUnits[3]; @@ -152,6 +153,12 @@ public: std::pair get_time_extents() const; + /** + * Enables or disables sticky scrolling, i.e. the view always shows + * the most recent samples when capturing data. + */ + void enable_sticky_scrolling(bool state); + /** * Returns true if cursors are displayed. false otherwise. */ @@ -200,6 +207,8 @@ Q_SIGNALS: void scale_offset_changed(); + void sticky_scrolling_changed(bool state); + private: void get_scroll_layout(double &length, double &offset) const; @@ -269,6 +278,8 @@ private Q_SLOTS: void signals_changed(); void data_updated(); + void perform_delayed_view_update(); + void process_sticky_events(); void on_hover_point_changed(); @@ -287,6 +298,8 @@ private: double offset_; bool updating_scroll_; + bool sticky_scrolling_; + QTimer delayed_view_updater_; double tick_period_; unsigned int tick_prefix_;