3#include <QtStateMachine/QState>
4#include <QtCore/QString>
std::function< void()> EntryCallback
void onExit(QEvent *event) override
void setEventHandler(EventHandler handler)
Set a custom event handler for this state.
void setCallbacks(EntryCallback onEntry, ExitCallback onExit=nullptr)
Set both entry and exit callbacks.
void onEntry(QEvent *event) override
class StateContext * context() const
void setOnEntry(EntryCallback callback)
Set a callback to be invoked when the state is entered.
QString stateName() const
bool event(QEvent *event) override
virtual void onEnter()
Override to perform actions on state entry.
virtual void onLeave()
Override to perform actions on state exit.
std::function< void()> ExitCallback
QGCStateMachine * machine() const
void setOnExit(ExitCallback callback)
Set a callback to be invoked when the state is exited.
Vehicle * vehicle() const
QGroundControl specific state machine with enhanced error handling.