From: Joel Holdsworth Date: Tue, 30 Dec 2014 14:21:24 +0000 (+0000) Subject: View: Added set_v_offset X-Git-Tag: pulseview-0.3.0~285 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4d4766471d0900ea6e771be1354c21c5e745c1e6;p=pulseview.git View: Added set_v_offset --- diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 5e89397a..c09609ac 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -204,6 +204,13 @@ int View::owner_visual_v_offset() const return -verticalScrollBar()->sliderPosition(); } +void View::set_v_offset(int offset) +{ + verticalScrollBar()->setSliderPosition(offset); + header_->update(); + viewport_->update(); +} + unsigned int View::depth() const { return 0; diff --git a/pv/view/view.hpp b/pv/view/view.hpp index 2e8aebb4..74a5c375 100644 --- a/pv/view/view.hpp +++ b/pv/view/view.hpp @@ -108,6 +108,11 @@ public: */ int owner_visual_v_offset() const; + /** + * Sets the visual v-offset. + */ + void set_v_offset(int offset); + /** * Returns the SI prefix to apply to the graticule time markings. */