diff options
author | jan Iversen <jani@apache.org> | 2018-08-14 10:30:07 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-15 16:11:39 -0700 |
commit | 9b8a6fa8552647c1c1e7b78000e93a1bbc508365 (patch) | |
tree | 4196fe4371cab7e02c5168256e2d6ce380aadbce /core/settings/qPrefDisplay.h | |
parent | 0825f644e0b98190d68e0b63c4204fa8282e84b4 (diff) | |
download | subsurface-9b8a6fa8552647c1c1e7b78000e93a1bbc508365.tar.gz |
core: make methods in qPref* static
Make methods static to allow fast and esay access
use qPrefXYZ::foo() instead of qPrefXYZ::instance()->foo()
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/settings/qPrefDisplay.h')
-rw-r--r-- | core/settings/qPrefDisplay.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/core/settings/qPrefDisplay.h b/core/settings/qPrefDisplay.h index 804f4a258..ba7be7200 100644 --- a/core/settings/qPrefDisplay.h +++ b/core/settings/qPrefDisplay.h @@ -18,9 +18,9 @@ public: static qPrefDisplay *instance(); // Load/Sync local settings (disk) and struct preference - void loadSync(bool doSync); - void load() { loadSync(false); } - void sync() { loadSync(true); } + static void loadSync(bool doSync); + static void load() { loadSync(false); } + static void sync() { loadSync(true); } public: static QString divelist_font() { return prefs.divelist_font; } @@ -30,11 +30,11 @@ public: static QString theme() { return prefs.theme; } public slots: - void set_divelist_font(const QString &value); - void set_font_size(double value); - void set_display_invalid_dives(bool value); - void set_show_developer(bool value); - void set_theme(const QString &value); + static void set_divelist_font(const QString &value); + static void set_font_size(double value); + static void set_display_invalid_dives(bool value); + static void set_show_developer(bool value); + static void set_theme(const QString &value); signals: void divelist_font_changed(const QString &value); @@ -45,13 +45,13 @@ signals: private: // functions to load/sync variable with disk - void disk_divelist_font(bool doSync); - void disk_font_size(bool doSync); - void disk_display_invalid_dives(bool doSync); - void disk_show_developer(bool doSync); - void disk_theme(bool doSync); + static void disk_divelist_font(bool doSync); + static void disk_font_size(bool doSync); + static void disk_display_invalid_dives(bool doSync); + static void disk_show_developer(bool doSync); + static void disk_theme(bool doSync); // font helper function - void setCorrectFont(); + static void setCorrectFont(); }; #endif |