Loading...
Searching...
No Matches
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
10namespace Process
11{
12class ProcessModel;
13}
14namespace Scenario
15{
16namespace Settings
17{
18class 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 bool m_ExecutionUpdate{true};
34
35public:
36 Model(
37 const UuidKey<score::SettingsDelegateFactory>& k, QSettings& set,
38 const score::ApplicationContext& ctx);
39
40 QString getSkin() const;
41 void initSkin(const QString&);
42 void setSkin(const QString&);
43 void SkinChanged(const QString& arg_1)
44 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, SkinChanged, arg_1);
45
46 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, QString, DefaultEditor)
47 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, double, GraphicZoom)
48 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, qreal, SlotHeight)
49 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, TimeVal, DefaultDuration)
50 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, SnapshotOnCreate)
51 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, AutoSequence)
52 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, TimeBar)
53 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, MeasureBars)
54 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, MagneticMeasures)
55 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, int, UpdateRate)
56 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, int, ExecutionRefreshRate)
57 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_SCENARIO_EXPORT, bool, ExecutionUpdate)
58
59public:
60 SCORE_SETTINGS_PROPERTY(QString, Skin)
61};
62
63SCORE_SETTINGS_PARAMETER(Model, DefaultEditor)
64SCORE_SETTINGS_PARAMETER(Model, Skin)
65SCORE_SETTINGS_PARAMETER(Model, GraphicZoom)
66SCORE_SETTINGS_PARAMETER(Model, SlotHeight)
67SCORE_SETTINGS_PARAMETER(Model, DefaultDuration)
68SCORE_SETTINGS_PARAMETER(Model, SnapshotOnCreate)
69SCORE_SETTINGS_PARAMETER(Model, AutoSequence)
70SCORE_SETTINGS_PARAMETER(Model, TimeBar)
71SCORE_SETTINGS_PARAMETER(Model, MeasureBars)
72SCORE_SETTINGS_PARAMETER(Model, MagneticMeasures)
73SCORE_SETTINGS_PARAMETER(Model, UpdateRate)
74SCORE_SETTINGS_PARAMETER(Model, ExecutionRefreshRate)
75SCORE_SETTINGS_PARAMETER(Model, ExecutionUpdate)
76}
77
78double getNewLayerHeight(
79 const score::ApplicationContext& ctx, const Process::ProcessModel& proc) noexcept;
80}
The Process class.
Definition score-lib-process/Process/Process.hpp:62
Definition ScenarioSettingsModel.hpp:19
Definition UuidKey.hpp:345
Definition SettingsDelegateModel.hpp:18
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition TimeValue.hpp:21
Used to access all the application-wide state and structures.
Definition ApplicationContext.hpp:25