From: Joel Holdsworth Date: Sun, 28 Oct 2012 17:33:21 +0000 (+0000) Subject: Documented scale, offset, set_scale_offset, _scale and _offset in pv::view::View X-Git-Tag: pulseview-0.1.0~232 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e2f5223b74da179688de92146a2716209b42bdb0;p=pulseview.git Documented scale, offset, set_scale_offset, _scale and _offset in pv::view::View --- diff --git a/pv/view/view.h b/pv/view/view.h index 6e5710fe..ac2835a4 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -55,13 +55,26 @@ public: SigSession& session(); + /** + * Returns the view time scale in seconds per pixel. + */ double scale() const; + + /** + * Returns the time offset of the left edge of the view in + * seconds. + */ double offset() const; int v_offset() const; void zoom(double steps); void zoom(double steps, int offset); + /** + * Sets the scale and offset. + * @param scale The new view scale in seconds per pixel. + * @param offset The view time offset in seconds. + */ void set_scale_offset(double scale, double offset); const QPoint& hover_point() const; @@ -97,7 +110,10 @@ private: uint64_t _data_length; + /// The view time scale in seconds per pixel. double _scale; + + /// The view time offset in seconds. double _offset; int _v_offset;