Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickflickablebehavior_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 Research In Motion.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQUICKFLICKABLEBEHAVIOR_H
6#define QQUICKFLICKABLEBEHAVIOR_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19/* ### Platform specific flickable mechanics are defined either here, or in
20 mkspec files. Long-term (QtQuick 3) Flickable needs to allow such
21 mechanic details to be controlled via QML so that platforms can easily
22 load custom behavior at QML compile time.
23*/
24
25// The maximum number of pixels a flick can overshoot
26#ifndef QML_FLICK_OVERSHOOT
27#define QML_FLICK_OVERSHOOT 150
28#endif
29
30// The number of samples to use in calculating the velocity of a flick
31#ifndef QML_FLICK_SAMPLEBUFFER
32#define QML_FLICK_SAMPLEBUFFER 3
33#endif
34
35// The number of samples to discard when calculating the flick velocity.
36// Touch panels often produce inaccurate results as the finger is lifted.
37#ifndef QML_FLICK_DISCARDSAMPLES
38#define QML_FLICK_DISCARDSAMPLES 0
39#endif
40
41// How much faster to decelerate when overshooting
42#ifndef QML_FLICK_OVERSHOOTFRICTION
43#define QML_FLICK_OVERSHOOTFRICTION 8
44#endif
45
46// Multiflick acceleration minimum flick velocity threshold
47#ifndef QML_FLICK_MULTIFLICK_THRESHOLD
48#define QML_FLICK_MULTIFLICK_THRESHOLD 1250
49#endif
50
51// If the time (ms) between the last move and the release exceeds this, then velocity will be zero.
52#ifndef QML_FLICK_VELOCITY_DECAY_TIME
53#define QML_FLICK_VELOCITY_DECAY_TIME 50
54#endif
55
56// Multiflick acceleration minimum contentSize/viewSize ratio
57#ifndef QML_FLICK_MULTIFLICK_RATIO
58#define QML_FLICK_MULTIFLICK_RATIO 10
59#endif
60
61// Multiflick acceleration maximum velocity multiplier
62#ifndef QML_FLICK_MULTIFLICK_MAXBOOST
63#define QML_FLICK_MULTIFLICK_MAXBOOST 3.0
64#endif
65
66// Really slow flicks can be annoying.
67const qreal _q_MinimumFlickVelocity = 75.0;
68
69// If QQuickFlickablePrivate::wheelDeceleration (perhaps overridden via QT_QUICK_FLICKABLE_WHEEL_DECELERATION)
70// is greater than this, we switch to proportional wheel scrolling: no "acceleration" at all.
72
73#endif //QQUICKFLICKABLEBEHAVIOR_H
bool contains(const QPointF &point) const override
bool startTransition(QQuickFlickablePrivate::AxisData *data, qreal toPos)
QQuickFlickableReboundTransition(QQuickFlickable *f, const QString &name)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
Q_STATIC_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core")
static bool fuzzyLessThanOrEqualTo(qreal a, qreal b)
static qreal EaseOvershoot(qreal t)
const qreal _q_MaximumWheelDeceleration
#define QML_FLICK_SAMPLEBUFFER
#define QML_FLICK_OVERSHOOT
#define QML_FLICK_MULTIFLICK_MAXBOOST
#define QML_FLICK_MULTIFLICK_THRESHOLD
#define QML_FLICK_OVERSHOOTFRICTION
#define QML_FLICK_DISCARDSAMPLES
#define QML_FLICK_MULTIFLICK_RATIO
QDebug Q_QUICK_EXPORT operator<<(QDebug debug, const QQuickWindow *item)