mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: activate qPrefDisplay in SettingsObjectWrapper
add the prepared class qPrefDisplay to SettingsObjectWrapper and thereby making it active. As a consequence of the uniform naming standard desktop-widgets/preferences_defaults.cpp and tests/testpreferences.cpp have been updated. Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
d7fed0bcb7
commit
da61c1714f
7 changed files with 26 additions and 111 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <QDate>
|
||||
|
||||
#include "core/pref.h"
|
||||
#include "core/settings/qPref.h"
|
||||
|
||||
/* Wrapper class for the Settings. This will allow
|
||||
* seamlessy integration of the settings with the QML
|
||||
|
@ -594,28 +595,6 @@ private:
|
|||
const QString group = QStringLiteral("GeneralSettings");
|
||||
};
|
||||
|
||||
class DisplaySettingsObjectWrapper : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString divelist_font READ divelistFont WRITE setDivelistFont NOTIFY divelistFontChanged)
|
||||
Q_PROPERTY(double font_size READ fontSize WRITE setFontSize NOTIFY fontSizeChanged)
|
||||
Q_PROPERTY(bool display_invalid_dives READ displayInvalidDives WRITE setDisplayInvalidDives NOTIFY displayInvalidDivesChanged)
|
||||
public:
|
||||
DisplaySettingsObjectWrapper(QObject *parent);
|
||||
QString divelistFont() const;
|
||||
double fontSize() const;
|
||||
bool displayInvalidDives() const;
|
||||
public slots:
|
||||
void setDivelistFont(const QString& value);
|
||||
void setFontSize(double value);
|
||||
void setDisplayInvalidDives(bool value);
|
||||
signals:
|
||||
void divelistFontChanged(const QString& value);
|
||||
void fontSizeChanged(double value);
|
||||
void displayInvalidDivesChanged(bool value);
|
||||
private:
|
||||
const QString group = QStringLiteral("Display");
|
||||
};
|
||||
|
||||
class LanguageSettingsObjectWrapper : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString language READ language WRITE setLanguage NOTIFY languageChanged)
|
||||
|
@ -709,7 +688,7 @@ class SettingsObjectWrapper : public QObject {
|
|||
Q_PROPERTY(UnitsSettings* units MEMBER unit_settings CONSTANT)
|
||||
|
||||
Q_PROPERTY(GeneralSettingsObjectWrapper* general MEMBER general_settings CONSTANT)
|
||||
Q_PROPERTY(DisplaySettingsObjectWrapper* display MEMBER display_settings CONSTANT)
|
||||
Q_PROPERTY(qPrefDisplay* display MEMBER display_settings CONSTANT)
|
||||
Q_PROPERTY(LanguageSettingsObjectWrapper* language MEMBER language_settings CONSTANT)
|
||||
Q_PROPERTY(AnimationsSettingsObjectWrapper* animation MEMBER animation_settings CONSTANT)
|
||||
Q_PROPERTY(LocationServiceSettingsObjectWrapper* Location MEMBER location_settings CONSTANT)
|
||||
|
@ -728,7 +707,7 @@ public:
|
|||
DivePlannerSettings *planner_settings;
|
||||
UnitsSettings *unit_settings;
|
||||
GeneralSettingsObjectWrapper *general_settings;
|
||||
DisplaySettingsObjectWrapper *display_settings;
|
||||
qPrefDisplay *display_settings;
|
||||
LanguageSettingsObjectWrapper *language_settings;
|
||||
AnimationsSettingsObjectWrapper *animation_settings;
|
||||
LocationServiceSettingsObjectWrapper *location_settings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue