ExecutionStatus.hpp
1 #pragma once
2 #include <score/model/ColorReference.hpp>
3 
4 #include <verdigris>
5 class QColor;
6 namespace Process
7 {
8 struct Style;
9 }
10 
11 namespace Scenario
12 {
13 
14 // See ossia::time_event
15 enum class OffsetBehavior : int8_t
16 {
17  True,
18  False,
19  Expression
20 };
21 
22 enum class ExecutionStatus : int8_t
23 {
24  Waiting,
25  Pending,
26  Happened,
27  Disposed,
28  Editing
29 };
30 
31 // TODO Use me for events, states
33 {
34  ExecutionStatus status{ExecutionStatus::Editing};
35 
36  ExecutionStatus get() const noexcept { return status; }
37  void set(ExecutionStatus e) noexcept
38  {
39  if(status != e)
40  {
41  status = e;
42  }
43  }
44  const score::Brush& eventStatusColor(const Process::Style&) const noexcept;
45  const score::Brush& stateStatusColor(const Process::Style&) const noexcept;
46  const score::Brush& conditionStatusColor(const Process::Style&) const noexcept;
47 };
48 }
49 
50 Q_DECLARE_METATYPE(Scenario::ExecutionStatus)
51 Q_DECLARE_METATYPE(Scenario::OffsetBehavior)
52 W_REGISTER_ARGTYPE(Scenario::ExecutionStatus)
53 W_REGISTER_ARGTYPE(Scenario::OffsetBehavior)
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: ScenarioStyle.hpp:13
Definition: ExecutionStatus.hpp:33
Definition: Skin.hpp:55