diff options
author | jan Iversen <jani@apache.org> | 2018-07-22 16:19:22 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-25 08:35:04 -0700 |
commit | 3d6848b22c9fb64a99bb3dec535431a6cab09ad9 (patch) | |
tree | c1a7aedcf02120c9ea0031194b1cef2d15db97fe /core/subsurface-qt/SettingsObjectWrapper.h | |
parent | 98820cf970335523b4cd2a84a025c12b5480e0aa (diff) | |
download | subsurface-3d6848b22c9fb64a99bb3dec535431a6cab09ad9.tar.gz |
core: activate qPrefDiveComputer
remove DiveComputer from SettingsObjectWrapper and reference qPrefDiveComputer
update files using SettingsObjectWrapper/DiveComputer to use qPrefDiveComputer
this activated qPrefDiveComputer and removed the similar class from
SettingsObjectWrapper.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.h')
-rw-r--r-- | core/subsurface-qt/SettingsObjectWrapper.h | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.h b/core/subsurface-qt/SettingsObjectWrapper.h index fdf0b08f6..9cb707044 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.h +++ b/core/subsurface-qt/SettingsObjectWrapper.h @@ -13,39 +13,6 @@ * and QWidget frontends. This class will be huge, since * I need tons of properties, one for each option. */ -class DiveComputerSettings : public QObject { - Q_OBJECT - Q_PROPERTY(QString vendor READ dc_vendor WRITE setVendor NOTIFY vendorChanged) - Q_PROPERTY(QString product READ dc_product WRITE setProduct NOTIFY productChanged) - Q_PROPERTY(QString device READ dc_device WRITE setDevice NOTIFY deviceChanged) - Q_PROPERTY(QString device_name READ dc_device_name WRITE setDeviceName NOTIFY deviceNameChanged) - Q_PROPERTY(int download_mode READ downloadMode WRITE setDownloadMode NOTIFY downloadModeChanged) -public: - DiveComputerSettings(QObject *parent); - QString dc_vendor() const; - QString dc_product() const; - QString dc_device() const; - QString dc_device_name() const; - int downloadMode() const; - -public slots: - void setVendor(const QString& vendor); - void setProduct(const QString& product); - void setDevice(const QString& device); - void setDeviceName(const QString& device_name); - void setDownloadMode(int mode); - -signals: - void vendorChanged(const QString& vendor); - void productChanged(const QString& product); - void deviceChanged(const QString& device); - void deviceNameChanged(const QString& device_name); - void downloadModeChanged(int mode); -private: - const QString group = QStringLiteral("DiveComputer"); - -}; - class UpdateManagerSettings : public QObject { Q_OBJECT Q_PROPERTY(bool dont_check_for_updates READ dontCheckForUpdates WRITE setDontCheckForUpdates NOTIFY dontCheckForUpdatesChanged) @@ -620,7 +587,7 @@ class SettingsObjectWrapper : public QObject { Q_PROPERTY(LocationServiceSettingsObjectWrapper* Location MEMBER location_settings CONSTANT) Q_PROPERTY(UpdateManagerSettings* update MEMBER update_manager_settings CONSTANT) - Q_PROPERTY(DiveComputerSettings* dive_computer MEMBER dive_computer_settings CONSTANT) + Q_PROPERTY(qPrefDiveComputer* dive_computer MEMBER dive_computer_settings CONSTANT) public: static SettingsObjectWrapper *instance(); @@ -638,7 +605,7 @@ public: qPrefAnimations *animation_settings; LocationServiceSettingsObjectWrapper *location_settings; UpdateManagerSettings *update_manager_settings; - DiveComputerSettings *dive_computer_settings; + qPrefDiveComputer *dive_computer_settings; void sync(); void load(); |