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
10class QGCEventTransition : public QEventTransition
11{
12 Q_OBJECT
13 Q_DISABLE_COPY(QGCEventTransition)
14
15public:
16 using Guard = std::function<bool(QEvent*)>;
17
22 QGCEventTransition(QObject* object, QEvent::Type eventType, QAbstractState* target);
23
29 QGCEventTransition(QObject* object, QEvent::Type eventType, QAbstractState* target, Guard guard);
30
31protected:
32 bool eventTest(QEvent* event) override;
33
34private:
35 Guard _guard;
36};
Transition that fires when a specific QEvent is received by a watched object.
bool eventTest(QEvent *event) override
std::function< bool(QEvent *)> Guard