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_P_P_H
5#define QQUICKWHEELHANDLER_P_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 "qquicksinglepointhandler_p_p.h"
19#include "qquickwheelhandler_p.h"
20#include <QtCore/qbasictimer.h>
21
22QT_BEGIN_NAMESPACE
23
24class Q_QUICK_PRIVATE_EXPORT QQuickWheelHandlerPrivate : public QQuickSinglePointHandlerPrivate
25{
26 Q_DECLARE_PUBLIC(QQuickWheelHandler)
27
28public:
29 static QQuickWheelHandlerPrivate* get(QQuickWheelHandler *q) { return q->d_func(); }
30 static const QQuickWheelHandlerPrivate* get(const QQuickWheelHandler *q) { return q->d_func(); }
31
32 QQuickWheelHandlerPrivate();
33
34 QMetaProperty &targetMetaProperty() const;
35
36 QBasicTimer deactivationTimer;
37 qreal activeTimeout = 0.1;
38 qreal rotationScale = 1;
39 qreal rotation = 0; // in units of degrees
40 qreal targetScaleMultiplier = 1.25992104989487; // qPow(2, 1/3)
41 QString propertyName;
42 mutable QMetaProperty metaProperty;
43 Qt::Orientation orientation = Qt::Vertical;
44 mutable bool metaPropertyDirty = true;
45 bool invertible = true;
46 bool targetTransformAroundCursor = true;
47 bool blocking = true;
48 QQuickWheelEvent wheelEvent;
49};
50
51QT_END_NAMESPACE
52
53#endif // QQUICKWHEELHANDLER_P_P_H
54

source code of qtdeclarative/src/quick/handlers/qquickwheelhandler_p_p.h