@@ -20,6 +20,7 @@ class BlockClockDial : public QQuickPaintedItem
20
20
Q_PROPERTY (bool synced READ synced WRITE setSynced)
21
21
Q_PROPERTY (bool paused READ paused WRITE setPaused)
22
22
Q_PROPERTY (qreal penWidth READ penWidth WRITE setPenWidth)
23
+ Q_PROPERTY (qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
23
24
Q_PROPERTY (QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
24
25
Q_PROPERTY (QList<QColor> confirmationColors READ confirmationColors WRITE setConfirmationColors )
25
26
Q_PROPERTY (QColor timeTickColor READ timeTickColor WRITE setTimeTickColor)
@@ -34,6 +35,7 @@ class BlockClockDial : public QQuickPaintedItem
34
35
bool synced () const { return m_is_synced; };
35
36
bool paused () const { return m_is_paused; };
36
37
qreal penWidth () const { return m_pen_width; };
38
+ qreal scale () const { return m_scale; };
37
39
QColor backgroundColor () const { return m_background_color; };
38
40
QList<QColor> confirmationColors () const { return m_confirmation_colors; };
39
41
QColor timeTickColor () const { return m_time_tick_color; };
@@ -45,10 +47,14 @@ public Q_SLOTS:
45
47
void setSynced (bool synced);
46
48
void setPaused (bool paused);
47
49
void setPenWidth (qreal width);
50
+ void setScale (qreal scale);
48
51
void setBackgroundColor (QColor color);
49
52
void setConfirmationColors (QList<QColor> colorList);
50
53
void setTimeTickColor (QColor color);
51
54
55
+ Q_SIGNALS:
56
+ void scaleChanged ();
57
+
52
58
private:
53
59
void paintConnectingAnimation (QPainter * painter);
54
60
void paintProgress (QPainter * painter);
@@ -68,6 +74,7 @@ public Q_SLOTS:
68
74
bool m_is_synced;
69
75
bool m_is_paused;
70
76
qreal m_pen_width;
77
+ qreal m_scale;
71
78
QColor m_background_color;
72
79
QConicalGradient m_connecting_gradient;
73
80
qreal m_connecting_start_angle = 90 ;
0 commit comments