equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Defines a gesture that can be added to a gesture filter. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HB_GESTURE_H |
|
20 #define HB_GESTURE_H |
|
21 |
|
22 #include <QObject> |
|
23 #include <QPointF> |
|
24 |
|
25 class HbGesture; |
|
26 class HbGesturePrivate; |
|
27 |
|
28 class HbGesture : public QObject |
|
29 { |
|
30 |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Direction of the gesture. |
|
35 */ |
|
36 enum Direction |
|
37 { |
|
38 /* empty gesture */ |
|
39 none=0, |
|
40 /** Left */ |
|
41 left= 0x0000001, |
|
42 /** Right */ |
|
43 right= 0x0000002, |
|
44 /** Up */ |
|
45 up= 0x0000004, |
|
46 /** Down */ |
|
47 down= 0x0000008, |
|
48 /** Pan */ |
|
49 pan= 0x0000010, |
|
50 /** Longpress */ |
|
51 longpress= 0x0000020 |
|
52 }; |
|
53 |
|
54 /* |
|
55 * Defines that the default minimum pixel distance should be used for the gesture. |
|
56 * The actual amount of pixels might vary based on the screen resolution. |
|
57 */ |
|
58 static const int HbGestureDefaultMinDistance = -1; |
|
59 |
|
60 public: |
|
61 |
|
62 explicit HbGesture( Direction direction, |
|
63 int minDistance = HbGestureDefaultMinDistance, |
|
64 QObject *parent = 0 ); |
|
65 |
|
66 virtual ~HbGesture(); |
|
67 |
|
68 signals: |
|
69 |
|
70 void longPress( QPointF delta ); |
|
71 |
|
72 }; |
|
73 |
|
74 #endif // HB_GESTURE_H |