|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <MachineEventTransition.h>
Inheritance diagram for MachineEventTransition:
Collaboration diagram for MachineEventTransition:Public Types | |
| using | Guard = std::function< bool(const QGCStateMachineEvent *)> |
Public Member Functions | |
| MachineEventTransition (const QString &eventName, QAbstractState *target) | |
| MachineEventTransition (const QString &eventName, QAbstractState *target, Guard guard) | |
| QString | eventName () const |
| QVariant | eventData () const |
| Access the event data from the last matched event. | |
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 |
| void | onTransition (QEvent *event) override |
Protected Member Functions inherited from QGCAbstractTransition | |
| void | onTransition (QEvent *event) override |
Transition that fires when a named event is posted to the state machine Use this for events posted via QGCStateMachine::postEvent/postDelayedEvent. For events on watched objects, use NamedEventTransition instead.
Definition at line 12 of file MachineEventTransition.h.
| using MachineEventTransition::Guard = std::function<bool(const QGCStateMachineEvent*)> |
Definition at line 18 of file MachineEventTransition.h.
| MachineEventTransition::MachineEventTransition | ( | const QString & | eventName, |
| QAbstractState * | target | ||
| ) |
Create transition for a named machine event
| eventName | The event name to match |
| target | Target state for the transition |
Definition at line 4 of file MachineEventTransition.cc.
| MachineEventTransition::MachineEventTransition | ( | const QString & | eventName, |
| QAbstractState * | target, | ||
| Guard | guard | ||
| ) |
Create transition for a named machine event with guard
| eventName | The event name to match |
| target | Target state for the transition |
| guard | Predicate that must return true for transition to fire |
Definition at line 10 of file MachineEventTransition.cc.
|
inline |
Access the event data from the last matched event.
Definition at line 34 of file MachineEventTransition.h.
|
inline |
Definition at line 31 of file MachineEventTransition.h.
|
overrideprotectedvirtual |
Implements QGCAbstractTransition.
Definition at line 17 of file MachineEventTransition.cc.
References QGCStateMachineEvent::EventType.
|
overrideprotected |
Definition at line 41 of file MachineEventTransition.cc.