|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef QSTMGESTUREDEFS_H_ |
|
20 #define QSTMGESTUREDEFS_H_ |
|
21 #include <QtCore/qglobal.h> |
|
22 |
|
23 |
|
24 #ifdef QSTMGESTURELIB |
|
25 # define QSTMGESTURELIB_EXPORT Q_DECL_EXPORT |
|
26 #else |
|
27 # define QSTMGESTURELIB_EXPORT Q_DECL_IMPORT |
|
28 #endif |
|
29 |
|
30 |
|
31 namespace qstmUiEventEngine |
|
32 { |
|
33 |
|
34 // time to hold the stylus in the same position to activate holding |
|
35 const int KHoldDuration = 500; // ms |
|
36 |
|
37 // time to tap again for the second tap to be a double tap |
|
38 const int KMaxDoubleTapDuration = 400; // ms |
|
39 |
|
40 // time in which speed becomes zero if user stops stylus movement before |
|
41 // lifting the pointer |
|
42 const int KSpeedStopTime = 150; // ms |
|
43 |
|
44 // tolerance in degrees to either side of an angle, for direction to be the |
|
45 // same as reference angle |
|
46 const qreal KAngleTolerance = 25; |
|
47 |
|
48 // Nth pointer event before the latest point |
|
49 const int KPreviousPointOffset = 3; |
|
50 |
|
51 // Tolerance for ignoring small movements, percent of longer screen edge |
|
52 const int KGestureTolerancePercent = 2; // of 100 |
|
53 |
|
54 const int KFingerSize_mm = 8; |
|
55 |
|
56 const int KTwipsInInch = 1440; |
|
57 |
|
58 const qreal KTwipsInMm = 56.7; |
|
59 |
|
60 const int KMaxTapDuration = 300; //ms |
|
61 |
|
62 const int KFlickSpeed = 500; |
|
63 |
|
64 const int KDoubleTapMaxActivationInterval = 500; // 500 ms |
|
65 |
|
66 const int KDoubleTapMinActivationInterval = 40; // 40 ms |
|
67 |
|
68 const int KDoubleTapIdleInterval = 700; // 700 ms, to prevent triple-tap effects |
|
69 |
|
70 const int KLongTapDuration = 2000; //2 sec |
|
71 |
|
72 const int KMinTimeBetweenDrags = 20; // 20 ms |
|
73 |
|
74 } |
|
75 #endif /* QSTMGESTUREDEFS_H_ */ |