CopperSpice API  1.9.1
QMouseEventTransition Class Reference

The QMouseEventTransition class provides a transition for mouse events. More...

Inheritance diagram for QMouseEventTransition:
QEventTransition QAbstractTransition QObject

Public Methods

 QMouseEventTransition (QObject *object, QEvent::Type type, Qt::MouseButton button, QState *sourceState=nullptr)
 
 QMouseEventTransition (QState *sourceState=nullptr)
 
 ~QMouseEventTransition ()
 
Qt::MouseButton button () const
 
QPainterPath hitTestPath () const
 
Qt::KeyboardModifiers modifierMask () const
 
void setButton (Qt::MouseButton button)
 
void setHitTestPath (const QPainterPath &path)
 
void setModifierMask (Qt::KeyboardModifiers modifiers)
 
- Public Methods inherited from QEventTransition
 QEventTransition (QObject *object, QEvent::Type type, QState *sourceState=nullptr)
 
 QEventTransition (QState *sourceState=nullptr)
 
 ~QEventTransition ()
 
QObjecteventSource () const
 
QEvent::Type eventType () const
 
void setEventSource (QObject *object)
 
void setEventType (QEvent::Type type)
 
- Public Methods inherited from QAbstractTransition
 QAbstractTransition (QState *sourceState=nullptr)
 
virtual ~QAbstractTransition ()
 
void addAnimation (QAbstractAnimation *animation)
 
QList< QAbstractAnimation * > animations () const
 
QStateMachinemachine () const
 
void removeAnimation (QAbstractAnimation *animation)
 
void setTargetState (QAbstractState *target)
 
void setTargetStates (const QList< QAbstractState * > &targets)
 
void setTransitionType (TransitionType type)
 
QStatesourceState () const
 
QAbstractStatetargetState () const
 
QList< QAbstractState * > targetStates () const
 
TransitionType transitionType () const
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &childName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

bool eventTest (QEvent *event) override
 
void onTransition (QEvent *event) override
 
- Protected Methods inherited from QEventTransition
bool event (QEvent *event) override
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Properties

 button
 
 modifierMask
 
- Properties inherited from QEventTransition
 eventSource
 
 eventType
 
- Properties inherited from QAbstractTransition
 sourceState
 
 targetState
 
 targetStates
 
 transitionType
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Public Types inherited from QAbstractTransition
enum  TransitionType
 
- Public Signals inherited from QAbstractTransition
void targetStateChanged ()
 
void targetStatesChanged ()
 
void triggered ()
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 

Detailed Description

The QMouseEventTransition class provides a transition for mouse events. QMouseEventTransition is part of State Machine.

See also
QState::addTransition()

Constructor & Destructor Documentation

QMouseEventTransition::QMouseEventTransition ( QState sourceState = nullptr)

Constructs a new mouse event transition with the given sourceState.

QMouseEventTransition::QMouseEventTransition ( QObject object,
QEvent::Type  type,
Qt::MouseButton  button,
QState sourceState = nullptr 
)

Constructs a new mouse event transition for events of the given type for the given object, with the given button and sourceState.

QMouseEventTransition::~QMouseEventTransition ( )

Destroys this mouse event transition.

Method Documentation

Qt::MouseButton QMouseEventTransition::button ( ) const

Returns the value of the property.

bool QMouseEventTransition::eventTest ( QEvent event)
overrideprotectedvirtual

Reimplemented from QEventTransition::eventTest()

QPainterPath QMouseEventTransition::hitTestPath ( ) const

Returns the hit test path for this mouse event transition.

See also
setHitTestPath()
Qt::KeyboardModifiers QMouseEventTransition::modifierMask ( ) const

Returns the value of the property.

void QMouseEventTransition::onTransition ( QEvent event)
overrideprotectedvirtual
void QMouseEventTransition::setButton ( Qt::MouseButton  button)

Sets the value of the property to button.

void QMouseEventTransition::setHitTestPath ( const QPainterPath path)

Sets the hit test path for this mouse event transition to path. If a valid path has been set, the transition will only trigger if the mouse event position (QMouseEvent::pos()) is inside the path.

See also
hitTestPath(), QPainterPath::contains()
void QMouseEventTransition::setModifierMask ( Qt::KeyboardModifiers  modifiers)

Sets the value of the property to modifiers.

Property Documentation

QMouseEventTransition::button

This property holds the button that this mouse event transition is associated with.

PropertiesClass Methods
read button
write setButton
QMouseEventTransition::modifierMask

This property holds the keyboard modifier mask that this mouse event transition checks for.

PropertiesClass Methods
read modifierMask
write setModifierMask