You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/man/man3/tqevent.3qt

239 lines
10 KiB

'\" t
.TH QEvent 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. 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 <ntqevent.h>\fR
.PP
Inherits Qt.
.PP
Inherited by QTimerEvent, QMouseEvent, QWheelEvent, QTabletEvent, QKeyEvent, QFocusEvent, QPaintEvent, QMoveEvent, QResizeEvent, QCloseEvent, QIconDragEvent, QShowEvent, QHideEvent, QContextMenuEvent, QIMEvent, QDropEvent, QDragLeaveEvent, QChildEvent, and QCustomEvent.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum \fBType\fR { 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, WindowBlocked = 74, WindowUnblocked = 75, ActivateControl = 80, DeactivateControl = 81, ContextMenu = 82, IMStart = 83, IMCompose = 84, IMEnd = 85, Accessibility = 86, TabletMove = 87, LocaleChange = 88, LanguageChange = 89, LayoutDirectionChange = 90, Style = 91, TabletPress = 92, TabletRelease = 93, OkRequest = 94, HelpRequest = 95, WindowStateChange = 96, IconDrag = 97, User = 1000, MaxUser = 65535 }"
.br
.ti -1c
.BI "\fBQEvent\fR ( Type type )"
.br
.ti -1c
.BI "virtual \fB~QEvent\fR ()"
.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
Qt's main event loop (QApplication::exec()) fetches native window system events from the event queue, translates them into QEvents and sends the translated events to QObjects.
.PP
In general, events come from the underlying window system (spontaneous() returns TRUE) but it is also possible to manually send events 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 destined for 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 event types and the specialized classes for each type are these:
.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, QIMEvent.
.TP
\fCQEvent::IMCompose\fR - Input method composition is taking place, QIMEvent.
.TP
\fCQEvent::IMEnd\fR - The end of input method composition, QIMEvent.
.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 (obsolete).
.TP
\fCQEvent::ShowMaximized\fR - Widget should be shown maximized (obsolete).
.TP
\fCQEvent::ShowMinimized\fR - Widget should be shown minimized (obsolete).
.TP
\fCQEvent::ShowFullScreen\fR - Widget should be shown full-screen (obsolete).
.TP
\fCQEvent::ShowWindowRequest\fR - Widget's window should be shown (obsolete).
.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::AccelOverride\fR - Key press in child, for overriding shortcut key handling, QKeyEvent.
.TP
\fCQEvent::AccelAvailable\fR - internal.
.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::LanguageChange\fR - The application translation changed, QTranslator
.TP
\fCQEvent::LayoutDirectionChange\fR - The direction of layouts changed
.TP
\fCQEvent::LocaleChange\fR - The system locale changed
.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::TabletMove\fR - A Wacom Tablet Move Event.
.TP
\fCQEvent::Style\fR - Internal use only
.TP
\fCQEvent::TabletPress\fR - A Wacom Tablet Press Event
.TP
\fCQEvent::TabletRelease\fR - A Wacom Tablet Release Event
.TP
\fCQEvent::OkRequest\fR - Internal event used by Qt on some platforms.
.TP
\fCQEvent::HelpRequest\fR - Internal event used by Qt on some platforms.
.TP
\fCQEvent::IconDrag\fR - Internal event used by Qt on some platforms when proxy icon is dragged.
.TP
\fCQEvent::WindowStateChange\fR - The window's state, i.e. minimized, maximized or full-screen, has changed. See QWidget::windowState().
.TP
\fCQEvent::WindowBlocked\fR - The window is modally blocked
.TP
\fCQEvent::WindowUnblocked\fR - The window leaves modal blocking
.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 "QEvent::~QEvent ()\fC [virtual]\fR"
Destroys the event. If it was posted, it will be removed from the list of events to be posted.
.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/ntqevent.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, 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 (tqevent.3qt) and the Qt
version (3.3.8).