ScenarioEditionSettings.hpp
1 #pragma once
2 #include <Process/ExpandMode.hpp>
3 
4 #include <Scenario/Palette/Tool.hpp>
5 
6 #include <QObject>
7 
8 #include <score_plugin_scenario_export.h>
9 
10 #include <verdigris>
11 namespace Scenario
12 {
13 class SCORE_PLUGIN_SCENARIO_EXPORT EditionSettings final : public QObject
14 {
15  W_OBJECT(EditionSettings)
16 
17  ExpandMode m_expandMode{ExpandMode::GrowShrink};
18  Scenario::Tool m_tool{Scenario::Tool::Select};
19  Scenario::Tool m_previousTool{Scenario::Tool::Select};
20  LockMode m_lockMode{};
21  bool m_execution{false};
22 
23 public:
24  ExpandMode expandMode() const;
25  Scenario::Tool tool() const;
26 
27  void setExpandMode(ExpandMode expandMode);
28  void setTool(Scenario::Tool tool);
29  void setExecution(bool ex);
30 
31  void setDefault();
32  void restoreTool();
33 
34  LockMode lockMode() const;
35 
36 public:
37  void setLockMode(LockMode lockMode);
38  W_SLOT(setLockMode);
39 
40 public:
41  void expandModeChanged(ExpandMode expandMode)
42  E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, expandModeChanged, expandMode)
43  void toolChanged(Scenario::Tool tool)
44  E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, toolChanged, tool)
45 
46  void lockModeChanged(LockMode lockMode)
47  E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, lockModeChanged, lockMode)
48 
49  W_PROPERTY(Scenario::Tool, tool READ tool WRITE setTool NOTIFY toolChanged)
50 
51  W_PROPERTY(LockMode, lockMode READ lockMode WRITE setLockMode NOTIFY lockModeChanged)
52 
53  W_PROPERTY(
54  ExpandMode,
55  expandMode READ expandMode WRITE setExpandMode NOTIFY expandModeChanged)
56 };
57 }
Definition: ScenarioEditionSettings.hpp:14
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14