NothingTransitions.hpp
1 #pragma once
2 #include <Scenario/Palette/ScenarioPaletteBaseTransitions.hpp>
3 
4 namespace Scenario
5 {
6 template <typename Scenario_T>
7 class Transition_T<Scenario_T, ClickOnNothing> final
8  : public MatchedTransition<Scenario_T, ClickOnNothing_Event>
9 {
10 public:
12 
13 protected:
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 
23 template <typename Scenario_T>
25 
26 template <class Scenario_T>
27 class Transition_T<Scenario_T, MoveOnNothing> final
28  : public MatchedTransition<Scenario_T, MoveOnNothing_Event>
29 {
30 public:
32 
33 protected:
34  void onTransition(QEvent* ev) override
35  {
36  auto qev = static_cast<MoveOnNothing_Event*>(ev);
37 
38  this->state().currentPoint = qev->point;
39  }
40 };
41 template <typename Scenario_T>
43 
44 template <typename Scenario_T>
45 class Transition_T<Scenario_T, ReleaseOnNothing> final
46  : public MatchedTransition<Scenario_T, ReleaseOnNothing_Event>
47 {
48 public:
50 
51 protected:
52  void onTransition(QEvent* ev) override
53  {
54  auto qev = static_cast<ReleaseOnNothing_Event*>(ev);
55 
56  this->state().currentPoint = qev->point;
57  }
58 };
59 template <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:14
Definition: ScenarioPaletteBaseEvents.hpp:43