1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the core module of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
32
#include <QtCore/qnamespace.h>
36
class Q_CORE_EXPORT QEvent // event base class
38
QDOC_PROPERTY(bool accepted READ isAccepted WRITE setAccepted)
42
If you get a strange compiler error on the line with None,
43
it's probably because you're also including X11 headers,
44
which #define the symbol None. Put the X11 includes after
45
the Qt includes to solve this problem.
47
None = 0, // invalid event
48
Timer = 1, // timer event
49
MouseButtonPress = 2, // mouse button pressed
50
MouseButtonRelease = 3, // mouse button released
51
MouseButtonDblClick = 4, // mouse button double click
52
MouseMove = 5, // mouse move
53
KeyPress = 6, // key pressed
54
KeyRelease = 7, // key released
55
FocusIn = 8, // keyboard focus received
56
FocusOut = 9, // keyboard focus lost
57
Enter = 10, // mouse enters widget
58
Leave = 11, // mouse leaves widget
59
Paint = 12, // paint widget
60
Move = 13, // move widget
61
Resize = 14, // resize widget
62
Create = 15, // after widget creation
63
Destroy = 16, // during widget destruction
64
Show = 17, // widget is shown
65
Hide = 18, // widget is hidden
66
Close = 19, // request to close widget
67
Quit = 20, // request to quit application
68
ParentChange = 21, // widget has been reparented
69
ParentAboutToChange = 131, // sent just before the parent change is done
71
Reparent = ParentChange,
73
ThreadChange = 22, // object has changed threads
74
WindowActivate = 24, // window was activated
75
WindowDeactivate = 25, // window was deactivated
76
ShowToParent = 26, // widget is shown to parent
77
HideToParent = 27, // widget is hidden to parent
78
Wheel = 31, // wheel event
79
WindowTitleChange = 33, // window title changed
80
WindowIconChange = 34, // icon changed
81
ApplicationWindowIconChange = 35, // application icon changed
82
ApplicationFontChange = 36, // application font changed
83
ApplicationLayoutDirectionChange = 37, // application layout direction changed
84
ApplicationPaletteChange = 38, // application palette changed
85
PaletteChange = 39, // widget palette changed
86
Clipboard = 40, // internal clipboard event
87
Speech = 42, // reserved for speech input
88
MetaCall = 43, // meta call event
89
SockAct = 50, // socket activation
90
WinEventAct = 132, // win event activation
91
DeferredDelete = 52, // deferred delete event
92
DragEnter = 60, // drag moves into widget
93
DragMove = 61, // drag moves in widget
94
DragLeave = 62, // drag leaves or is cancelled
95
Drop = 63, // actual drop
96
DragResponse = 64, // drag accepted/rejected
97
ChildAdded = 68, // new child widget
98
ChildPolished = 69, // polished child widget
100
ChildInserted = 70, // compatibility posted insert
101
LayoutHint = 72, // compatibility relayout request
103
ChildRemoved = 71, // deleted child widget
104
ShowWindowRequest = 73, // widget's window should be mapped
105
PolishRequest = 74, // widget should be polished
106
Polish = 75, // widget is polished
107
LayoutRequest = 76, // widget should be relayouted
108
UpdateRequest = 77, // widget should be repainted
112
EmbeddingControl = 79, // ActiveX embedding
113
ActivateControl = 80, // ActiveX activation
114
DeactivateControl = 81, // ActiveX deactivation
115
ContextMenu = 82, // context popup menu
116
InputMethod = 83, // input method
117
AccessibilityPrepare = 86, // accessibility information is requested
118
TabletMove = 87, // Wacom tablet event
119
LocaleChange = 88, // the system locale changed
120
LanguageChange = 89, // the application language changed
121
LayoutDirectionChange = 90, // the layout direction changed
122
Style = 91, // internal style event
123
TabletPress = 92, // tablet press
124
TabletRelease = 93, // tablet release
125
OkRequest = 94, // CE (Ok) button pressed
126
HelpRequest = 95, // CE (?) button pressed
128
IconDrag = 96, // proxy icon dragged
130
FontChange = 97, // font has changed
131
EnabledChange = 98, // enabled state has changed
132
ActivationChange = 99, // window activation has changed
133
StyleChange = 100, // style has changed
134
IconTextChange = 101, // icon text has changed
135
ModifiedChange = 102, // modified state has changed
136
MouseTrackingChange = 109, // mouse tracking state has changed
138
WindowBlocked = 103, // window is about to be blocked modally
139
WindowUnblocked = 104, // windows modal blocking has ended
140
WindowStateChange = 105,
150
FileOpen = 116, // file open request
152
Shortcut = 117, // shortcut triggered
153
ShortcutOverride = 51, // shortcut override request
156
Accel = 30, // accelerator event
157
AccelAvailable = 32, // accelerator available event
158
AccelOverride = ShortcutOverride, // accelerator override event
161
WhatsThisClicked = 118,
164
CaptionChange = WindowTitleChange,
165
IconChange = WindowIconChange,
167
ToolBarChange = 120, // toolbar visibility toggled
169
ApplicationActivated = 121, // application has been changed to active
170
ApplicationDeactivated = 122, // application has been changed to inactive
172
QueryWhatsThis = 123, // query what's this widget help
173
EnterWhatsThisMode = 124,
174
LeaveWhatsThisMode = 125,
176
ZOrderChange = 126, // child widget has had its z-order changed
178
HoverEnter = 127, // mouse cursor enters a hover widget
179
HoverLeave = 128, // mouse cursor leaves a hover widget
180
HoverMove = 129, // mouse cursor move inside a hover widget
182
AccessibilityHelp = 119, // accessibility help text request
183
AccessibilityDescription = 130, // accessibility description text request
185
// last event id used = 132
187
User = 1000, // first user event id
188
MaxUser = 65535 // last user event id
193
inline Type type() const { return static_cast<Type>(t); }
194
inline bool spontaneous() const { return spont; }
196
inline void setAccepted(bool accepted) { m_accept = accepted; }
197
inline bool isAccepted() const { return m_accept; }
199
inline void accept() { m_accept = true; }
200
inline void ignore() { m_accept = false; }
210
ushort reserved : 13;
212
friend class QCoreApplication;
213
friend class QCoreApplicationPrivate;
214
friend class QThreadData;
215
friend class QApplication;
216
friend class QApplicationPrivate;
217
friend class Q3AccelManager;
218
friend class QShortcutMap;
219
friend class QETWidget;
222
class Q_CORE_EXPORT QTimerEvent : public QEvent
225
QTimerEvent( int timerId );
227
int timerId() const { return id; }
234
class Q_CORE_EXPORT QChildEvent : public QEvent
237
QChildEvent( Type type, QObject *child );
239
QObject *child() const { return c; }
240
bool added() const { return type() == ChildAdded; }
242
QT3_SUPPORT bool inserted() const { return type() == ChildInserted; }
244
bool polished() const { return type() == ChildPolished; }
245
bool removed() const { return type() == ChildRemoved; }
251
class Q_CORE_EXPORT QCustomEvent : public QEvent
254
QT3_SUPPORT_CONSTRUCTOR QCustomEvent(int type, void *data = 0);
256
QT3_SUPPORT void *data() const { return d; }
257
QT3_SUPPORT void setData(void* data) { d = reinterpret_cast<QEventPrivate *>(data); }
261
#endif // QCOREEVENT_H