Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QEvent class is the base class of all event classes. Event objects contain event parameters. 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] |
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().
enum QtCore.QEvent.Type |
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.
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 |
|
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.
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().
|
virtual |
Reimplemented in QtGui.QWindowStateChangeEvent, QtGui.QWheelEvent, QtGui.QWhatsThisClickedEvent, QtGui.QTouchEvent, QtGui.QToolBarChangeEvent, QtGui.QTabletEvent, QtGui.QStatusTipEvent, QtGui.QShowEvent, QtGui.QShortcutEvent, QtGui.QResizeEvent, QtGui.QPaintEvent, QtGui.QMoveEvent, QtGui.QMouseEvent, QtGui.QKeyEvent, QtGui.QInputMethodEvent, QtGui.QInputEvent, QtGui.QIconDragEvent, QtGui.QHoverEvent, QtGui.QHideEvent, QtGui.QHelpEvent, QtCore.QTimerEvent, QtGui.QGraphicsSceneWheelEvent, QtGui.QGraphicsSceneResizeEvent, QtGui.QGraphicsSceneMoveEvent, QtGui.QGraphicsSceneMouseEvent, QtGui.QGraphicsSceneHoverEvent, QtGui.QGraphicsSceneHelpEvent, QtGui.QGraphicsSceneEvent, QtGui.QGraphicsSceneDragDropEvent, QtGui.QGraphicsSceneContextMenuEvent, QtGui.QGestureEvent, QtGui.QFocusEvent, QtGui.QFileOpenEvent, QtGui.QDropEvent, QtGui.QDragResponseEvent, QtGui.QDragMoveEvent, QtGui.QDragLeaveEvent, QtGui.QDragEnterEvent, QtGui.QContextMenuEvent, QtCore.QDynamicPropertyChangeEvent, QtGui.QCloseEvent, QtGui.QClipboardEvent, QtCore.QChildEvent, and QtGui.QActionEvent.
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 |
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.
|
protected |
|
getset |
|
staticget |
|
getsetprotected |