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(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
41private:
42 int m_SimplificationRatio{};
43 bool m_Simplify = true;
44 Mode m_CurveMode = Mode::Parameter;
45 bool m_PlayWhileRecording{};
46};
47
48SCORE_SETTINGS_PARAMETER(Model, SimplificationRatio)
49SCORE_SETTINGS_PARAMETER(Model, Simplify)
50SCORE_SETTINGS_PARAMETER(Model, CurveMode)
51SCORE_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