Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickdial_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKDIAL_P_H
5#define QQUICKDIAL_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qvariant.h>
19#include <QtQml/qqmlcomponent.h>
20#include <QtQuickTemplates2/private/qquickcontrol_p.h>
21
23
24class QQuickDialAttached;
26
27class Q_QUICKTEMPLATES2_EXPORT QQuickDial : public QQuickControl
28{
30 Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged FINAL)
31 Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged FINAL)
32 Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged FINAL)
33 Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL)
34 Q_PROPERTY(qreal angle READ angle NOTIFY angleChanged FINAL)
35 Q_PROPERTY(qreal startAngle READ startAngle WRITE setStartAngle NOTIFY startAngleChanged FINAL REVISION(6, 6))
36 Q_PROPERTY(qreal endAngle READ endAngle WRITE setEndAngle NOTIFY endAngleChanged FINAL REVISION(6, 6))
37 Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL)
38 Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL)
39 Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged FINAL)
40 Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL)
41 Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
42 // 2.2 (Qt 5.9)
43 Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2))
44 // 2.5 (Qt 5.12)
45 Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode NOTIFY inputModeChanged FINAL REVISION(2, 5))
46 Q_CLASSINFO("DeferredPropertyNames", "background,handle")
49
50public:
51 explicit QQuickDial(QQuickItem *parent = nullptr);
52
53 qreal from() const;
54 void setFrom(qreal from);
55
56 qreal to() const;
57 void setTo(qreal to);
58
59 qreal value() const;
60 void setValue(qreal value);
61
62 qreal position() const;
63
64 qreal angle() const;
65
66 qreal stepSize() const;
67 void setStepSize(qreal step);
68
69 qreal startAngle() const;
70 void setStartAngle(qreal startAngle);
71
72 qreal endAngle() const;
73 void setEndAngle(qreal endAngle);
74
75 enum SnapMode {
78 SnapOnRelease
79 };
80 Q_ENUM(SnapMode)
81
82 SnapMode snapMode() const;
83 void setSnapMode(SnapMode mode);
84
90 Q_ENUM(InputMode)
91
96 Q_ENUM(WrapDirection)
97
98 bool wrap() const;
99 void setWrap(bool wrap);
100
101 bool isPressed() const;
102 void setPressed(bool pressed);
103
104 QQuickItem *handle() const;
105 void setHandle(QQuickItem *handle);
106
107 // 2.2 (Qt 5.9)
108 bool live() const;
109 void setLive(bool live);
110
111 // 2.5 (Qt 5.12)
112 InputMode inputMode() const;
113 void setInputMode(InputMode mode);
114
115public Q_SLOTS:
116 void increase();
117 void decrease();
118
121 void toChanged();
130 // 2.2 (Qt 5.9)
131 Q_REVISION(2, 2) void moved();
132 Q_REVISION(2, 2) void liveChanged();
133 // 2.5 (Qt 5.12)
134 Q_REVISION(2, 5) void inputModeChanged();
135 Q_REVISION(6, 6) void startAngleChanged();
136 Q_REVISION(6, 6) void endAngleChanged();
137 Q_REVISION(6, 6) void wrapped(WrapDirection);
138
139protected:
140 void keyPressEvent(QKeyEvent *event) override;
141 void keyReleaseEvent(QKeyEvent *event) override;
142 void mousePressEvent(QMouseEvent *event) override;
143#if QT_CONFIG(quicktemplates2_multitouch)
144 void touchEvent(QTouchEvent *event) override;
145#endif
146#if QT_CONFIG(wheelevent)
147 void wheelEvent(QWheelEvent *event) override;
148#endif
149
150 void mirrorChange() override;
151 void componentComplete() override;
152
153#if QT_CONFIG(accessibility)
154 void accessibilityActiveChanged(bool active) override;
155 QAccessible::Role accessibleRole() const override;
156#endif
157
158private:
159 Q_DISABLE_COPY(QQuickDial)
160 Q_DECLARE_PRIVATE(QQuickDial)
161};
162
164
165#endif // QQUICKDIAL_P_H
The QKeyEvent class describes a key event.
Definition qevent.h:424
\inmodule QtGui
Definition qevent.h:196
void valueChanged()
void stepSizeChanged()
void snapModeChanged()
void positionChanged()
Q_REVISION(2, 2) void moved()
void wrapChanged()
void angleChanged()
void pressedChanged()
void toChanged()
void fromChanged()
void handleChanged()
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint64 GLenum void * handle
GLenum mode
GLfloat angle
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static QT_BEGIN_NAMESPACE QAsn1Element wrap(quint8 type, const QAsn1Element &child)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_CLASSINFO(name, value)
#define Q_SLOTS
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
#define explicit
settings setValue("DataPump/bgcolor", color)