summaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefUnit.h
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-14 10:30:07 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-15 16:11:39 -0700
commit9b8a6fa8552647c1c1e7b78000e93a1bbc508365 (patch)
tree4196fe4371cab7e02c5168256e2d6ce380aadbce /core/settings/qPrefUnit.h
parent0825f644e0b98190d68e0b63c4204fa8282e84b4 (diff)
downloadsubsurface-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/qPrefUnit.h')
-rw-r--r--core/settings/qPrefUnit.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/core/settings/qPrefUnit.h b/core/settings/qPrefUnit.h
index 70ccadadd..bc4273546 100644
--- a/core/settings/qPrefUnit.h
+++ b/core/settings/qPrefUnit.h
@@ -24,9 +24,9 @@ public:
static qPrefUnits *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 bool coordinates_traditional() { return prefs.coordinates_traditional; }
@@ -41,16 +41,16 @@ public:
static units::WEIGHT weight() { return prefs.units.weight; }
public slots:
- void set_coordinates_traditional(bool value);
- void set_duration_units(units::DURATION value);
- void set_length(units::LENGTH value);
- void set_pressure(units::PRESSURE value);
- void set_show_units_table(bool value);
- void set_temperature(units::TEMPERATURE value);
- void set_unit_system(const QString& value);
- void set_vertical_speed_time(units::TIME value);
- void set_volume(units::VOLUME value);
- void set_weight(units::WEIGHT value);
+ static void set_coordinates_traditional(bool value);
+ static void set_duration_units(units::DURATION value);
+ static void set_length(units::LENGTH value);
+ static void set_pressure(units::PRESSURE value);
+ static void set_show_units_table(bool value);
+ static void set_temperature(units::TEMPERATURE value);
+ static void set_unit_system(const QString& value);
+ static void set_vertical_speed_time(units::TIME value);
+ static void set_volume(units::VOLUME value);
+ static void set_weight(units::WEIGHT value);
signals:
void coordinates_traditional_changed(bool value);
@@ -65,16 +65,16 @@ signals:
void weight_changed(int value);
private:
- void disk_coordinates_traditional(bool doSync);
- void disk_duration_units(bool doSync);
- void disk_length(bool doSync);
- void disk_pressure(bool doSync);
- void disk_show_units_table(bool doSync);
- void disk_temperature(bool doSync);
- void disk_unit_system(bool doSync);
- void disk_vertical_speed_time(bool doSync);
- void disk_volume(bool doSync);
- void disk_weight(bool doSync);
+ static void disk_coordinates_traditional(bool doSync);
+ static void disk_duration_units(bool doSync);
+ static void disk_length(bool doSync);
+ static void disk_pressure(bool doSync);
+ static void disk_show_units_table(bool doSync);
+ static void disk_temperature(bool doSync);
+ static void disk_unit_system(bool doSync);
+ static void disk_vertical_speed_time(bool doSync);
+ static void disk_volume(bool doSync);
+ static void disk_weight(bool doSync);
};
#endif