Home

QtEventTransition Class Reference
[QtCore module]

The QtEventTransition class provides a QObject-specific transition for Qt events. More...

 #include <QtEventTransition>

Inherits QtTransition.

Inherited by QtKeyEventTransition and QtMouseEventTransition.

Public Functions

Additional Inherited Members


Detailed Description

The QtEventTransition class provides a QObject-specific transition for Qt events.

A QtEventTransition object binds an event or transition to a particular QObject. QtEventTransition is part of The State Machine Framework.

Example:

 QPushButton *button = ...;
 QtState *s1 = ...;
 QtState *s2 = ...;
 // If in s1 and the button receives an Enter event, transition to s2
 s1->addTransition(new QtEventTransition(button, QEvent::Enter), s2);
 // If in s2 and the button receives an Exit event, transition back to s1
 s2->addTransition(new QtEventTransition(button, QEvent::Leave), s1);

See also QtState::addTransition().


Member Function Documentation

QtEventTransition::QtEventTransition ( QObject * object, QtAbstractTransition * transition )

Constructs a new QtEventTransition object that binds the given transition to the given object. The new QtEventTransition object takes ownership of transition.

QtEventTransition::QtEventTransition ( QObject * object, QEvent::Type type )

Constructs a new QtEventTransition object associated with events of the given type for the given object.

QtEventTransition::~QtEventTransition ()

Destroys this QObject event transition.


Copyright © 2009 Nokia Trademarks
Qt Solutions