diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-02-17 10:46:31 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-02-18 07:34:46 -0800 |
commit | 51100cb20e52d8d0d065d0cc49b28f432b3c151a (patch) | |
tree | 2f37817abdb7c01adb6f58ed1b9f477546b6b7e3 /profile-widget/qmlprofile.h | |
parent | 31afa976f3a6425b0cf8cdc77978c4156b726304 (diff) | |
download | subsurface-51100cb20e52d8d0d065d0cc49b28f432b3c151a.tar.gz |
mobile/profile: add x/y offsets to widget
This will allow us to pan the profile around in the QML UI.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget/qmlprofile.h')
-rw-r--r-- | profile-widget/qmlprofile.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/profile-widget/qmlprofile.h b/profile-widget/qmlprofile.h index 6074fb846..2798fa733 100644 --- a/profile-widget/qmlprofile.h +++ b/profile-widget/qmlprofile.h @@ -10,6 +10,8 @@ class QMLProfile : public QQuickPaintedItem Q_OBJECT Q_PROPERTY(int diveId MEMBER m_diveId WRITE setDiveId) Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio NOTIFY devicePixelRatioChanged) + Q_PROPERTY(qreal xOffset MEMBER m_xOffset WRITE setXOffset NOTIFY xOffsetChanged) + Q_PROPERTY(qreal yOffset MEMBER m_yOffset WRITE setYOffset NOTIFY yOffsetChanged) public: explicit QMLProfile(QQuickItem *parent = 0); @@ -30,12 +32,15 @@ private: int m_diveId; qreal m_devicePixelRatio; int m_margin; + qreal m_xOffset, m_yOffset; QScopedPointer<ProfileWidget2> m_profileWidget; void updateProfile(); signals: void rightAlignedChanged(); void devicePixelRatioChanged(); + void xOffsetChanged(); + void yOffsetChanged(); }; #endif // QMLPROFILE_H |