]> sigrok.org Git - pulseview.git/commitdiff
View: Added set_v_offset
authorJoel Holdsworth <redacted>
Tue, 30 Dec 2014 14:21:24 +0000 (14:21 +0000)
committerJoel Holdsworth <redacted>
Tue, 30 Dec 2014 14:24:39 +0000 (14:24 +0000)
pv/view/view.cpp
pv/view/view.hpp

index 5e89397aec8e5e71c7732bd7e27faedadb20f40d..c09609ac65d49daa9a9ad8988ff805f84cc39a6f 100644 (file)
@@ -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;
index 2e8aebb4c1e80d237dbbf1d1c0a4548a3dbaf11c..74a5c3755c6fb4437ef8b9b815091d0cf2d0cbc8 100644 (file)
@@ -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.
         */