X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fview.hpp;h=2fff8d2559d34e88e65648f76c7613b79b88d92f;hb=4c7a19d3d7049bcc9fb3185ce2bc91333a7ca9e1;hp=ce89a6bc55abb3c37921311e83d3757c31590f3b;hpb=5ed05b699e5367bae21828f533e3d169b9bab348;p=pulseview.git diff --git a/pv/view/view.hpp b/pv/view/view.hpp index ce89a6b..2fff8d2 100644 --- a/pv/view/view.hpp +++ b/pv/view/view.hpp @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -70,13 +71,12 @@ class Trace; class Viewport; class TriggerMarker; -class CustomAbstractScrollArea : public QAbstractScrollArea +class CustomScrollArea : public QAbstractScrollArea { Q_OBJECT public: - CustomAbstractScrollArea(QWidget *parent = nullptr); - void setViewportMargins(int left, int top, int right, int bottom); + CustomScrollArea(QWidget *parent = nullptr); bool viewportEvent(QEvent *event); }; @@ -315,12 +315,18 @@ private: */ void calculate_tick_spacing(); + void adjust_top_margin(); + void update_scroll(); void reset_scroll(); void set_scroll_default(); + bool header_was_shrunk() const; + + void expand_header_to_fit(); + void update_layout(); TraceTreeItemOwner* find_prevalent_trace_group( @@ -349,6 +355,8 @@ public: private Q_SLOTS: + void on_splitter_moved(); + void h_scroll_value_changed(int value); void v_scroll_value_changed(); @@ -398,9 +406,11 @@ private Q_SLOTS: void set_time_unit(pv::util::TimeUnit time_unit); private: + CustomScrollArea *scrollarea_; Viewport *viewport_; Ruler *ruler_; Header *header_; + QSplitter *splitter_; unordered_set< shared_ptr > signals_; @@ -408,8 +418,6 @@ private: vector< shared_ptr > decode_traces_; #endif - CustomAbstractScrollArea scrollarea_; - /// The view time scale in seconds per pixel. double scale_; @@ -417,6 +425,8 @@ private: pv::util::Timestamp offset_; bool updating_scroll_; + bool settings_restored_; + bool sticky_scrolling_; bool coloured_bg_; bool always_zoom_to_fit_; @@ -444,8 +454,6 @@ private: // A nonzero value indicates the v offset to restore. See View::resizeEvent() int saved_v_offset_; - - bool size_finalized_; }; } // namespace TraceView