File: qevent.3qt

package info (click to toggle)
qt-copy 2%3A3.0.3-20020329-1woody2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 77,328 kB
  • ctags: 59,132
  • sloc: cpp: 413,292; ansic: 88,042; sh: 10,673; yacc: 2,874; xml: 2,310; makefile: 466; lex: 453; perl: 422; sql: 29; lisp: 15
file content (209 lines) | stat: -rw-r--r-- 9,164 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
'\" t
.TH QEvent 3qt "18 March 2002" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QEvent \- The base class of all event classes. Event objects contain event parameters
.SH SYNOPSIS
\fC#include <qevent.h>\fR
.PP
Inherits Qt.
.PP
Inherited by QTimerEvent, QMouseEvent, QWheelEvent, QTabletEvent, QKeyEvent, QFocusEvent, QPaintEvent, QMoveEvent, QResizeEvent, QCloseEvent, QShowEvent, QHideEvent, QContextMenuEvent, QIMEvent, QDropEvent, QDragLeaveEvent, QChildEvent and QCustomEvent.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum Type { None = 0, Timer = 1, MouseButtonPress = 2, MouseButtonRelease = 3, MouseButtonDblClick = 4, MouseMove = 5, KeyPress = 6, KeyRelease = 7, FocusIn = 8, FocusOut = 9, Enter = 10, Leave = 11, Paint = 12, Move = 13, Resize = 14, Create = 15, Destroy = 16, Show = 17, Hide = 18, Close = 19, Quit = 20, Reparent = 21, ShowMinimized = 22, ShowNormal = 23, WindowActivate = 24, WindowDeactivate = 25, ShowToParent = 26, HideToParent = 27, ShowMaximized = 28, ShowFullScreen = 29, Accel = 30, Wheel = 31, AccelAvailable = 32, CaptionChange = 33, IconChange = 34, ParentFontChange = 35, ApplicationFontChange = 36, ParentPaletteChange = 37, ApplicationPaletteChange = 38, PaletteChange = 39, Clipboard = 40, Speech = 42, SockAct = 50, AccelOverride = 51, DeferredDelete = 52, DragEnter = 60, DragMove = 61, DragLeave = 62, Drop = 63, DragResponse = 64, ChildInserted = 70, ChildRemoved = 71, LayoutHint = 72, ShowWindowRequest = 73, ActivateControl = 80, DeactivateControl = 81, ContextMenu = 82, IMStart = 83, IMCompose = 84, IMEnd = 85, Accessibility = 86, Tablet = 87, User = 1000, MaxUser = 65535 }  \fI(obsolete)\fR"
.br
.ti -1c
.BI "\fBQEvent\fR ( Type type )"
.br
.ti -1c
.BI "Type \fBtype\fR () const"
.br
.ti -1c
.BI "bool \fBspontaneous\fR () const"
.br
.in -1c
.SH DESCRIPTION
The QEvent class is the base class of all event classes. Event objects contain event parameters.
.PP
The main event loop of Qt (QApplication::exec()) fetches native window system events from the event queue, translates them into QEvents and sends the translated events to QObjects.
.PP
Generally, events come from the underlying window system (spontaneous() returns TRUE) but it is also possible to manually send events through the QApplication class using QApplication::sendEvent() and QApplication::postEvent() (spontaneous() returns FALSE).
.PP
QObjects receive events by having their QObject::event() function called. The function can be reimplemented in subclasses to customize event handling and add additional event types. QWidget::event() is a notable example. By default, events are dispatched to event handlers like QObject::timerEvent() and QWidget::mouseMoveEvent(). QObject::installEventFilter() allows an object to intercept events to another object.
.PP
The basic QEvent contains only an event type parameter. Subclasses of QEvent contain additional parameters that describe the particular event.
.PP
See also QObject::event(), QObject::installEventFilter(), QWidget::event(), QApplication::sendEvent(), QApplication::postEvent(), QApplication::processEvents(), Environment Classes and Event Classes.
.SS "Member Type Documentation"
.SH "QEvent::Type"
This enum type defines the valid event types in Qt. The currently defined event types and the specialized classes for each type are:
.TP
\fCQEvent::None\fR - Not an event.
.TP
\fCQEvent::Accessibility\fR - Accessibility information is requested
.TP
\fCQEvent::Timer\fR - Regular timer events, QTimerEvent.
.TP
\fCQEvent::MouseButtonPress\fR - Mouse press, QMouseEvent.
.TP
\fCQEvent::MouseButtonRelease\fR - Mouse release, QMouseEvent.
.TP
\fCQEvent::MouseButtonDblClick\fR - Mouse press again, QMouseEvent.
.TP
\fCQEvent::MouseMove\fR - Mouse move, QMouseEvent.
.TP
\fCQEvent::KeyPress\fR - Key press (including Shift, for example), QKeyEvent.
.TP
\fCQEvent::KeyRelease\fR - Key release, QKeyEvent.
.TP
\fCQEvent::IMStart\fR - The start of input method composition.
.TP
\fCQEvent::IMCompose\fR - Input method composition is taking place.
.TP
\fCQEvent::IMEnd\fR - The end of input method composition.
.TP
\fCQEvent::FocusIn\fR - Widget gains keyboard focus, QFocusEvent.
.TP
\fCQEvent::FocusOut\fR - Widget loses keyboard focus, QFocusEvent.
.TP
\fCQEvent::Enter\fR - Mouse enters widget's boundaries.
.TP
\fCQEvent::Leave\fR - Mouse leaves widget's boundaries.
.TP
\fCQEvent::Paint\fR - Screen update necessary, QPaintEvent.
.TP
\fCQEvent::Move\fR - Widget's position changed, QMoveEvent.
.TP
\fCQEvent::Resize\fR - Widget's size changed, QResizeEvent.
.TP
\fCQEvent::Show\fR - Widget was shown on screen, QShowEvent.
.TP
\fCQEvent::Hide\fR - Widget was hidden, QHideEvent.
.TP
\fCQEvent::ShowToParent\fR - A child widget has been shown.
.TP
\fCQEvent::HideToParent\fR - A child widget has been hidden.
.TP
\fCQEvent::Close\fR - Widget was closed (permanently), QCloseEvent.
.TP
\fCQEvent::ShowNormal\fR - Widget should be shown normally.
.TP
\fCQEvent::ShowMaximized\fR - Widget should be shown maximized.
.TP
\fCQEvent::ShowMinimized\fR - Widget should be shown minimized.
.TP
\fCQEvent::ShowFullScreen\fR - Widget should be shown full-screen.
.TP
\fCQEvent::ShowWindowRequest\fR - Widget's window should be shown. \fBThis type is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.TP
\fCQEvent::DeferredDelete\fR - The object will be deleted after it has cleaned up.
.TP
\fCQEvent::Accel\fR - Key press in child for shortcut key handling, QKeyEvent.
.TP
\fCQEvent::Wheel\fR - Mouse wheel rolled, QWheelEvent.
.TP
\fCQEvent::ContextMenu\fR - context popup menu, QContextMenuEvent
.TP
\fCQEvent::AccelAvailable\fR - Internal event used by Qt on some platforms.
.TP
\fCQEvent::AccelOverride\fR - Key press in child, for overriding shortcut key handling, QKeyEvent.
.TP
\fCQEvent::WindowActivate\fR - Window was activated.
.TP
\fCQEvent::WindowDeactivate\fR - Window was deactivated.
.TP
\fCQEvent::CaptionChange\fR - Widget's caption changed.
.TP
\fCQEvent::IconChange\fR - Widget's icon changed.
.TP
\fCQEvent::ParentFontChange\fR - Font of the parent widget changed.
.TP
\fCQEvent::ApplicationFontChange\fR - Default application font changed.
.TP
\fCQEvent::PaletteChange\fR - Palette of the widget changed.
.TP
\fCQEvent::ParentPaletteChange\fR - Palette of the parent widget changed.
.TP
\fCQEvent::ApplicationPaletteChange\fR - Default application palette changed.
.TP
\fCQEvent::Clipboard\fR - Clipboard contents have changed.
.TP
\fCQEvent::SockAct\fR - Socket activated, used to implement QSocketNotifier.
.TP
\fCQEvent::DragEnter\fR - A drag-and-drop enters widget, QDragEnterEvent.
.TP
\fCQEvent::DragMove\fR - A drag-and-drop is in progress, QDragMoveEvent.
.TP
\fCQEvent::DragLeave\fR - A drag-and-drop leaves widget, QDragLeaveEvent.
.TP
\fCQEvent::Drop\fR - A drag-and-drop is completed, QDropEvent.
.TP
\fCQEvent::DragResponse\fR - Internal event used by Qt on some platforms.
.TP
\fCQEvent::ChildInserted\fR - Object gets a child, QChildEvent.
.TP
\fCQEvent::ChildRemoved\fR - Object loses a child, QChildEvent.
.TP
\fCQEvent::LayoutHint\fR - Widget child has changed layout properties.
.TP
\fCQEvent::ActivateControl\fR - Internal event used by Qt on some platforms.
.TP
\fCQEvent::DeactivateControl\fR - Internal event used by Qt on some platforms.
.TP
\fCQEvent::Quit\fR - Reserved.
.TP
\fCQEvent::Create\fR - Reserved.
.TP
\fCQEvent::Destroy\fR - Reserved.
.TP
\fCQEvent::Reparent\fR - Reserved.
.TP
\fCQEvent::Speech\fR - Reserved for speech input.
.TP
\fCQEvent::Tablet\fR - Wacom Tablet event.
.TP
\fCQEvent::User\fR - User defined event.
.TP
\fCQEvent::MaxUser\fR - Last user event id.
.PP
User events should have values between User and MaxUser inclusive.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QEvent::QEvent ( Type type )"
Contructs an event object of type \fItype\fR.
.SH "bool QEvent::spontaneous () const"
Returns TRUE if the event originated outside the application, i.e. it is a system event; otherwise returns FALSE.
.SH "Type QEvent::type () const"
Returns the event type.

.SH "SEE ALSO"
.BR http://doc.trolltech.com/qevent.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive Qt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using Qt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech. 
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (qevent.3qt) and the Qt
version (3.0.3).