QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCAbstractTransition.cc
Go to the documentation of this file.
2#include "QGCStateMachine.h"
3
5 : QAbstractTransition(sourceState)
6{
7}
8
9QGCAbstractTransition::QGCAbstractTransition(QAbstractState* target, QState* sourceState)
10 : QAbstractTransition(sourceState)
11{
12 setTargetState(target);
13}
14
16{
17 return qobject_cast<QGCStateMachine*>(QAbstractTransition::machine());
18}
19
21{
22 auto* m = machine();
23 return m ? m->vehicle() : nullptr;
24}
25
27{
28 Q_UNUSED(event);
29 // Default implementation does nothing
30}
void onTransition(QEvent *event) override
QGCAbstractTransition(QState *sourceState=nullptr)
QGCStateMachine * machine() const
Get the QGCStateMachine this transition belongs to.
Vehicle * vehicle() const
Get the Vehicle associated with the state machine.
QGroundControl specific state machine with enhanced error handling.