44 #ifndef QT_NO_STATEMACHINE 46 #include <QtGui/qevent.h> 47 #include <QtGui/qpainterpath.h> 49 #include <private/qabstracttransition_p.h> 161 return d->modifierMask;
198 if (event->
type() ==
d->eventType) {
200 return (me->
button() ==
d->button)
201 && ((me->
modifiers() &
d->modifierMask) ==
d->modifierMask)
202 && (
d->path.isEmpty() ||
d->path.contains(me->
pos()));
216 #endif //QT_NO_STATEMACHINE
The QBasicMouseEventTransition class provides a transition for Qt mouse events.
#define QT_END_NAMESPACE
This macro expands to.
The QAbstractTransition class is the base class of transitions between QAbstractState objects...
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
QState * sourceState() const
Qt::KeyboardModifiers modifierMask() const
Returns the keyboard modifier mask that this mouse event transition checks for.
void onTransition(QEvent *)
Reimplemented Function
QBasicMouseEventTransition(QState *sourceState=0)
Constructs a new mouse event transition with the given sourceState.
The QState class provides a general-purpose state for QStateMachine.
void setEventType(QEvent::Type type)
Sets the event type that this mouse event transition is associated with.
const QPoint & pos() const
Returns the position of the mouse cursor, relative to the widget that received the event...
void setHitTestPath(const QPainterPath &path)
Sets the hit test path for this mouse event transition.
static QBasicMouseEventTransitionPrivate * get(QBasicMouseEventTransition *q)
#define QT_BEGIN_NAMESPACE
This macro expands to.
QEvent::Type eventType() const
Returns the event type that this mouse event transition is associated with.
bool eventTest(QEvent *event)
Reimplemented Function
QPainterPath hitTestPath() const
Returns the hit test path for this mouse event transition.
QState * sourceState() const
Qt::MouseButton button() const
Returns the button that caused the event.
~QBasicMouseEventTransition()
Destroys this mouse event transition.
void setButton(Qt::MouseButton button)
Sets the button that this mouse event transition will check for.
The QMouseEvent class contains parameters that describe a mouse event.
Qt::KeyboardModifiers modifierMask
#define Q_DECLARE_PUBLIC(Class)
Type
This enum type defines the valid event types in Qt.
Qt::MouseButton button() const
Returns the button that this mouse event transition checks for.
bool event(QEvent *e)
Reimplemented Function
void setModifierMask(Qt::KeyboardModifiers modifiers)
Sets the keyboard modifier mask that this mouse event transition will check for.
QBasicMouseEventTransitionPrivate()
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.