2 #include <score/model/path/Path.hpp>
4 #include <QAbstractTransition>
19 static constexpr
const int user_type = N;
21 : QEvent{QEvent::Type(QEvent::User + N)}
26 template <
typename Element,
int N>
44 template <
typename Po
intType>
58 template <
typename Event>
62 using event_type = Event;
63 using QAbstractTransition::QAbstractTransition;
66 bool eventTest(QEvent* e)
override
68 return e->type() == QEvent::Type(QEvent::User + Event::user_type);
71 void onTransition(QEvent* event)
override { }
74 template <
typename State,
typename T>
83 State& state()
const {
return m_state; }
90 typename Transition,
typename SourceState,
typename TargetState,
typename... Args>
91 Transition* make_transition(SourceState source, TargetState dest, Args&&... args)
93 Transition* t =
new Transition{std::forward<Args>(args)...};
94 t->setTargetState(dest);
95 source->addTransition(t);
103 static constexpr
const int value = 100;
107 static constexpr
const int value = 200;
111 static constexpr
const int value = 300;
121 using Press_Event = NumberedEvent<1>;
122 using Move_Event = NumberedEvent<2>;
123 using Release_Event = NumberedEvent<3>;
124 using Cancel_Event = NumberedEvent<4>;
125 using Shift_Event = NumberedEvent<5>;
127 using Press_Transition = MatchedTransition<Press_Event>;
128 using Move_Transition = MatchedTransition<Move_Event>;
129 using Release_Transition = MatchedTransition<Release_Event>;
130 using Cancel_Transition = MatchedTransition<Cancel_Event>;
131 using ShiftTransition = MatchedTransition<Shift_Event>;
Definition: StateMachineUtils.hpp:60
Definition: StateMachineUtils.hpp:76
Utilities for OSSIA data structures.
Definition: DeviceInterface.hpp:33
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: StateMachineUtils.hpp:102
Definition: StateMachineUtils.hpp:106
Definition: StateMachineUtils.hpp:110
Definition: StateMachineUtils.hpp:18
Definition: StateMachineUtils.hpp:28
Definition: StateMachineUtils.hpp:46