diff options
author | Arseniy-Movshev <dodoradio@outlook.com> | 2023-05-30 17:11:41 +0100 |
---|---|---|
committer | Arseniy-Movshev <dodoradio@outlook.com> | 2023-05-30 22:16:43 +0100 |
commit | b6fbad69c827f26ae1f133236360a1285e8aa6c4 (patch) | |
tree | 1abfec691ce1a90eff7eb30751ca608723261826 /qmlplugin/hrGraph.h | |
parent | 3a6688f5dba3cb8b22180f53ec4e6c7f3b4f57af (diff) |
Add some useful properties to hrgraph
Diffstat (limited to 'qmlplugin/hrGraph.h')
-rw-r--r-- | qmlplugin/hrGraph.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qmlplugin/hrGraph.h b/qmlplugin/hrGraph.h index 55f4219..5811689 100644 --- a/qmlplugin/hrGraph.h +++ b/qmlplugin/hrGraph.h @@ -41,6 +41,11 @@ class HrGraph : public QQuickPaintedItem Q_PROPERTY(float lineWidth READ lineWidth WRITE setLineWidth) Q_PROPERTY(QColor lineColor READ lineColor WRITE setLineColor NOTIFY lineColorChanged) + Q_PROPERTY(int maxValue READ getMaxHrValue NOTIFY loadingDone) + Q_PROPERTY(int minValue READ getMinHrValue NOTIFY loadingDone) + Q_PROPERTY(QDateTime maxTime READ getMaxTime NOTIFY loadingDone) + Q_PROPERTY(QDateTime minTime READ getMinTime NOTIFY loadingDone) + Q_PROPERTY(bool relativeMode READ relative WRITE setRelative) struct HrDatapoint { qint64 time; @@ -60,6 +65,12 @@ public slots: void setLineWidth(float width); QColor lineColor(); void setLineColor(QColor color); + int getMaxHrValue(); + int getMinHrValue(); + QDateTime getMaxTime(); + QDateTime getMinTime(); + bool relative(); + void setRelative(bool newRelative); private: void updateBasePixmap(); @@ -74,6 +85,7 @@ private: int maxHrValue = 0; int minTime; int maxTime; + bool graphRelative; }; #endif // ICON_H |