Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos | Atributos protegidos | Amigas
Referencia de la Clase QEvent

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

#include <qevent.h>

Diagrama de herencias de QEvent
Qt Qt QChildEvent QChildEvent QCloseEvent QCloseEvent QContextMenuEvent QContextMenuEvent QCustomEvent QCustomEvent QDragLeaveEvent QDragLeaveEvent QDragResponseEvent QDragResponseEvent QDropEvent QDropEvent QFocusEvent QFocusEvent QHideEvent QHideEvent QIconDragEvent QIconDragEvent QIMEvent QIMEvent QKeyEvent QKeyEvent QMouseEvent QMouseEvent QMoveEvent QMoveEvent QPaintEvent QPaintEvent QResizeEvent QResizeEvent QShowEvent QShowEvent QTabletEvent QTabletEvent QTimerEvent QTimerEvent QWheelEvent QWheelEvent

Lista de todos los miembros.

Tipos públicos

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, 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,
  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
}
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, 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,
  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
}

Métodos públicos

 QEvent (Type type)
virtual ~QEvent ()
Type type () const
bool spontaneous () const
 QEvent (Type type)
virtual ~QEvent ()
Type type () const
bool spontaneous () const

Atributos protegidos

Type t

Amigas

class QApplication
class QAccelManager
class QBaseApplication
class QETWidget

Descripción detallada

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

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.

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).

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. Subclasses of QEvent contain additional parameters that describe the particular event.

Ver también:
QObject::event() QObject::installEventFilter() QWidget::event() QApplication::sendEvent() QApplication::postEvent() QApplication::processEvents()

Documentación de las enumeraciones miembro de la clase

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

None Not an event. Accessibility Accessibility information is requested Timer Regular timer events, {QTimerEvent}. MouseButtonPress Mouse press, {QMouseEvent}. MouseButtonRelease Mouse release, {QMouseEvent}. MouseButtonDblClick Mouse press again, {QMouseEvent}. MouseMove Mouse move, {QMouseEvent}. KeyPress Key press (including Shift, for example), {QKeyEvent}. KeyRelease Key release, {QKeyEvent}. IMStart The start of input method composition, {QIMEvent}. IMCompose Input method composition is taking place, {QIMEvent}. IMEnd The end of input method composition, {QIMEvent}. FocusIn Widget gains keyboard focus, {QFocusEvent}. FocusOut Widget loses keyboard focus, {QFocusEvent}. Enter Mouse enters widget's boundaries. Leave Mouse leaves widget's boundaries. Paint Screen update necessary, {QPaintEvent}. Move Widget's position changed, {QMoveEvent}. Resize Widget's size changed, {QResizeEvent}. Show Widget was shown on screen, {QShowEvent}. Hide Widget was hidden, {QHideEvent}. ShowToParent A child widget has been shown. HideToParent A child widget has been hidden. Close Widget was closed (permanently), {QCloseEvent}. ShowNormal Widget should be shown normally (obsolete). ShowMaximized Widget should be shown maximized (obsolete). ShowMinimized Widget should be shown minimized (obsolete). ShowFullScreen Widget should be shown full-screen (obsolete). ShowWindowRequest Widget's window should be shown (obsolete). DeferredDelete The object will be deleted after it has cleaned up. Accel Key press in child for shortcut key handling, {QKeyEvent}. Wheel Mouse wheel rolled, {QWheelEvent}. ContextMenu Context popup menu, {QContextMenuEvent} AccelOverride Key press in child, for overriding shortcut key handling, {QKeyEvent}. AccelAvailable internal. WindowActivate Window was activated. WindowDeactivate Window was deactivated. CaptionChange Widget's caption changed. IconChange Widget's icon changed. ParentFontChange Font of the parent widget changed. ApplicationFontChange Default application font changed. PaletteChange Palette of the widget changed. ParentPaletteChange Palette of the parent widget changed. ApplicationPaletteChange Default application palette changed. Clipboard Clipboard contents have changed. SockAct Socket activated, used to implement {QSocketNotifier}. DragEnter A drag-and-drop enters widget, {QDragEnterEvent}. DragMove A drag-and-drop is in progress, {QDragMoveEvent}. DragLeave A drag-and-drop leaves widget, {QDragLeaveEvent}. Drop A drag-and-drop is completed, {QDropEvent}. DragResponse Internal event used by Qt on some platforms. ChildInserted Object gets a child, {QChildEvent}. ChildRemoved Object loses a child, {QChildEvent}. LayoutHint Widget child has changed layout properties. ActivateControl Internal event used by Qt on some platforms. DeactivateControl Internal event used by Qt on some platforms. LanguageChange The application translation changed, {QTranslator} LayoutDirectionChange The direction of layouts changed LocaleChange The system locale changed Quit Reserved. Create Reserved. Destroy Reserved. Reparent Reserved. Speech Reserved for speech input. TabletMove A Wacom Tablet Move Event. Style Internal use only TabletPress A Wacom Tablet Press Event TabletRelease A Wacom Tablet Release Event OkRequest Internal event used by Qt on some platforms. HelpRequest Internal event used by Qt on some platforms. IconDrag Internal event used by Qt on some platforms when proxy icon is dragged. WindowStateChange The window's state, i.e. minimized, maximized or full-screen, has changed. See {QWidget::windowState()}. WindowBlocked The window is modally blocked WindowUnblocked The window leaves modal blocking

User User defined event. MaxUser Last user event id.

User events should have values between User and MaxUser inclusive.

Valores de enumeraciones:
None 
Timer 
MouseButtonPress 
MouseButtonRelease 
MouseButtonDblClick 
MouseMove 
KeyPress 
KeyRelease 
FocusIn 
FocusOut 
Enter 
Leave 
Paint 
Move 
Resize 
Create 
Destroy 
Show 
Hide 
Close 
Quit 
Reparent 
ShowMinimized 
ShowNormal 
WindowActivate 
WindowDeactivate 
ShowToParent 
HideToParent 
ShowMaximized 
ShowFullScreen 
Accel 
Wheel 
AccelAvailable 
CaptionChange 
IconChange 
ParentFontChange 
ApplicationFontChange 
ParentPaletteChange 
ApplicationPaletteChange 
PaletteChange 
Clipboard 
Speech 
SockAct 
AccelOverride 
DeferredDelete 
DragEnter 
DragMove 
DragLeave 
Drop 
DragResponse 
ChildInserted 
ChildRemoved 
LayoutHint 
ShowWindowRequest 
WindowBlocked 
WindowUnblocked 
ActivateControl 
DeactivateControl 
ContextMenu 
IMStart 
IMCompose 
IMEnd 
Accessibility 
TabletMove 
LocaleChange 
LanguageChange 
LayoutDirectionChange 
Style 
TabletPress 
TabletRelease 
OkRequest 
HelpRequest 
WindowStateChange 
IconDrag 
User 
MaxUser 
None 
Timer 
MouseButtonPress 
MouseButtonRelease 
MouseButtonDblClick 
MouseMove 
KeyPress 
KeyRelease 
FocusIn 
FocusOut 
Enter 
Leave 
Paint 
Move 
Resize 
Create 
Destroy 
Show 
Hide 
Close 
Quit 
Reparent 
ShowMinimized 
ShowNormal 
WindowActivate 
WindowDeactivate 
ShowToParent 
HideToParent 
ShowMaximized 
ShowFullScreen 
Accel 
Wheel 
AccelAvailable 
CaptionChange 
IconChange 
ParentFontChange 
ApplicationFontChange 
ParentPaletteChange 
ApplicationPaletteChange 
PaletteChange 
Clipboard 
Speech 
SockAct 
AccelOverride 
DeferredDelete 
DragEnter 
DragMove 
DragLeave 
Drop 
DragResponse 
ChildInserted 
ChildRemoved 
LayoutHint 
ShowWindowRequest 
WindowBlocked 
WindowUnblocked 
ActivateControl 
DeactivateControl 
ContextMenu 
IMStart 
IMCompose 
IMEnd 
Accessibility 
TabletMove 
LocaleChange 
LanguageChange 
LayoutDirectionChange 
Style 
TabletPress 
TabletRelease 
OkRequest 
HelpRequest 
WindowStateChange 
IconDrag 
User 
MaxUser 
Valores de enumeraciones:
None 
Timer 
MouseButtonPress 
MouseButtonRelease 
MouseButtonDblClick 
MouseMove 
KeyPress 
KeyRelease 
FocusIn 
FocusOut 
Enter 
Leave 
Paint 
Move 
Resize 
Create 
Destroy 
Show 
Hide 
Close 
Quit 
Reparent 
ShowMinimized 
ShowNormal 
WindowActivate 
WindowDeactivate 
ShowToParent 
HideToParent 
ShowMaximized 
ShowFullScreen 
Accel 
Wheel 
AccelAvailable 
CaptionChange 
IconChange 
ParentFontChange 
ApplicationFontChange 
ParentPaletteChange 
ApplicationPaletteChange 
PaletteChange 
Clipboard 
Speech 
SockAct 
AccelOverride 
DeferredDelete 
DragEnter 
DragMove 
DragLeave 
Drop 
DragResponse 
ChildInserted 
ChildRemoved 
LayoutHint 
ShowWindowRequest 
WindowBlocked 
WindowUnblocked 
ActivateControl 
DeactivateControl 
ContextMenu 
IMStart 
IMCompose 
IMEnd 
Accessibility 
TabletMove 
LocaleChange 
LanguageChange 
LayoutDirectionChange 
Style 
TabletPress 
TabletRelease 
OkRequest 
HelpRequest 
WindowStateChange 
IconDrag 
User 
MaxUser 
None 
Timer 
MouseButtonPress 
MouseButtonRelease 
MouseButtonDblClick 
MouseMove 
KeyPress 
KeyRelease 
FocusIn 
FocusOut 
Enter 
Leave 
Paint 
Move 
Resize 
Create 
Destroy 
Show 
Hide 
Close 
Quit 
Reparent 
ShowMinimized 
ShowNormal 
WindowActivate 
WindowDeactivate 
ShowToParent 
HideToParent 
ShowMaximized 
ShowFullScreen 
Accel 
Wheel 
AccelAvailable 
CaptionChange 
IconChange 
ParentFontChange 
ApplicationFontChange 
ParentPaletteChange 
ApplicationPaletteChange 
PaletteChange 
Clipboard 
Speech 
SockAct 
AccelOverride 
DeferredDelete 
DragEnter 
DragMove 
DragLeave 
Drop 
DragResponse 
ChildInserted 
ChildRemoved 
LayoutHint 
ShowWindowRequest 
WindowBlocked 
WindowUnblocked 
ActivateControl 
DeactivateControl 
ContextMenu 
IMStart 
IMCompose 
IMEnd 
Accessibility 
TabletMove 
LocaleChange 
LanguageChange 
LayoutDirectionChange 
Style 
TabletPress 
TabletRelease 
OkRequest 
HelpRequest 
WindowStateChange 
IconDrag 
User 
MaxUser 

Documentación del constructor y destructor

QEvent::QEvent ( Type  type) [inline]

Contructs an event object of type type.

QEvent::~QEvent ( ) [virtual]

Destroys the event. If it was posted , it will be removed from the list of events to be posted.

QEvent::QEvent ( Type  type) [inline]
virtual QEvent::~QEvent ( ) [virtual]

Documentación de las funciones miembro

bool QEvent::spontaneous ( ) const [inline]

Returns TRUE if the event originated outside the application, i.e. it is a system event; otherwise returns FALSE.

bool QEvent::spontaneous ( ) const [inline]
Type QEvent::type ( ) const [inline]
QEvent::Type QEvent::type ( ) const [inline]

Returns the event type.


Documentación de las funciones relacionadas y clases amigas

QAccelManager [friend]
QApplication [friend]

Reimplementado en QPaintEvent, QMoveEvent y QResizeEvent.

QBaseApplication [friend]

Reimplementado en QPaintEvent, QMoveEvent y QResizeEvent.

QETWidget [friend]

Documentación de los datos miembro

Type QEvent::t [protected]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'