summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/SettingsObjectWrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.h')
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.h61
1 files changed, 2 insertions, 59 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.h b/core/subsurface-qt/SettingsObjectWrapper.h
index 22429f9db..00f2b3626 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.h
+++ b/core/subsurface-qt/SettingsObjectWrapper.h
@@ -13,63 +13,6 @@
* and QWidget frontends. This class will be huge, since
* I need tons of properties, one for each option. */
-class GeneralSettingsObjectWrapper : public QObject {
- Q_OBJECT
- Q_PROPERTY(QString default_filename READ defaultFilename WRITE setDefaultFilename NOTIFY defaultFilenameChanged)
- Q_PROPERTY(QString default_cylinder READ defaultCylinder WRITE setDefaultCylinder NOTIFY defaultCylinderChanged)
- Q_PROPERTY(short default_file_behavior READ defaultFileBehavior WRITE setDefaultFileBehavior NOTIFY defaultFileBehaviorChanged)
- Q_PROPERTY(bool use_default_file READ useDefaultFile WRITE setUseDefaultFile NOTIFY useDefaultFileChanged)
- Q_PROPERTY(int defaultsetpoint READ defaultSetPoint WRITE setDefaultSetPoint NOTIFY defaultSetPointChanged)
- Q_PROPERTY(int o2consumption READ o2Consumption WRITE setO2Consumption NOTIFY o2ConsumptionChanged)
- Q_PROPERTY(int pscr_ratio READ pscrRatio WRITE setPscrRatio NOTIFY pscrRatioChanged)
- Q_PROPERTY(bool auto_recalculate_thumbnails READ autoRecalculateThumbnails WRITE setAutoRecalculateThumbnails NOTIFY autoRecalculateThumbnailsChanged)
- Q_PROPERTY(bool extract_video_thumbnails READ extractVideoThumbnails WRITE setExtractVideoThumbnails NOTIFY extractVideoThumbnailsChanged)
- Q_PROPERTY(int extract_video_thumbnails_position READ extractVideoThumbnailsPosition WRITE setExtractVideoThumbnailsPosition NOTIFY extractVideoThumbnailsPositionChanged)
- Q_PROPERTY(QString ffmpeg_executable READ ffmpegExecutable WRITE setFfmpegExecutable NOTIFY ffmpegExecutableChanged)
-
-public:
- GeneralSettingsObjectWrapper(QObject *parent);
- QString defaultFilename() const;
- QString defaultCylinder() const;
- short defaultFileBehavior() const;
- bool useDefaultFile() const;
- int defaultSetPoint() const;
- int o2Consumption() const;
- int pscrRatio() const;
- bool autoRecalculateThumbnails() const;
- bool extractVideoThumbnails() const;
- int extractVideoThumbnailsPosition() const;
- QString ffmpegExecutable() const;
-
-public slots:
- void setDefaultFilename (const QString& value);
- void setDefaultCylinder (const QString& value);
- void setDefaultFileBehavior (short value);
- void setUseDefaultFile (bool value);
- void setDefaultSetPoint (int value);
- void setO2Consumption (int value);
- void setPscrRatio (int value);
- void setAutoRecalculateThumbnails (bool value);
- void setExtractVideoThumbnails (bool value);
- void setExtractVideoThumbnailsPosition (int value);
- void setFfmpegExecutable (const QString &value);
-
-signals:
- void defaultFilenameChanged(const QString& value);
- void defaultCylinderChanged(const QString& value);
- void defaultFileBehaviorChanged(short value);
- void useDefaultFileChanged(bool value);
- void defaultSetPointChanged(int value);
- void o2ConsumptionChanged(int value);
- void pscrRatioChanged(int value);
- void autoRecalculateThumbnailsChanged(int value);
- void extractVideoThumbnailsChanged(bool value);
- void extractVideoThumbnailsPositionChanged(int value);
- void ffmpegExecutableChanged(const QString &value);
-private:
- const QString group = QStringLiteral("GeneralSettings");
-};
-
class SettingsObjectWrapper : public QObject {
Q_OBJECT
@@ -81,7 +24,7 @@ class SettingsObjectWrapper : public QObject {
Q_PROPERTY(qPrefCloudStorage* cloud_storage MEMBER cloud_storage CONSTANT)
Q_PROPERTY(qPrefDivePlanner* planner MEMBER planner_settings CONSTANT)
Q_PROPERTY(qPrefUnits* units MEMBER unit_settings CONSTANT)
- Q_PROPERTY(GeneralSettingsObjectWrapper* general MEMBER general_settings CONSTANT)
+ Q_PROPERTY(qPrefGeneral* general MEMBER general_settings CONSTANT)
Q_PROPERTY(qPrefDisplay* display MEMBER display_settings CONSTANT)
Q_PROPERTY(qPrefLanguage* language MEMBER language_settings CONSTANT)
Q_PROPERTY(qPrefAnimations* animation MEMBER animation_settings CONSTANT)
@@ -100,7 +43,7 @@ public:
qPrefCloudStorage *cloud_storage;
qPrefDivePlanner *planner_settings;
qPrefUnits *unit_settings;
- GeneralSettingsObjectWrapper *general_settings;
+ qPrefGeneral *general_settings;
qPrefDisplay *display_settings;
qPrefLanguage *language_settings;
qPrefAnimations *animation_settings;