Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qquickwheelhandler_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 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 QQUICKWHEELHANDLER_H
5#define QQUICKWHEELHANDLER_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 <QtGui/qevent.h>
19#include <QtQuick/qquickitem.h>
20
22
24
27
28class Q_QUICK_PRIVATE_EXPORT QQuickWheelHandler : public QQuickSinglePointHandler
29{
31 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
32 Q_PROPERTY(bool invertible READ isInvertible WRITE setInvertible NOTIFY invertibleChanged FINAL)
33 Q_PROPERTY(qreal activeTimeout READ activeTimeout WRITE setActiveTimeout NOTIFY activeTimeoutChanged FINAL)
34 Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged FINAL)
35 Q_PROPERTY(qreal rotationScale READ rotationScale WRITE setRotationScale NOTIFY rotationScaleChanged FINAL)
36 Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged FINAL)
37 Q_PROPERTY(qreal targetScaleMultiplier READ targetScaleMultiplier WRITE setTargetScaleMultiplier NOTIFY targetScaleMultiplierChanged FINAL)
38 Q_PROPERTY(bool targetTransformAroundCursor READ isTargetTransformAroundCursor WRITE setTargetTransformAroundCursor NOTIFY targetTransformAroundCursorChanged FINAL)
39 Q_PROPERTY(bool blocking READ isBlocking WRITE setBlocking NOTIFY blockingChanged REVISION(6, 3) FINAL)
40
41 QML_NAMED_ELEMENT(WheelHandler)
43
44public:
45 explicit QQuickWheelHandler(QQuickItem *parent = nullptr);
46
47 Qt::Orientation orientation() const;
48 void setOrientation(Qt::Orientation orientation);
49
50 bool isInvertible() const;
51 void setInvertible(bool invertible);
52
53 qreal activeTimeout() const;
54 void setActiveTimeout(qreal timeout);
55
56 qreal rotation() const;
57 void setRotation(qreal rotation);
58
59 qreal rotationScale() const;
60 void setRotationScale(qreal rotationScale);
61
62 QString property() const;
63 void setProperty(const QString &name);
64
65 qreal targetScaleMultiplier() const;
66 void setTargetScaleMultiplier(qreal targetScaleMultiplier);
67
68 bool isTargetTransformAroundCursor() const;
69 void setTargetTransformAroundCursor(bool ttac);
70
71 bool isBlocking() const;
72 void setBlocking(bool blocking);
73
76
85 Q_REVISION(6, 3) void blockingChanged();
86
87protected:
88 bool wantsPointerEvent(QPointerEvent *event) override;
89 void handleEventPoint(QPointerEvent *event, QEventPoint &point) override;
90 void onTargetChanged(QQuickItem *oldTarget) override;
91 void onActiveChanged() override;
92 void timerEvent(QTimerEvent *event) override;
93
94 Q_DECLARE_PRIVATE(QQuickWheelHandler)
95};
96
98
99#endif // QQUICKWHEELHANDLER_H
The QEventPoint class provides information about a point in a QPointerEvent.
Definition qeventpoint.h:20
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
A base class for pointer events.
Definition qevent.h:73
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
\qmlproperty real QtQuick::MouseEvent::x \qmlproperty real QtQuick::MouseEvent::y
void activeTimeoutChanged()
void wheel(QQuickWheelEvent *event)
void targetTransformAroundCursorChanged()
void targetScaleMultiplierChanged()
Q_REVISION(6, 3) void blockingChanged()
void rotationScaleChanged()
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qcoreevent.h:359
object setProperty("down", true)
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:97
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
GLbitfield GLuint64 timeout
[4]
GLuint name
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
double qreal
Definition qtypes.h:92
const char property[13]
Definition qwizard.cpp:101
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent