X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fviewitempaintparams.hpp;h=87e9d0e63b5447a442f89d70ddbca5f5b6c29e4e;hb=3ed4af999487a1d7d851032b7a762bcda6e959cc;hp=86742ba7ceb811ec1e3642f7ee15e1776ac1e36e;hpb=7a01bd3654ed046216308fa64edfd79be7cd525f;p=pulseview.git diff --git a/pv/view/viewitempaintparams.hpp b/pv/view/viewitempaintparams.hpp index 86742ba..87e9d0e 100644 --- a/pv/view/viewitempaintparams.hpp +++ b/pv/view/viewitempaintparams.hpp @@ -18,8 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_HPP -#define PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_HPP +#ifndef PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP +#define PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP + +#include "pv/util.hpp" #include @@ -29,7 +31,8 @@ namespace view { class ViewItemPaintParams { public: - ViewItemPaintParams(const QRect &rect, double scale, double offset); + ViewItemPaintParams( + const QRect &rect, double scale, const pv::util::Timestamp& offset); QRect rect() const { return rect_; @@ -39,7 +42,7 @@ public: return scale_; } - double offset() const { + const pv::util::Timestamp& offset() const { return offset_; } @@ -68,7 +71,7 @@ public: } double pixels_offset() const { - return offset_ / scale_; + return (offset_ / scale_).convert_to(); } public: @@ -79,10 +82,10 @@ public: private: QRect rect_; double scale_; - double offset_; + pv::util::Timestamp offset_; }; } // namespace view } // namespace pv -#endif // PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_HPP +#endif // PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP