]> sigrok.org Git - pulseview.git/blobdiff - pv/view/view.hpp
TraceView: Improve the way we do the initial scrolling setup
[pulseview.git] / pv / view / view.hpp
index 08b8a37e51498db342eb82d5ce1ab4b67e4b884e..1819ffddaba08873b30b10d23a900beed0001189 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <QAbstractScrollArea>
 #include <QSizeF>
-#include <QTimer>
 
 #include <pv/data/signaldata.hpp>
 #include <pv/util.hpp>
@@ -54,6 +53,10 @@ namespace pv {
 
 class Session;
 
+namespace data {
+class Logic;
+}
+
 namespace views {
 
 namespace TraceView {
@@ -92,7 +95,6 @@ private:
        static const pv::util::Timestamp MinScale;
 
        static const int MaxScrollValue;
-       static const int MaxViewAutoUpdateRate;
 
        static const int ScaleUnits[3];
 
@@ -109,7 +111,7 @@ public:
 
        virtual void clear_signals();
 
-       virtual void add_signal(const shared_ptr<Signal> signal);
+       void add_signal(const shared_ptr<Signal> signal);
 
 #ifdef ENABLE_DECODE
        virtual void clear_decode_signals();
@@ -212,6 +214,11 @@ public:
         */
        void enable_coloured_bg(bool state);
 
+       /**
+        * Returns true if the trace background should be drawn with a coloured background.
+        */
+       bool coloured_bg() const;
+
        /**
         * Enable or disable showing sampling points.
         */
@@ -347,9 +354,8 @@ private Q_SLOTS:
 
        void signals_changed();
        void capture_state_updated(int state);
-       void data_updated();
 
-       void perform_delayed_view_update();
+       virtual void perform_delayed_view_update();
 
        void process_sticky_events();
 
@@ -414,7 +420,6 @@ private:
        bool sticky_scrolling_;
        bool coloured_bg_;
        bool always_zoom_to_fit_;
-       QTimer delayed_view_updater_;
 
        pv::util::Timestamp tick_period_;
        pv::util::SIPrefix tick_prefix_;
@@ -439,8 +444,6 @@ private:
 
        // A nonzero value indicates the v offset to restore. See View::resizeEvent()
        int saved_v_offset_;
-
-       bool size_finalized_;
 };
 
 } // namespace TraceView