|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <NamedEventTransition.h>
Inheritance diagram for NamedEventTransition:
Collaboration diagram for NamedEventTransition:Public Types | |
| using | NamedGuard = std::function< bool(const QGCStateMachineEvent *)> |
Public Member Functions | |
| NamedEventTransition (const QString &eventName, QAbstractState *target, QState *sourceState=nullptr) | |
| NamedEventTransition (const QString &eventName, QAbstractState *target, NamedGuard guard, QState *sourceState=nullptr) | |
| QString | eventName () const |
Public Member Functions inherited from QGCAbstractTransition | |
| QGCAbstractTransition (QState *sourceState=nullptr) | |
| QGCAbstractTransition (QAbstractState *target, QState *sourceState=nullptr) | |
| QGCStateMachine * | machine () const |
| Get the QGCStateMachine this transition belongs to. | |
| Vehicle * | vehicle () const |
| Get the Vehicle associated with the state machine. | |
Protected Member Functions | |
| bool | eventTest (QEvent *event) override |
Protected Member Functions inherited from QGCAbstractTransition | |
| void | onTransition (QEvent *event) override |
Transition that fires when a named QGCStateMachineEvent is posted to the state machine Uses QAbstractTransition (via QGCAbstractTransition) to intercept events posted via QStateMachine::postEvent() / QGCStateMachine::postEvent().
Definition at line 12 of file NamedEventTransition.h.
| using NamedEventTransition::NamedGuard = std::function<bool(const QGCStateMachineEvent*)> |
Definition at line 18 of file NamedEventTransition.h.
| NamedEventTransition::NamedEventTransition | ( | const QString & | eventName, |
| QAbstractState * | target, | ||
| QState * | sourceState = nullptr |
||
| ) |
Create transition for named events
| eventName | The event name to match |
| target | Target state for the transition |
| sourceState | Optional source state (defaults to nullptr) |
Definition at line 4 of file NamedEventTransition.cc.
| NamedEventTransition::NamedEventTransition | ( | const QString & | eventName, |
| QAbstractState * | target, | ||
| NamedGuard | guard, | ||
| QState * | sourceState = nullptr |
||
| ) |
Create transition for named events with a guard
| eventName | The event name to match |
| target | Target state for the transition |
| guard | Predicate that must return true for transition to fire |
| sourceState | Optional source state (defaults to nullptr) |
Definition at line 10 of file NamedEventTransition.cc.
|
inline |
Definition at line 33 of file NamedEventTransition.h.
|
overrideprotectedvirtual |
Implements QGCAbstractTransition.
Definition at line 17 of file NamedEventTransition.cc.
References QGCStateMachineEvent::EventType.