Loading...
Searching...
No Matches
CurveSettingsModel.hpp
1#pragma once
2#include <score/plugins/settingsdelegate/SettingsDelegateModel.hpp>
3
4#include <score_plugin_curve_export.h>
5
6#include <verdigris>
7
8namespace Curve
9{
10namespace Settings
11{
12
13enum Mode : bool
14{
15 Parameter,
16 Message
17};
18}
19}
20
21Q_DECLARE_METATYPE(Curve::Settings::Mode)
22W_REGISTER_ARGTYPE(Curve::Settings::Mode)
23
24namespace Curve
25{
26namespace Settings
27{
28class SCORE_PLUGIN_CURVE_EXPORT Model : public score::SettingsDelegateModel
29{
30 W_OBJECT(Model)
31
32public:
33 Model(
34 const UuidKey<score::SettingsDelegateFactory>& k, QSettings& set,
35 const score::ApplicationContext& ctx);
36
37 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_CURVE_EXPORT, int, SimplificationRatio)
38 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_CURVE_EXPORT, bool, Simplify)
39 SCORE_SETTINGS_PARAMETER_HPP(
40 SCORE_PLUGIN_CURVE_EXPORT, Curve::Settings::Mode, CurveMode)
41 SCORE_SETTINGS_PARAMETER_HPP(SCORE_PLUGIN_CURVE_EXPORT, bool, PlayWhileRecording)
42
43private:
44 int m_SimplificationRatio{};
45 bool m_Simplify = true;
46 Mode m_CurveMode = Mode::Parameter;
47 bool m_PlayWhileRecording{};
48};
49
50SCORE_SETTINGS_PARAMETER(Model, SimplificationRatio)
51SCORE_SETTINGS_PARAMETER(Model, Simplify)
52SCORE_SETTINGS_PARAMETER(Model, CurveMode)
53SCORE_SETTINGS_PARAMETER(Model, PlayWhileRecording)
54}
55}
Definition CurveSettingsModel.hpp:29
Definition UuidKey.hpp:345
Definition SettingsDelegateModel.hpp:18
Utilities and base classes for 1D curves.
Definition FocusDispatcher.hpp:12
Used to access all the application-wide state and structures.
Definition ApplicationContext.hpp:25