QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCEventTransition.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtStateMachine/QEventTransition>
4#include <functional>
5
8class QGCEventTransition : public QEventTransition
9{
10 Q_OBJECT
11 Q_DISABLE_COPY(QGCEventTransition)
12
13public:
14 using Guard = std::function<bool(QEvent*)>;
15
20 QGCEventTransition(QObject* object, QEvent::Type eventType, QAbstractState* target);
21
27 QGCEventTransition(QObject* object, QEvent::Type eventType, QAbstractState* target, Guard guard);
28
29protected:
30 bool eventTest(QEvent* event) override;
31
32private:
33 Guard _guard;
34};
bool eventTest(QEvent *event) override
std::function< bool(QEvent *)> Guard