author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 19 Feb 2010 23:40:16 +0200 | |
branch | RCL_3 |
changeset 4 | 3b1da2848fc7 |
parent 3 | 41300fa6a67c |
child 33 | 3e2da88830cd |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the QtGui module of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#ifndef QEVENT_P_H |
|
43 |
#define QEVENT_P_H |
|
44 |
||
45 |
#include <QtCore/qglobal.h> |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
46 |
#include <QtCore/qurl.h> |
0 | 47 |
#include <QtGui/qevent.h> |
48 |
||
49 |
QT_BEGIN_NAMESPACE |
|
50 |
||
51 |
// |
|
52 |
// W A R N I N G |
|
53 |
// ------------- |
|
54 |
// |
|
55 |
// This file is not part of the Qt API. It exists purely as an |
|
56 |
// implementation detail. This header file may change from version to |
|
57 |
// version without notice, or even be removed. |
|
58 |
// |
|
59 |
// We mean it. |
|
60 |
// |
|
61 |
||
62 |
// ### Qt 5: remove |
|
63 |
class QKeyEventEx : public QKeyEvent |
|
64 |
{ |
|
65 |
public: |
|
66 |
QKeyEventEx(Type type, int key, Qt::KeyboardModifiers modifiers, |
|
67 |
const QString &text, bool autorep, ushort count, |
|
68 |
quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers); |
|
69 |
QKeyEventEx(const QKeyEventEx &other); |
|
70 |
||
71 |
~QKeyEventEx(); |
|
72 |
||
73 |
protected: |
|
74 |
quint32 nScanCode; |
|
75 |
quint32 nVirtualKey; |
|
76 |
quint32 nModifiers; |
|
77 |
friend class QKeyEvent; |
|
78 |
}; |
|
79 |
||
80 |
// ### Qt 5: remove |
|
81 |
class QMouseEventEx : public QMouseEvent |
|
82 |
{ |
|
83 |
public: |
|
84 |
QMouseEventEx(Type type, const QPointF &pos, const QPoint &globalPos, |
|
85 |
Qt::MouseButton button, Qt::MouseButtons buttons, |
|
86 |
Qt::KeyboardModifiers modifiers); |
|
87 |
~QMouseEventEx(); |
|
88 |
||
89 |
protected: |
|
90 |
QPointF posF; |
|
91 |
friend class QMouseEvent; |
|
92 |
}; |
|
93 |
||
94 |
class QTouchEventTouchPointPrivate |
|
95 |
{ |
|
96 |
public: |
|
97 |
inline QTouchEventTouchPointPrivate(int id) |
|
98 |
: ref(1), |
|
99 |
id(id), |
|
100 |
state(Qt::TouchPointReleased), |
|
101 |
pressure(qreal(-1.)) |
|
102 |
{ } |
|
103 |
||
104 |
inline QTouchEventTouchPointPrivate *detach() |
|
105 |
{ |
|
106 |
QTouchEventTouchPointPrivate *d = new QTouchEventTouchPointPrivate(*this); |
|
107 |
d->ref = 1; |
|
108 |
if (!this->ref.deref()) |
|
109 |
delete this; |
|
110 |
return d; |
|
111 |
} |
|
112 |
||
113 |
QAtomicInt ref; |
|
114 |
int id; |
|
115 |
Qt::TouchPointStates state; |
|
116 |
QRectF rect, sceneRect, screenRect; |
|
117 |
QPointF normalizedPos, |
|
118 |
startPos, startScenePos, startScreenPos, startNormalizedPos, |
|
119 |
lastPos, lastScenePos, lastScreenPos, lastNormalizedPos; |
|
120 |
qreal pressure; |
|
121 |
}; |
|
122 |
||
123 |
class QNativeGestureEvent : public QEvent |
|
124 |
{ |
|
125 |
public: |
|
126 |
enum Type { |
|
127 |
None, |
|
128 |
GestureBegin, |
|
129 |
GestureEnd, |
|
130 |
Pan, |
|
131 |
Zoom, |
|
132 |
Rotate, |
|
133 |
Swipe |
|
134 |
}; |
|
135 |
||
136 |
QNativeGestureEvent() |
|
137 |
: QEvent(QEvent::NativeGesture), gestureType(None), percentage(0) |
|
138 |
#ifdef Q_WS_WIN |
|
139 |
, sequenceId(0), argument(0) |
|
140 |
#endif |
|
141 |
{ |
|
142 |
} |
|
143 |
||
144 |
Type gestureType; |
|
145 |
float percentage; |
|
146 |
QPoint position; |
|
147 |
float angle; |
|
148 |
#ifdef Q_WS_WIN |
|
149 |
ulong sequenceId; |
|
150 |
quint64 argument; |
|
151 |
#endif |
|
152 |
}; |
|
153 |
||
154 |
class QGestureEventPrivate |
|
155 |
{ |
|
156 |
public: |
|
157 |
inline QGestureEventPrivate(const QList<QGesture *> &list) |
|
158 |
: gestures(list), widget(0) |
|
159 |
{ |
|
160 |
} |
|
161 |
||
162 |
QList<QGesture *> gestures; |
|
163 |
QWidget *widget; |
|
164 |
QMap<Qt::GestureType, bool> accepted; |
|
165 |
QMap<Qt::GestureType, QWidget *> targetWidgets; |
|
166 |
}; |
|
167 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
168 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
169 |
class QFileOpenEventPrivate |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
170 |
{ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
171 |
public: |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
172 |
inline QFileOpenEventPrivate(const QUrl &url) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
173 |
: url(url) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
174 |
{ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
175 |
} |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
176 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
177 |
QUrl url; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
178 |
}; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
179 |
|
0 | 180 |
QT_END_NAMESPACE |
181 |
||
182 |
#endif // QEVENT_P_H |