mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
31afa976f3
commit
51100cb20e
2 changed files with 30 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue