QEvent Class Reference

#include <qcoreevent.h>

Class Description

Definition at line 56 of file qcoreevent.h.

+ Inheritance diagram for QEvent:

Public Types

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, ParentChange = 21, ParentAboutToChange = 131, ThreadChange = 22,
  WindowActivate = 24, WindowDeactivate = 25, ShowToParent = 26, HideToParent = 27,
  Wheel = 31, WindowTitleChange = 33, WindowIconChange = 34, ApplicationWindowIconChange = 35,
  ApplicationFontChange = 36, ApplicationLayoutDirectionChange = 37, ApplicationPaletteChange = 38, PaletteChange = 39,
  Clipboard = 40, Speech = 42, MetaCall = 43, SockAct = 50,
  WinEventAct = 132, DeferredDelete = 52, DragEnter = 60, DragMove = 61,
  DragLeave = 62, Drop = 63, DragResponse = 64, ChildAdded = 68,
  ChildPolished = 69, ChildRemoved = 71, ShowWindowRequest = 73, PolishRequest = 74,
  Polish = 75, LayoutRequest = 76, UpdateRequest = 77, UpdateLater = 78,
  EmbeddingControl = 79, ActivateControl = 80, DeactivateControl = 81, ContextMenu = 82,
  InputMethod = 83, AccessibilityPrepare = 86, TabletMove = 87, LocaleChange = 88,
  LanguageChange = 89, LayoutDirectionChange = 90, Style = 91, TabletPress = 92,
  TabletRelease = 93, OkRequest = 94, HelpRequest = 95, IconDrag = 96,
  FontChange = 97, EnabledChange = 98, ActivationChange = 99, StyleChange = 100,
  IconTextChange = 101, ModifiedChange = 102, MouseTrackingChange = 109, WindowBlocked = 103,
  WindowUnblocked = 104, WindowStateChange = 105, ToolTip = 110, WhatsThis = 111,
  StatusTip = 112, ActionChanged = 113, ActionAdded = 114, ActionRemoved = 115,
  FileOpen = 116, Shortcut = 117, ShortcutOverride = 51, WhatsThisClicked = 118,
  ToolBarChange = 120, ApplicationActivate = 121, ApplicationActivated = ApplicationActivate, ApplicationDeactivate = 122,
  ApplicationDeactivated = ApplicationDeactivate, QueryWhatsThis = 123, EnterWhatsThisMode = 124, LeaveWhatsThisMode = 125,
  ZOrderChange = 126, HoverEnter = 127, HoverLeave = 128, HoverMove = 129,
  AccessibilityHelp = 119, AccessibilityDescription = 130, AcceptDropsChange = 152, MenubarUpdated = 153,
  ZeroTimerEvent = 154, GraphicsSceneMouseMove = 155, GraphicsSceneMousePress = 156, GraphicsSceneMouseRelease = 157,
  GraphicsSceneMouseDoubleClick = 158, GraphicsSceneContextMenu = 159, GraphicsSceneHoverEnter = 160, GraphicsSceneHoverMove = 161,
  GraphicsSceneHoverLeave = 162, GraphicsSceneHelp = 163, GraphicsSceneDragEnter = 164, GraphicsSceneDragMove = 165,
  GraphicsSceneDragLeave = 166, GraphicsSceneDrop = 167, GraphicsSceneWheel = 168, KeyboardLayoutChange = 169,
  DynamicPropertyChange = 170, TabletEnterProximity = 171, TabletLeaveProximity = 172, NonClientAreaMouseMove = 173,
  NonClientAreaMouseButtonPress = 174, NonClientAreaMouseButtonRelease = 175, NonClientAreaMouseButtonDblClick = 176, MacSizeChange = 177,
  ContentsRectChange = 178, MacGLWindowChange = 179, FutureCallOut = 180, GraphicsSceneResize = 181,
  GraphicsSceneMove = 182, CursorChange = 183, ToolTipChange = 184, NetworkReplyUpdated = 185,
  GrabMouse = 186, UngrabMouse = 187, GrabKeyboard = 188, UngrabKeyboard = 189,
  MacGLClearDrawable = 191, StateMachineSignal = 192, StateMachineWrapped = 193, TouchBegin = 194,
  TouchUpdate = 195, TouchEnd = 196, NativeGesture = 197, RequestSoftwareInputPanel = 199,
  CloseSoftwareInputPanel = 200, UpdateSoftKeys = 201, WinIdChange = 203, Gesture = 198,
  GestureOverride = 202, PlatformPanel = 212, User = 1000, MaxUser = 65535
}
 

Public Member Functions

 QEvent (Type type)
 
virtual ~QEvent ()
 
Type type () const
 
bool spontaneous () const
 
void setAccepted (bool accepted)
 
bool isAccepted () const
 
void accept ()
 
void ignore ()
 

Static Public Member Functions

static int registerEventType (int hint=-1)
 

Protected Attributes

QEventPrivate * d
 
ushort t
 

Friends

class QCoreApplication
 
class QCoreApplicationPrivate
 
class QThreadData
 
class QApplication
 
class QApplicationPrivate
 
class Q3AccelManager
 
class QShortcutMap
 
class QETWidget
 
class QGraphicsView
 
class QGraphicsViewPrivate
 
class QGraphicsScene
 
class QGraphicsScenePrivate
 
class QGestureManager
 

Member Enumeration Documentation

enum Type
Enumerator
None 
Timer 
MouseButtonPress 
MouseButtonRelease 
MouseButtonDblClick 
MouseMove 
KeyPress 
KeyRelease 
FocusIn 
FocusOut 
Enter 
Leave 
Paint 
Move 
Resize 
Create 
Destroy 
Show 
Hide 
Close 
Quit 
ParentChange 
ParentAboutToChange 
ThreadChange 
WindowActivate 
WindowDeactivate 
ShowToParent 
HideToParent 
Wheel 
WindowTitleChange 
WindowIconChange 
ApplicationWindowIconChange 
ApplicationFontChange 
ApplicationLayoutDirectionChange 
ApplicationPaletteChange 
PaletteChange 
Clipboard 
Speech 
MetaCall 
SockAct 
WinEventAct 
DeferredDelete 
DragEnter 
DragMove 
DragLeave 
Drop 
DragResponse 
ChildAdded 
ChildPolished 
ChildRemoved 
ShowWindowRequest 
PolishRequest 
Polish 
LayoutRequest 
UpdateRequest 
UpdateLater 
EmbeddingControl 
ActivateControl 
DeactivateControl 
ContextMenu 
InputMethod 
AccessibilityPrepare 
TabletMove 
LocaleChange 
LanguageChange 
LayoutDirectionChange 
Style 
TabletPress 
TabletRelease 
OkRequest 
HelpRequest 
IconDrag 
FontChange 
EnabledChange 
ActivationChange 
StyleChange 
IconTextChange 
ModifiedChange 
MouseTrackingChange 
WindowBlocked 
WindowUnblocked 
WindowStateChange 
ToolTip 
WhatsThis 
StatusTip 
ActionChanged 
ActionAdded 
ActionRemoved 
FileOpen 
Shortcut 
ShortcutOverride 
WhatsThisClicked 
ToolBarChange 
ApplicationActivate 
ApplicationActivated 
ApplicationDeactivate 
ApplicationDeactivated 
QueryWhatsThis 
EnterWhatsThisMode 
LeaveWhatsThisMode 
ZOrderChange 
HoverEnter 
HoverLeave 
HoverMove 
AccessibilityHelp 
AccessibilityDescription 
AcceptDropsChange 
MenubarUpdated 
ZeroTimerEvent 
GraphicsSceneMouseMove 
GraphicsSceneMousePress 
GraphicsSceneMouseRelease 
GraphicsSceneMouseDoubleClick 
GraphicsSceneContextMenu 
GraphicsSceneHoverEnter 
GraphicsSceneHoverMove 
GraphicsSceneHoverLeave 
GraphicsSceneHelp 
GraphicsSceneDragEnter 
GraphicsSceneDragMove 
GraphicsSceneDragLeave 
GraphicsSceneDrop 
GraphicsSceneWheel 
KeyboardLayoutChange 
DynamicPropertyChange 
TabletEnterProximity 
TabletLeaveProximity 
NonClientAreaMouseMove 
NonClientAreaMouseButtonPress 
NonClientAreaMouseButtonRelease 
NonClientAreaMouseButtonDblClick 
MacSizeChange 
ContentsRectChange 
MacGLWindowChange 
FutureCallOut 
GraphicsSceneResize 
GraphicsSceneMove 
CursorChange 
ToolTipChange 
NetworkReplyUpdated 
GrabMouse 
UngrabMouse 
GrabKeyboard 
UngrabKeyboard 
MacGLClearDrawable 
StateMachineSignal 
StateMachineWrapped 
TouchBegin 
TouchUpdate 
TouchEnd 
NativeGesture 
RequestSoftwareInputPanel 
CloseSoftwareInputPanel 
UpdateSoftKeys 
WinIdChange 
Gesture 
GestureOverride 
PlatformPanel 
User 
MaxUser 

Definition at line 62 of file qcoreevent.h.

62  {
63  /*
64  If you get a strange compiler error on the line with None,
65  it's probably because you're also including X11 headers,
66  which #define the symbol None. Put the X11 includes after
67  the Qt includes to solve this problem.
68  */
69  None = 0, // invalid event
70  Timer = 1, // timer event
71  MouseButtonPress = 2, // mouse button pressed
72  MouseButtonRelease = 3, // mouse button released
73  MouseButtonDblClick = 4, // mouse button double click
74  MouseMove = 5, // mouse move
75  KeyPress = 6, // key pressed
76  KeyRelease = 7, // key released
77  FocusIn = 8, // keyboard focus received
78  FocusOut = 9, // keyboard focus lost
79  Enter = 10, // mouse enters widget
80  Leave = 11, // mouse leaves widget
81  Paint = 12, // paint widget
82  Move = 13, // move widget
83  Resize = 14, // resize widget
84  Create = 15, // after widget creation
85  Destroy = 16, // during widget destruction
86  Show = 17, // widget is shown
87  Hide = 18, // widget is hidden
88  Close = 19, // request to close widget
89  Quit = 20, // request to quit application
90  ParentChange = 21, // widget has been reparented
91  ParentAboutToChange = 131, // sent just before the parent change is done
92 #ifdef QT3_SUPPORT
93  Reparent = ParentChange,
94 #endif
95  ThreadChange = 22, // object has changed threads
96  WindowActivate = 24, // window was activated
97  WindowDeactivate = 25, // window was deactivated
98  ShowToParent = 26, // widget is shown to parent
99  HideToParent = 27, // widget is hidden to parent
100  Wheel = 31, // wheel event
101  WindowTitleChange = 33, // window title changed
102  WindowIconChange = 34, // icon changed
103  ApplicationWindowIconChange = 35, // application icon changed
104  ApplicationFontChange = 36, // application font changed
105  ApplicationLayoutDirectionChange = 37, // application layout direction changed
106  ApplicationPaletteChange = 38, // application palette changed
107  PaletteChange = 39, // widget palette changed
108  Clipboard = 40, // internal clipboard event
109  Speech = 42, // reserved for speech input
110  MetaCall = 43, // meta call event
111  SockAct = 50, // socket activation
112  WinEventAct = 132, // win event activation
113  DeferredDelete = 52, // deferred delete event
114  DragEnter = 60, // drag moves into widget
115  DragMove = 61, // drag moves in widget
116  DragLeave = 62, // drag leaves or is cancelled
117  Drop = 63, // actual drop
118  DragResponse = 64, // drag accepted/rejected
119  ChildAdded = 68, // new child widget
120  ChildPolished = 69, // polished child widget
121 #ifdef QT3_SUPPORT
122  ChildInsertedRequest = 67, // send ChildInserted compatibility events to receiver
123  ChildInserted = 70, // compatibility child inserted
124  LayoutHint = 72, // compatibility relayout request
125 #endif
126  ChildRemoved = 71, // deleted child widget
127  ShowWindowRequest = 73, // widget's window should be mapped
128  PolishRequest = 74, // widget should be polished
129  Polish = 75, // widget is polished
130  LayoutRequest = 76, // widget should be relayouted
131  UpdateRequest = 77, // widget should be repainted
132  UpdateLater = 78, // request update() later
133 
134  EmbeddingControl = 79, // ActiveX embedding
135  ActivateControl = 80, // ActiveX activation
136  DeactivateControl = 81, // ActiveX deactivation
137  ContextMenu = 82, // context popup menu
138  InputMethod = 83, // input method
139  AccessibilityPrepare = 86, // accessibility information is requested
140  TabletMove = 87, // Wacom tablet event
141  LocaleChange = 88, // the system locale changed
142  LanguageChange = 89, // the application language changed
143  LayoutDirectionChange = 90, // the layout direction changed
144  Style = 91, // internal style event
145  TabletPress = 92, // tablet press
146  TabletRelease = 93, // tablet release
147  OkRequest = 94, // CE (Ok) button pressed
148  HelpRequest = 95, // CE (?) button pressed
149 
150  IconDrag = 96, // proxy icon dragged
151 
152  FontChange = 97, // font has changed
153  EnabledChange = 98, // enabled state has changed
154  ActivationChange = 99, // window activation has changed
155  StyleChange = 100, // style has changed
156  IconTextChange = 101, // icon text has changed
157  ModifiedChange = 102, // modified state has changed
158  MouseTrackingChange = 109, // mouse tracking state has changed
159 
160  WindowBlocked = 103, // window is about to be blocked modally
161  WindowUnblocked = 104, // windows modal blocking has ended
162  WindowStateChange = 105,
163 
164  ToolTip = 110,
165  WhatsThis = 111,
166  StatusTip = 112,
167 
168  ActionChanged = 113,
169  ActionAdded = 114,
170  ActionRemoved = 115,
171 
172  FileOpen = 116, // file open request
173 
174  Shortcut = 117, // shortcut triggered
175  ShortcutOverride = 51, // shortcut override request
176 
177 #ifdef QT3_SUPPORT
178  Accel = 30, // accelerator event
179  AccelAvailable = 32, // accelerator available event
180  AccelOverride = ShortcutOverride, // accelerator override event
181 #endif
182 
183  WhatsThisClicked = 118,
184 
185 #ifdef QT3_SUPPORT
186  CaptionChange = WindowTitleChange,
187  IconChange = WindowIconChange,
188 #endif
189  ToolBarChange = 120, // toolbar visibility toggled
190 
191  ApplicationActivate = 121, // application has been changed to active
193  ApplicationDeactivate = 122, // application has been changed to inactive
195 
196  QueryWhatsThis = 123, // query what's this widget help
197  EnterWhatsThisMode = 124,
198  LeaveWhatsThisMode = 125,
199 
200  ZOrderChange = 126, // child widget has had its z-order changed
201 
202  HoverEnter = 127, // mouse cursor enters a hover widget
203  HoverLeave = 128, // mouse cursor leaves a hover widget
204  HoverMove = 129, // mouse cursor move inside a hover widget
205 
206  AccessibilityHelp = 119, // accessibility help text request
207  AccessibilityDescription = 130, // accessibility description text request
208 
209  // last event id used = 132
210 
211 #ifdef QT_KEYPAD_NAVIGATION
212  EnterEditFocus = 150, // enter edit mode in keypad navigation (Defined only with QT_KEYPAD_NAVIGATION)
213  LeaveEditFocus = 151, // leave edit mode in keypad navigation (Defined only with QT_KEYPAD_NAVIGATION)
214 #endif
215  AcceptDropsChange = 152,
216 
217  MenubarUpdated = 153, // Support event for Q3MainWindow, which needs to
218  // knwow when QMenubar is updated.
219 
220  ZeroTimerEvent = 154, // Used for Windows Zero timer events
221 
222  GraphicsSceneMouseMove = 155, // GraphicsView
230  GraphicsSceneHelp = 163,
232  GraphicsSceneDragMove = 165,
234  GraphicsSceneDrop = 167,
235  GraphicsSceneWheel = 168,
236 
237  KeyboardLayoutChange = 169, // keyboard layout changed
238 
239  DynamicPropertyChange = 170, // A dynamic property was changed through setProperty/property
240 
241  TabletEnterProximity = 171,
242  TabletLeaveProximity = 172,
243 
248 
249  MacSizeChange = 177, // when the Qt::WA_Mac{Normal,Small,Mini}Size changes
250 
251  ContentsRectChange = 178, // sent by QWidget::setContentsMargins (internal)
252 
253  MacGLWindowChange = 179, // Internal! the window of the GLWidget has changed
254 
255  FutureCallOut = 180,
256 
257  GraphicsSceneResize = 181,
258  GraphicsSceneMove = 182,
259 
260  CursorChange = 183,
261  ToolTipChange = 184,
262 
263  NetworkReplyUpdated = 185, // Internal for QNetworkReply
264 
265  GrabMouse = 186,
266  UngrabMouse = 187,
267  GrabKeyboard = 188,
268  UngrabKeyboard = 189,
269  MacGLClearDrawable = 191, // Internal Cocoa, the window has changed, so we must clear
270 
271  StateMachineSignal = 192,
272  StateMachineWrapped = 193,
273 
274  TouchBegin = 194,
275  TouchUpdate = 195,
276  TouchEnd = 196,
277 
278 #ifndef QT_NO_GESTURES
279  NativeGesture = 197, // Internal for platform gesture support
280 #endif
283 
284  UpdateSoftKeys = 201, // Internal for compressing soft key updates
285 
286  WinIdChange = 203,
287 #ifndef QT_NO_GESTURES
288  Gesture = 198,
289  GestureOverride = 202,
290 #endif
291 
292  PlatformPanel = 212,
293 
294  // 512 reserved for Qt Jambi's MetaCall event
295  // 513 reserved for Qt Jambi's DeleteOnMainThread event
296 
297  User = 1000, // first user event id
298  MaxUser = 65535 // last user event id
299  };

Constructor & Destructor Documentation

QEvent ( Type  type)
virtual ~QEvent ( )
virtual

Member Function Documentation

Type type ( ) const
inline

Definition at line 303 of file qcoreevent.h.

303 { return static_cast<Type>(t); }
ushort t
Definition: qcoreevent.h:316
bool spontaneous ( ) const
inline

Definition at line 304 of file qcoreevent.h.

304 { return spont; }
void setAccepted ( bool  accepted)
inline

Definition at line 306 of file qcoreevent.h.

306 { m_accept = accepted; }
bool isAccepted ( ) const
inline

Definition at line 307 of file qcoreevent.h.

307 { return m_accept; }
void accept ( )
inline

Definition at line 309 of file qcoreevent.h.

309 { m_accept = true; }
void ignore ( )
inline

Definition at line 310 of file qcoreevent.h.

310 { m_accept = false; }
static int registerEventType ( int  hint = -1)
static

Friends And Related Function Documentation

friend class QCoreApplication
friend

Definition at line 324 of file qcoreevent.h.

friend class QCoreApplicationPrivate
friend

Definition at line 325 of file qcoreevent.h.

friend class QThreadData
friend

Definition at line 326 of file qcoreevent.h.

friend class QApplication
friend

Definition at line 327 of file qcoreevent.h.

friend class QApplicationPrivate
friend

Definition at line 328 of file qcoreevent.h.

friend class Q3AccelManager
friend

Definition at line 329 of file qcoreevent.h.

friend class QShortcutMap
friend

Definition at line 330 of file qcoreevent.h.

friend class QETWidget
friend

Definition at line 331 of file qcoreevent.h.

friend class QGraphicsView
friend

Definition at line 332 of file qcoreevent.h.

friend class QGraphicsViewPrivate
friend

Definition at line 333 of file qcoreevent.h.

friend class QGraphicsScene
friend

Definition at line 334 of file qcoreevent.h.

friend class QGraphicsScenePrivate
friend

Definition at line 335 of file qcoreevent.h.

friend class QGestureManager
friend

Definition at line 337 of file qcoreevent.h.

Member Data Documentation

QEventPrivate* d
protected

Definition at line 315 of file qcoreevent.h.

ushort t
protected

Definition at line 316 of file qcoreevent.h.


The documentation for this class was generated from the following file: