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