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
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
4
#ifndef QQUICKFLICKABLEBEHAVIOR_H
5
#define QQUICKFLICKABLEBEHAVIOR_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
/* ### Platform specific flickable mechanics are defined either here, or in
19
mkspec files. Long-term (QtQuick 3) Flickable needs to allow such
20
mechanic details to be controlled via QML so that platforms can easily
21
load custom behavior at QML compile time.
22
*/
23
24
// The maximum number of pixels a flick can overshoot
25
#ifndef QML_FLICK_OVERSHOOT
26
#define QML_FLICK_OVERSHOOT 150
27
#endif
28
29
// The number of samples to use in calculating the velocity of a flick
30
#ifndef QML_FLICK_SAMPLEBUFFER
31
#define QML_FLICK_SAMPLEBUFFER 3
32
#endif
33
34
// The number of samples to discard when calculating the flick velocity.
35
// Touch panels often produce inaccurate results as the finger is lifted.
36
#ifndef QML_FLICK_DISCARDSAMPLES
37
#define QML_FLICK_DISCARDSAMPLES 0
38
#endif
39
40
// How much faster to decelerate when overshooting
41
#ifndef QML_FLICK_OVERSHOOTFRICTION
42
#define QML_FLICK_OVERSHOOTFRICTION 8
43
#endif
44
45
// Multiflick acceleration minimum flick velocity threshold
46
#ifndef QML_FLICK_MULTIFLICK_THRESHOLD
47
#define QML_FLICK_MULTIFLICK_THRESHOLD 1250
48
#endif
49
50
// If the time (ms) between the last move and the release exceeds this, then velocity will be zero.
51
#ifndef QML_FLICK_VELOCITY_DECAY_TIME
52
#define QML_FLICK_VELOCITY_DECAY_TIME 50
53
#endif
54
55
// Multiflick acceleration minimum contentSize/viewSize ratio
56
#ifndef QML_FLICK_MULTIFLICK_RATIO
57
#define QML_FLICK_MULTIFLICK_RATIO 10
58
#endif
59
60
// Multiflick acceleration maximum velocity multiplier
61
#ifndef QML_FLICK_MULTIFLICK_MAXBOOST
62
#define QML_FLICK_MULTIFLICK_MAXBOOST 3.0
63
#endif
64
65
// Really slow flicks can be annoying.
66
const
qreal
_q_MinimumFlickVelocity
= 75.0;
67
68
// If QQuickFlickablePrivate::wheelDeceleration (perhaps overridden via QT_QUICK_FLICKABLE_WHEEL_DECELERATION)
69
// is greater than this, we switch to proportional wheel scrolling: no "acceleration" at all.
70
const
qreal
_q_MaximumWheelDeceleration
= 14999;
71
72
#endif
//QQUICKFLICKABLEBEHAVIOR_H
_q_MaximumWheelDeceleration
const qreal _q_MaximumWheelDeceleration
Definition
qquickflickablebehavior_p.h:70
_q_MinimumFlickVelocity
const qreal _q_MinimumFlickVelocity
Definition
qquickflickablebehavior_p.h:66
qreal
double qreal
Definition
qtypes.h:187
qtdeclarative
src
quick
items
qquickflickablebehavior_p.h
Generated by
1.10.0