projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Session: Removed signals_mutex(), and made signals() return a copy not a reference
[pulseview.git]
/
pv
/
view
/
viewitempaintparams.hpp
diff --git
a/pv/view/viewitempaintparams.hpp
b/pv/view/viewitempaintparams.hpp
index a8b519067250976ff0990a510d93a5f2bca6df72..bba0d70e6fe72759a7742ba2728db482a798aa97 100644
(file)
--- a/
pv/view/viewitempaintparams.hpp
+++ b/
pv/view/viewitempaintparams.hpp
@@
-18,10
+18,13
@@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* 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 <QFont>
+#include <QRect>
namespace pv {
namespace view {
namespace pv {
namespace view {
@@
-29,7
+32,8
@@
namespace view {
class ViewItemPaintParams
{
public:
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_;
QRect rect() const {
return rect_;
@@
-39,7
+43,7
@@
public:
return scale_;
}
return scale_;
}
-
double
offset() const {
+
const pv::util::Timestamp&
offset() const {
return offset_;
}
return offset_;
}
@@
-64,11
+68,11
@@
public:
}
int height() const {
}
int height() const {
- return rect_.
width
();
+ return rect_.
height
();
}
double pixels_offset() const {
}
double pixels_offset() const {
- return
offset_ / scale_
;
+ return
(offset_ / scale_).convert_to<double>()
;
}
public:
}
public:
@@
-79,10
+83,10
@@
public:
private:
QRect rect_;
double scale_;
private:
QRect rect_;
double scale_;
-
double
offset_;
+
pv::util::Timestamp
offset_;
};
} // namespace view
} // namespace pv
};
} // namespace view
} // namespace pv
-#endif // PULSEVIEW_PV_VIEW_
ROWITEMPAINTPARAMS_H
+#endif // PULSEVIEW_PV_VIEW_
VIEWITEMPAINTPARAMS_HPP