Loading...
Searching...
No Matches
NothingTransitions.hpp
1#pragma once
2#include <Scenario/Palette/ScenarioPaletteBaseTransitions.hpp>
3
4namespace Scenario
5{
6template <typename Scenario_T>
7class Transition_T<Scenario_T, ClickOnNothing> final
8 : public MatchedTransition<Scenario_T, ClickOnNothing_Event>
9{
10public:
11 using MatchedTransition<Scenario_T, ClickOnNothing_Event>::MatchedTransition;
12
13protected:
14 void onTransition(QEvent* ev) override
15 {
16 auto qev = static_cast<ClickOnNothing_Event*>(ev);
17 this->state().clear();
18
19 this->state().currentPoint = qev->point;
20 }
21};
22
23template <typename Scenario_T>
25
26template <class Scenario_T>
27class Transition_T<Scenario_T, MoveOnNothing> final
28 : public MatchedTransition<Scenario_T, MoveOnNothing_Event>
29{
30public:
31 using MatchedTransition<Scenario_T, MoveOnNothing_Event>::MatchedTransition;
32
33protected:
34 void onTransition(QEvent* ev) override
35 {
36 auto qev = static_cast<MoveOnNothing_Event*>(ev);
37
38 this->state().currentPoint = qev->point;
39 }
40};
41template <typename Scenario_T>
43
44template <typename Scenario_T>
45class Transition_T<Scenario_T, ReleaseOnNothing> final
46 : public MatchedTransition<Scenario_T, ReleaseOnNothing_Event>
47{
48public:
49 using MatchedTransition<Scenario_T, ReleaseOnNothing_Event>::MatchedTransition;
50
51protected:
52 void onTransition(QEvent* ev) override
53 {
54 auto qev = static_cast<ReleaseOnNothing_Event*>(ev);
55
56 this->state().currentPoint = qev->point;
57 }
58};
59template <typename Scenario_T>
61}
Definition ScenarioPaletteBaseTransitions.hpp:15
Definition NothingTransitions.hpp:9
Definition NothingTransitions.hpp:29
Definition NothingTransitions.hpp:47
Definition ScenarioPaletteBaseTransitions.hpp:23
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition ScenarioPaletteBaseEvents.hpp:43