ScenarioSettingsModel.hpp
1 #pragma once
2 #include <Process/TimeValue.hpp>
3 
4 #include <score/plugins/settingsdelegate/SettingsDelegateModel.hpp>
5 
6 #include <score_plugin_scenario_export.h>
7 
8 #include <verdigris>
9 
10 namespace Process
11 {
12 class ProcessModel;
13 }
14 namespace Scenario
15 {
16 namespace Settings
17 {
18 class SCORE_PLUGIN_SCENARIO_EXPORT Model final : public score::SettingsDelegateModel
19 {
20  W_OBJECT(Model)
21  QString m_Skin;
22  QString m_DefaultEditor;
23  double m_GraphicZoom{};
24  qreal m_SlotHeight{};
25  TimeVal m_DefaultDuration{TimeVal::fromMsecs(30000)};
26  int m_UpdateRate{60};
27  int m_ExecutionRefreshRate{60};
28  bool m_SnapshotOnCreate{};
29  bool m_AutoSequence{};
30  bool m_TimeBar{false};
31  bool m_MeasureBars{true};
32  bool m_MagneticMeasures{true};
33 
34 public:
35  Model(QSettings& set, const score::ApplicationContext& ctx);
36 
37  QString getSkin() const;
38  void initSkin(const QString&);
39  void setSkin(const QString&);
40  void SkinChanged(const QString& arg_1)
41  E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, SkinChanged, arg_1);
42 
43  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, QString, DefaultEditor)
44  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, double, GraphicZoom)
45  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, qreal, SlotHeight)
46  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, TimeVal, DefaultDuration)
47  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, SnapshotOnCreate)
48  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, AutoSequence)
49  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, TimeBar)
50  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, MeasureBars)
51  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, MagneticMeasures)
52  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, int, UpdateRate)
53  SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, int, ExecutionRefreshRate)
54 
55 public:
56  SCORE_SETTINGS_PROPERTY(QString, Skin)
57 };
58 
59 SCORE_SETTINGS_PARAMETER(Model, DefaultEditor)
60 SCORE_SETTINGS_PARAMETER(Model, Skin)
61 SCORE_SETTINGS_PARAMETER(Model, GraphicZoom)
62 SCORE_SETTINGS_PARAMETER(Model, SlotHeight)
63 SCORE_SETTINGS_PARAMETER(Model, DefaultDuration)
64 SCORE_SETTINGS_PARAMETER(Model, SnapshotOnCreate)
65 SCORE_SETTINGS_PARAMETER(Model, AutoSequence)
66 SCORE_SETTINGS_PARAMETER(Model, TimeBar)
67 SCORE_SETTINGS_PARAMETER(Model, MeasureBars)
68 SCORE_SETTINGS_PARAMETER(Model, MagneticMeasures)
69 SCORE_SETTINGS_PARAMETER(Model, UpdateRate)
70 SCORE_SETTINGS_PARAMETER(Model, ExecutionRefreshRate)
71 }
72 
73 double getNewLayerHeight(
74  const score::ApplicationContext& ctx, const Process::ProcessModel& proc) noexcept;
75 }
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: ScenarioSettingsModel.hpp:19
Definition: SettingsDelegateModel.hpp:16
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: TimeValue.hpp:21
Used to access all the application-wide state and structures.
Definition: ApplicationContext.hpp:24