* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
-#define PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
+#ifndef PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP
+#define PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP
+
+#include "pv/util.hpp"
#include <QFont>
+#include <QRect>
namespace pv {
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_;
return scale_;
}
- double offset() const {
+ const pv::util::Timestamp& offset() const {
return offset_;
}
}
double pixels_offset() const {
- return offset_ / scale_;
+ return (offset_ / scale_).convert_to<double>();
}
public:
private:
QRect rect_;
double scale_;
- double offset_;
+ pv::util::Timestamp offset_;
};
} // namespace view
} // namespace pv
-#endif // PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
+#endif // PULSEVIEW_PV_VIEW_VIEWITEMPAINTPARAMS_HPP