projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CursorPair: Derived from TimeItem
[pulseview.git]
/
pv
/
view
/
rowitempaintparams.hpp
diff --git
a/pv/view/rowitempaintparams.hpp
b/pv/view/rowitempaintparams.hpp
index 062b3cdd5db2a6b8ca1cdff872e224edbcc34600..ec66076b8860476644fabf6733b3ee2258d1cef1 100644
(file)
--- a/
pv/view/rowitempaintparams.hpp
+++ b/
pv/view/rowitempaintparams.hpp
@@
-21,13
+21,15
@@
#ifndef PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
#define PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
#ifndef PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
#define PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
+#include <QFont>
+
namespace pv {
namespace view {
class RowItemPaintParams
{
public:
namespace pv {
namespace view {
class RowItemPaintParams
{
public:
- RowItemPaintParams(int left, int right);
+ RowItemPaintParams(int left, int right
, double scale, double offset
);
int left() const {
return left_;
int left() const {
return left_;
@@
-37,13
+39,32
@@
public:
return right_;
}
return right_;
}
+ double scale() const {
+ return scale_;
+ }
+
+ double offset() const {
+ return offset_;
+ }
+
int width() const {
return right_ - left_;
}
int width() const {
return right_ - left_;
}
+ double pixels_offset() const {
+ return offset_ / scale_;
+ }
+
+public:
+ static QFont font();
+
+ static int text_height();
+
private:
int left_;
int right_;
private:
int left_;
int right_;
+ double scale_;
+ double offset_;
};
} // namespace view
};
} // namespace view