]> sigrok.org Git - pulseview.git/blobdiff - pv/view/view.h
Make header width responsive to label text
[pulseview.git] / pv / view / view.h
index dce8c252aff968f2c110eaa9e39de5eed16e7672..886aa8302adc4259e44b04d43aec6b3d7e8689cc 100644 (file)
@@ -51,7 +51,6 @@ private:
        static const double MaxScale;
        static const double MinScale;
 
-       static const int LabelMarginWidth;
        static const int RulerHeight;
 
        static const int MaxScrollValue;
@@ -86,6 +85,10 @@ public:
        void zoom(double steps);
        void zoom(double steps, int offset);
 
+       void zoom_fit();
+
+       void zoom_one_to_one();
+
        /**
         * Sets the scale and offset.
         * @param scale The new view scale in seconds per pixel.
@@ -126,6 +129,8 @@ public:
 
        void normalize_layout();
 
+       void update_viewport();
+
 signals:
        void hover_point_changed();
 
@@ -133,11 +138,17 @@ signals:
 
        void selection_changed();
 
+       void scale_offset_changed();
+
 private:
        void get_scroll_layout(double &length, double &offset) const;
        
+       void set_zoom(double scale, int offset);
+
        void update_scroll();
 
+       void update_layout();
+
        static bool compare_trace_v_offsets(
                const boost::shared_ptr<pv::view::Trace> &a,
                const boost::shared_ptr<pv::view::Trace> &b);
@@ -161,6 +172,8 @@ private slots:
 
        void on_signals_moved();
 
+       void on_geometry_updated();
+
 private:
        SigSession &_session;