Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtCore.QEvent Class Reference

The QEvent class is the base class of all event classes. Event objects contain event parameters. More...

Inheritance diagram for QtCore.QEvent:
Collaboration diagram for QtCore.QEvent:

Public Types

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

Public Member Functions

 QEvent (QEvent copy)
 
 
 QEvent (QEvent.Type type)
 
 
virtual void CreateProxy ()
 
new void Accept ()
 
 
new void Ignore ()
 
 
new bool IsAccepted ()
 
new void SetAccepted (bool accepted)
 
new bool Spontaneous ()
 
 
new QEvent.Type type ()
 
 
new void Dispose ()
 

Static Public Member Functions

static int RegisterEventType (int hint=-1)
 
 

Protected Member Functions

 QEvent (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

virtual System.IntPtr SmokeObject [get, set]
 
new ushort T [get, set]
 
static new QMetaObject StaticMetaObject [get]
 

Detailed Description

The QEvent class is the base class of all event classes. Event objects contain event parameters.

Qt's main event loop (QCoreApplication::exec()) fetches native window system events from the event queue, translates them into QEvents, and sends the translated events to QObjects.

In general, events come from the underlying window system (spontaneous() returns true), but it is also possible to manually send events using QCoreApplication::sendEvent() and QCoreApplication::postEvent() (spontaneous() returns false).

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 destined for another object.

The basic QEvent contains only an event type parameter and an "accept" flag. The accept flag set with accept(), and cleared with ignore(). It is set by default, but don't rely on this as subclasses may choose to clear it in their constructor.

Subclasses of QEvent contain additional parameters that describe the particular event.

See also QObject::event(), QObject::installEventFilter(), QWidget::event(), QCoreApplication::sendEvent(), QCoreApplication::postEvent(), and QCoreApplication::processEvents().

Member Enumeration Documentation

This enum type defines the valid event types in Qt. The event types and the specialized classes for each type are as follows:

User events should have values between User and MaxUser:

For convenience, you can use the registerEventType() function to register and reserve a custom event type for your application. Doing so will allow you to avoid accidentally re-using a custom event type already in use elsewhere in your application.

Enumerator:
AcceptDropsChange 
AccessibilityDescription 

Used to query accessibility description texts (QAccessibleEvent).

AccessibilityHelp 

Used to query accessibility help texts (QAccessibleEvent).

AccessibilityPrepare 

Accessibility information is requested.

ActionAdded 

A new action has been added (QActionEvent).

ActionChanged 

An action has been changed (QActionEvent).

ActionRemoved 

An action has been removed (QActionEvent).

ActivateControl 
ActivationChange 

A widget's top-level window activation state has changed.

ApplicationActivate 

The application has been made available to the user.

ApplicationActivated 

This enum has been deprecated. Use ApplicationActivate instead.

ApplicationDeactivate 

The application has been suspended, and is unavailable to the user.

ApplicationDeactivated 
ApplicationFontChange 

The default application font has changed.

ApplicationLayoutDirectionChange 

The default application layout direction has changed.

ApplicationPaletteChange 

The default application palette has changed.

ApplicationWindowIconChange 

The application's icon has changed.

ChildAdded 

An object gets a child (QChildEvent).

ChildPolished 

A widget child gets polished (QChildEvent).

ChildRemoved 

An object loses a child (QChildEvent).

Clipboard 

The clipboard contents have changed (QClipboardEvent).

Close 

Widget was closed (QCloseEvent).

CloseSoftwareInputPanel 

A widget wants to close the software input panel (SIP).

ContentsRectChange 

The margins of the widget's content rect changed.

ContextMenu 

Context popup menu (QContextMenuEvent).

Create 
CursorChange 

The widget's cursor has changed.

DeactivateControl 
DeferredDelete 

The object will be deleted after it has cleaned up.

Destroy 
DragEnter 

The cursor enters a widget during a drag and drop operation (QDragEnterEvent).

DragLeave 

The cursor leaves a widget during a drag and drop operation (QDragLeaveEvent).

DragMove 

A drag and drop operation is in progress (QDragMoveEvent).

DragResponse 
Drop 

A drag and drop operation is completed (QDropEvent).

DynamicPropertyChange 

A dynamic property was added, changed or removed from the object.

EmbeddingControl 
EnabledChange 

Widget's enabled state has changed.

Enter 

Mouse enters widget's boundaries.

EnterWhatsThisMode 

Send to toplevel widgets when the application enters "What's This?" mode.

FileOpen 

File open request (QFileOpenEvent).

FocusIn 

Widget gains keyboard focus (QFocusEvent).

FocusOut 

Widget loses keyboard focus (QFocusEvent).

FontChange 

Widget's font has changed.

FutureCallOut 
Gesture 

A gesture was triggered (QGestureEvent)

GestureOverride 

A gesture override was triggered (QGestureEvent)

GrabKeyboard 

Item gains keyboard grab (QGraphicsItem only).

GrabMouse 

Item gains mouse grab (QGraphicsItem only).

GraphicsSceneContextMenu 

Context popup menu over a graphics scene (QGraphicsSceneContextMenuEvent).

GraphicsSceneDragEnter 

The cursor enters a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent).

GraphicsSceneDragLeave 

The cursor leaves a graphics scene during a drag and drop operation (QGraphicsSceneDragDropEvent).

GraphicsSceneDragMove 

A drag and drop operation is in progress over a scene (QGraphicsSceneDragDropEvent).

GraphicsSceneDrop 

A drag and drop operation is completed over a scene (QGraphicsSceneDragDropEvent).

GraphicsSceneHelp 

The user requests help for a graphics scene (QHelpEvent).

GraphicsSceneHoverEnter 

The mouse cursor enters a hover item in a graphics scene (QGraphicsSceneHoverEvent).

GraphicsSceneHoverLeave 

The mouse cursor leaves a hover item in a graphics scene (QGraphicsSceneHoverEvent).

GraphicsSceneHoverMove 

The mouse cursor moves inside a hover item in a graphics scene (QGraphicsSceneHoverEvent).

GraphicsSceneMouseDoubleClick 

Mouse press again (double click) in a graphics scene (QGraphicsSceneMouseEvent).

GraphicsSceneMouseMove 

Move mouse in a graphics scene (QGraphicsSceneMouseEvent).

GraphicsSceneMousePress 

Mouse press in a graphics scene (QGraphicsSceneMouseEvent).

GraphicsSceneMouseRelease 

Mouse release in a graphics scene (QGraphicsSceneMouseEvent).

GraphicsSceneMove 

Widget was moved (QGraphicsSceneMoveEvent).

GraphicsSceneResize 

Widget was resized (QGraphicsSceneResizeEvent).

GraphicsSceneWheel 

Mouse wheel rolled in a graphics scene (QGraphicsSceneWheelEvent).

HelpRequest 
Hide 

Widget was hidden (QHideEvent).

HideToParent 

A child widget has been hidden.

HoverEnter 

The mouse cursor enters a hover widget (QHoverEvent).

HoverLeave 

The mouse cursor leaves a hover widget (QHoverEvent).

HoverMove 

The mouse cursor moves inside a hover widget (QHoverEvent).

IconDrag 

The main icon of a window has been dragged away (QIconDragEvent).

IconTextChange 

Widget's icon text has been changed.

InputMethod 

An input method is being used (QInputMethodEvent).

KeyPress 

Key press (QKeyEvent).

KeyRelease 

Key release (QKeyEvent).

KeyboardLayoutChange 

The keyboard layout has changed.

LanguageChange 

The application translation changed.

LayoutDirectionChange 

The direction of layouts changed.

LayoutRequest 

Widget layout needs to be redone.

Leave 

Mouse leaves widget's boundaries.

LeaveWhatsThisMode 

Send to toplevel widgets when the application leaves "What's This?" mode.

LocaleChange 

The system locale has changed.

MacGLClearDrawable 
MacGLWindowChange 
MacSizeChange 

The user changed his widget sizes (Mac OS X only).

MaxUser 

Last user event ID.

MenubarUpdated 

The window's menu bar has been updated.

MetaCall 

An asynchronous method invocation via QMetaObject::invokeMethod().

ModifiedChange 

Widgets modification state has been changed.

MouseButtonDblClick 

Mouse press again (QMouseEvent).

MouseButtonPress 

Mouse press (QMouseEvent).

MouseButtonRelease 

Mouse release (QMouseEvent).

MouseMove 

Mouse move (QMouseEvent).

MouseTrackingChange 

The mouse tracking state has changed.

Move 

Widget's position changed (QMoveEvent).

NativeGesture 
NetworkReplyUpdated 
NonClientAreaMouseButtonDblClick 

A mouse double click occurred outside the client area.

NonClientAreaMouseButtonPress 

A mouse button press occurred outside the client area.

NonClientAreaMouseButtonRelease 

A mouse button release occurred outside the client area.

NonClientAreaMouseMove 

A mouse move occurred outside the client area.

None 

Not an event.

OkRequest 

Ok button in decoration pressed. Supported only for Windows CE.

Paint 

Screen update necessary (QPaintEvent).

PaletteChange 

Palette of the widget changed.

ParentAboutToChange 

The widget parent is about to change.

ParentChange 

The widget parent has changed.

Polish 

The widget is polished.

PolishRequest 

The widget should be polished.

QueryWhatsThis 

The widget should accept the event if it has "What's This?" help.

Quit 
RequestSoftwareInputPanel 

A widget wants to open a software input panel (SIP).

Resize 

Widget's size changed (QResizeEvent).

Shortcut 

Key press in child for shortcut key handling (QShortcutEvent).

ShortcutOverride 

Key press in child, for overriding shortcut key handling (QKeyEvent).

Show 

Widget was shown on screen (QShowEvent).

ShowToParent 

A child widget has been shown.

ShowWindowRequest 
SockAct 

Socket activated, used to implement QSocketNotifier.

Speech 
StateMachineSignal 

A signal delivered to a state machine (QStateMachine::SignalEvent).

StateMachineWrapped 

The event is a wrapper for, i.e., contains, another event (QStateMachine::WrappedEvent).

StatusTip 

A status tip is requested (QStatusTipEvent).

Style 
StyleChange 

Widget's style has been changed.

TabletEnterProximity 

Wacom tablet enter proximity event (QTabletEvent), sent to QApplication.

TabletLeaveProximity 

Wacom tablet leave proximity event (QTabletEvent), sent to QApplication.

TabletMove 

Wacom tablet move (QTabletEvent).

TabletPress 

Wacom tablet press (QTabletEvent).

TabletRelease 

Wacom tablet release (QTabletEvent).

ThreadChange 
Timer 

Regular timer events (QTimerEvent).

ToolBarChange 

The toolbar button is toggled on Mac OS X.

ToolTip 

A tooltip was requested (QHelpEvent).

ToolTipChange 

The widget's tooltip has changed.

TouchBegin 

Beginning of a sequence of touch-screen and/or track-pad events (QTouchEvent)

TouchEnd 

End of touch-event sequence (QTouchEvent)

TouchUpdate 

Touch-screen event (QTouchEvent)

UngrabKeyboard 

Item loses keyboard grab (QGraphicsItem only).

UngrabMouse 

Item loses mouse grab (QGraphicsItem only).

UpdateLater 

The widget should be queued to be repainted at a later time.

UpdateRequest 

The widget should be repainted.

UpdateSoftKeys 
User 

User-defined event.

WhatsThis 

The widget should reveal "What's This?" help (QHelpEvent).

WhatsThisClicked 

A link in a widget's "What's This?" help was clicked.

Wheel 

Mouse wheel rolled (QWheelEvent).

WinEventAct 

A Windows-specific activation event has occurred.

WinIdChange 

The window system identifer for this native widget has changed

WindowActivate 

Window was activated.

WindowBlocked 

The window is blocked by a modal dialog.

WindowDeactivate 

Window was deactivated.

WindowIconChange 

The window's icon has changed.

WindowStateChange 

The window's state (minimized, maximized or full-screen) has changed (QWindowStateChangeEvent).

WindowTitleChange 

The window title has changed.

WindowUnblocked 

The window is unblocked after a modal dialog exited.

ZOrderChange 

The widget's z-order has changed. This event is never sent to top level windows.

ZeroTimerEvent 

Constructor & Destructor Documentation

QtCore.QEvent.QEvent ( System.Type  dummy)
protected
QtCore.QEvent.QEvent ( QEvent  copy)

Contructs an event object of type type.

QtCore.QEvent.QEvent ( QEvent.Type  type)

Contructs an event object of type type.

Member Function Documentation

new void QtCore.QEvent.Accept ( )

Sets the accept flag of the event object, the equivalent of calling setAccepted(true).

Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent widget.

See also ignore().

new void QtCore.QEvent.Dispose ( )
new void QtCore.QEvent.Ignore ( )

Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).

Clearing the accept parameter indicates that the event receiver does not want the event. Unwanted events might be propagated to the parent widget.

See also accept().

new bool QtCore.QEvent.IsAccepted ( )
static int QtCore.QEvent.RegisterEventType ( int  hint = -1)
static

Registers and returns a custom event type. The hint provided will be used if it is available, otherwise it will return a value between QEvent::User and QEvent::MaxUser that has not yet been registered. The hint is ignored if its value is not between QEvent::User and QEvent::MaxUser.

Note: This function is thread-safe.

This function was introduced in Qt 4.4.

new void QtCore.QEvent.SetAccepted ( bool  accepted)
new bool QtCore.QEvent.Spontaneous ( )

Returns true if the event originated outside the application (a system event); otherwise returns false.

The return value of this function is not defined for paint events.

new QEvent.Type QtCore.QEvent.type ( )

Returns the event type.

Member Data Documentation

SmokeInvocation QtCore.QEvent.interceptor
protected

Property Documentation

virtual System.IntPtr QtCore.QEvent.SmokeObject
getset
new QMetaObject QtCore.QEvent.StaticMetaObject
staticget
new ushort QtCore.QEvent.T
getsetprotected