1QEvent(3qt) QEvent(3qt)
2
3
4
6 QEvent - The base class of all event classes. Event objects contain
7 event parameters
8
10 #include <qevent.h>
11
12 Inherits Qt.
13
14 Inherited by QTimerEvent, QMouseEvent, QWheelEvent, QTabletEvent,
15 QKeyEvent, QFocusEvent, QPaintEvent, QMoveEvent, QResizeEvent,
16 QCloseEvent, QIconDragEvent, QShowEvent, QHideEvent, QContextMenuEvent,
17 QIMEvent, QDropEvent, QDragLeaveEvent, QChildEvent, and QCustomEvent.
18
19 Public Members
20 enum Type { None = 0, Timer = 1, MouseButtonPress = 2,
21 MouseButtonRelease = 3, MouseButtonDblClick = 4, MouseMove = 5,
22 KeyPress = 6, KeyRelease = 7, FocusIn = 8, FocusOut = 9, Enter =
23 10, Leave = 11, Paint = 12, Move = 13, Resize = 14, Create = 15,
24 Destroy = 16, Show = 17, Hide = 18, Close = 19, Quit = 20, Reparent
25 = 21, ShowMinimized = 22, ShowNormal = 23, WindowActivate = 24,
26 WindowDeactivate = 25, ShowToParent = 26, HideToParent = 27,
27 ShowMaximized = 28, ShowFullScreen = 29, Accel = 30, Wheel = 31,
28 AccelAvailable = 32, CaptionChange = 33, IconChange = 34,
29 ParentFontChange = 35, ApplicationFontChange = 36,
30 ParentPaletteChange = 37, ApplicationPaletteChange = 38,
31 PaletteChange = 39, Clipboard = 40, Speech = 42, SockAct = 50,
32 AccelOverride = 51, DeferredDelete = 52, DragEnter = 60, DragMove =
33 61, DragLeave = 62, Drop = 63, DragResponse = 64, ChildInserted =
34 70, ChildRemoved = 71, LayoutHint = 72, ShowWindowRequest = 73,
35 WindowBlocked = 74, WindowUnblocked = 75, ActivateControl = 80,
36 DeactivateControl = 81, ContextMenu = 82, IMStart = 83, IMCompose =
37 84, IMEnd = 85, Accessibility = 86, TabletMove = 87, LocaleChange =
38 88, LanguageChange = 89, LayoutDirectionChange = 90, Style = 91,
39 TabletPress = 92, TabletRelease = 93, OkRequest = 94, HelpRequest =
40 95, WindowStateChange = 96, IconDrag = 97, User = 1000, MaxUser =
41 65535 }
42 QEvent ( Type type )
43 virtual ~QEvent ()
44 Type type () const
45 bool spontaneous () const
46
48 The QEvent class is the base class of all event classes. Event objects
49 contain event parameters.
50
51 Qt's main event loop (QApplication::exec()) fetches native window
52 system events from the event queue, translates them into QEvents and
53 sends the translated events to QObjects.
54
55 In general, events come from the underlying window system
56 (spontaneous() returns TRUE) but it is also possible to manually send
57 events using QApplication::sendEvent() and QApplication::postEvent()
58 (spontaneous() returns FALSE).
59
60 QObjects receive events by having their QObject::event() function
61 called. The function can be reimplemented in subclasses to customize
62 event handling and add additional event types; QWidget::event() is a
63 notable example. By default, events are dispatched to event handlers
64 like QObject::timerEvent() and QWidget::mouseMoveEvent().
65 QObject::installEventFilter() allows an object to intercept events
66 destined for another object.
67
68 The basic QEvent contains only an event type parameter. Subclasses of
69 QEvent contain additional parameters that describe the particular
70 event.
71
72 See also QObject::event(), QObject::installEventFilter(),
73 QWidget::event(), QApplication::sendEvent(), QApplication::postEvent(),
74 QApplication::processEvents(), Environment Classes, and Event Classes.
75
76 Member Type Documentation
78 This enum type defines the valid event types in Qt. The event types and
79 the specialized classes for each type are these:
80
81 QEvent::None - Not an event.
82
83 QEvent::Accessibility - Accessibility information is requested
84
85 QEvent::Timer - Regular timer events, QTimerEvent.
86
87 QEvent::MouseButtonPress - Mouse press, QMouseEvent.
88
89 QEvent::MouseButtonRelease - Mouse release, QMouseEvent.
90
91 QEvent::MouseButtonDblClick - Mouse press again, QMouseEvent.
92
93 QEvent::MouseMove - Mouse move, QMouseEvent.
94
95 QEvent::KeyPress - Key press (including Shift, for example), QKeyEvent.
96
97 QEvent::KeyRelease - Key release, QKeyEvent.
98
99 QEvent::IMStart - The start of input method composition, QIMEvent.
100
101 QEvent::IMCompose - Input method composition is taking place, QIMEvent.
102
103 QEvent::IMEnd - The end of input method composition, QIMEvent.
104
105 QEvent::FocusIn - Widget gains keyboard focus, QFocusEvent.
106
107 QEvent::FocusOut - Widget loses keyboard focus, QFocusEvent.
108
109 QEvent::Enter - Mouse enters widget's boundaries.
110
111 QEvent::Leave - Mouse leaves widget's boundaries.
112
113 QEvent::Paint - Screen update necessary, QPaintEvent.
114
115 QEvent::Move - Widget's position changed, QMoveEvent.
116
117 QEvent::Resize - Widget's size changed, QResizeEvent.
118
119 QEvent::Show - Widget was shown on screen, QShowEvent.
120
121 QEvent::Hide - Widget was hidden, QHideEvent.
122
123 QEvent::ShowToParent - A child widget has been shown.
124
125 QEvent::HideToParent - A child widget has been hidden.
126
127 QEvent::Close - Widget was closed (permanently), QCloseEvent.
128
129 QEvent::ShowNormal - Widget should be shown normally (obsolete).
130
131 QEvent::ShowMaximized - Widget should be shown maximized (obsolete).
132
133 QEvent::ShowMinimized - Widget should be shown minimized (obsolete).
134
135 QEvent::ShowFullScreen - Widget should be shown full-screen (obsolete).
136
137 QEvent::ShowWindowRequest - Widget's window should be shown (obsolete).
138
139 QEvent::DeferredDelete - The object will be deleted after it has
140 cleaned up.
141
142 QEvent::Accel - Key press in child for shortcut key handling,
143 QKeyEvent.
144
145 QEvent::Wheel - Mouse wheel rolled, QWheelEvent.
146
147 QEvent::ContextMenu - Context popup menu, QContextMenuEvent
148
149 QEvent::AccelOverride - Key press in child, for overriding shortcut key
150 handling, QKeyEvent.
151
152 QEvent::AccelAvailable - internal.
153
154 QEvent::WindowActivate - Window was activated.
155
156 QEvent::WindowDeactivate - Window was deactivated.
157
158 QEvent::CaptionChange - Widget's caption changed.
159
160 QEvent::IconChange - Widget's icon changed.
161
162 QEvent::ParentFontChange - Font of the parent widget changed.
163
164 QEvent::ApplicationFontChange - Default application font changed.
165
166 QEvent::PaletteChange - Palette of the widget changed.
167
168 QEvent::ParentPaletteChange - Palette of the parent widget changed.
169
170 QEvent::ApplicationPaletteChange - Default application palette changed.
171
172 QEvent::Clipboard - Clipboard contents have changed.
173
174 QEvent::SockAct - Socket activated, used to implement QSocketNotifier.
175
176 QEvent::DragEnter - A drag-and-drop enters widget, QDragEnterEvent.
177
178 QEvent::DragMove - A drag-and-drop is in progress, QDragMoveEvent.
179
180 QEvent::DragLeave - A drag-and-drop leaves widget, QDragLeaveEvent.
181
182 QEvent::Drop - A drag-and-drop is completed, QDropEvent.
183
184 QEvent::DragResponse - Internal event used by Qt on some platforms.
185
186 QEvent::ChildInserted - Object gets a child, QChildEvent.
187
188 QEvent::ChildRemoved - Object loses a child, QChildEvent.
189
190 QEvent::LayoutHint - Widget child has changed layout properties.
191
192 QEvent::ActivateControl - Internal event used by Qt on some platforms.
193
194 QEvent::DeactivateControl - Internal event used by Qt on some
195 platforms.
196
197 QEvent::LanguageChange - The application translation changed,
198 QTranslator
199
200 QEvent::LayoutDirectionChange - The direction of layouts changed
201
202 QEvent::LocaleChange - The system locale changed
203
204 QEvent::Quit - Reserved.
205
206 QEvent::Create - Reserved.
207
208 QEvent::Destroy - Reserved.
209
210 QEvent::Reparent - Reserved.
211
212 QEvent::Speech - Reserved for speech input.
213
214 QEvent::TabletMove - A Wacom Tablet Move Event.
215
216 QEvent::Style - Internal use only
217
218 QEvent::TabletPress - A Wacom Tablet Press Event
219
220 QEvent::TabletRelease - A Wacom Tablet Release Event
221
222 QEvent::OkRequest - Internal event used by Qt on some platforms.
223
224 QEvent::HelpRequest - Internal event used by Qt on some platforms.
225
226 QEvent::IconDrag - Internal event used by Qt on some platforms when
227 proxy icon is dragged.
228
229 QEvent::WindowStateChange - The window's state, i.e. minimized,
230 maximized or full-screen, has changed. See QWidget::windowState().
231
232 QEvent::WindowBlocked - The window is modally blocked
233
234 QEvent::WindowUnblocked - The window leaves modal blocking
235
236 QEvent::User - User defined event.
237
238 QEvent::MaxUser - Last user event id.
239
240 User events should have values between User and MaxUser inclusive.
241
244 Contructs an event object of type type.
245
247 Destroys the event. If it was posted, it will be removed from the list
248 of events to be posted.
249
251 Returns TRUE if the event originated outside the application, i.e. it
252 is a system event; otherwise returns FALSE.
253
255 Returns the event type.
256
257
259 http://doc.trolltech.com/qevent.html
260 http://www.trolltech.com/faq/tech.html
261
263 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
264 license file included in the distribution for a complete license
265 statement.
266
268 Generated automatically from the source code.
269
271 If you find a bug in Qt, please report it as described in
272 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
273 help you. Thank you.
274
275 The definitive Qt documentation is provided in HTML format; it is
276 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
277 web browser. This man page is provided as a convenience for those users
278 who prefer man pages, although this format is not officially supported
279 by Trolltech.
280
281 If you find errors in this manual page, please report them to qt-
282 bugs@trolltech.com. Please include the name of the manual page
283 (qevent.3qt) and the Qt version (3.3.8).
284
285
286
287Trolltech AS 2 February 2007 QEvent(3qt)