5#include "qml_material/input/time_state.hpp"
6#include "qml_material/input/input_host.hpp"
10class QML_MATERIAL_API TimeDial :
public QQuickItem {
14 Q_PROPERTY(qreal handAngle READ handAngle NOTIFY metricsChanged FINAL)
15 Q_PROPERTY(qreal handLength READ handLength NOTIFY metricsChanged FINAL)
16 Q_PROPERTY(QVariantList labels READ labels NOTIFY metricsChanged FINAL)
17 Q_PROPERTY(InteractionSource* interactionSource READ interactionSource WRITE
18 setInteractionSource NOTIFY interactionSourceChanged FINAL)
20 explicit TimeDial(QQuickItem* parent =
nullptr);
22 TimeState* time()
const {
return m_time; }
23 void setTime(TimeState*);
24 qreal handAngle()
const;
25 qreal handLength()
const;
26 QVariantList labels()
const;
27 InteractionSource* interactionSource() {
return m_input.source(); }
28 void setInteractionSource(InteractionSource* source) { m_input.setSource(source); }
29 Q_SIGNAL
void timeChanged();
30 Q_SIGNAL
void metricsChanged();
31 Q_SIGNAL
void interactionSourceChanged();
34 void geometryChange(
const QRectF&,
const QRectF&)
override;
35 bool event(QEvent*)
override;
36 void touchUngrabEvent()
override;
37 void mouseUngrabEvent()
override;
38 void keyPressEvent(QKeyEvent*)
override;
42 void update(
const QPointF&,
bool tap);
43 void select(
int value,
bool complete);
45 QPointer<TimeState> m_time;
46 QMetaObject::Connection m_changed, m_destroyed;
47 bool m_updating =
false;
48 quint64 m_revision = 0;
Definition time_state.hpp:13