summaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefPartialPressureGas.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/qPrefPartialPressureGas.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/qPrefPartialPressureGas.h')
-rw-r--r--core/settings/qPrefPartialPressureGas.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/core/settings/qPrefPartialPressureGas.h b/core/settings/qPrefPartialPressureGas.h
index 0777c9303..c87711658 100644
--- a/core/settings/qPrefPartialPressureGas.h
+++ b/core/settings/qPrefPartialPressureGas.h
@@ -20,27 +20,27 @@ public:
static qPrefPartialPressureGas *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:
- bool phe() { return prefs.pp_graphs.phe; }
- double phe_threshold() { return prefs.pp_graphs.phe_threshold; }
- bool pn2() { return prefs.pp_graphs.pn2; }
- double pn2_threshold() { return prefs.pp_graphs.pn2_threshold; }
- bool po2() { return prefs.pp_graphs.po2; }
- double po2_threshold_max() { return prefs.pp_graphs.po2_threshold_max; }
- double po2_threshold_min() { return prefs.pp_graphs.po2_threshold_min; }
+ static bool phe() { return prefs.pp_graphs.phe; }
+ static double phe_threshold() { return prefs.pp_graphs.phe_threshold; }
+ static bool pn2() { return prefs.pp_graphs.pn2; }
+ static double pn2_threshold() { return prefs.pp_graphs.pn2_threshold; }
+ static bool po2() { return prefs.pp_graphs.po2; }
+ static double po2_threshold_max() { return prefs.pp_graphs.po2_threshold_max; }
+ static double po2_threshold_min() { return prefs.pp_graphs.po2_threshold_min; }
public slots:
- void set_phe(bool value);
- void set_phe_threshold(double value);
- void set_pn2(bool value);
- void set_pn2_threshold(double value);
- void set_po2(bool value);
- void set_po2_threshold_min(double value);
- void set_po2_threshold_max(double value);
+ static void set_phe(bool value);
+ static void set_phe_threshold(double value);
+ static void set_pn2(bool value);
+ static void set_pn2_threshold(double value);
+ static void set_po2(bool value);
+ static void set_po2_threshold_min(double value);
+ static void set_po2_threshold_max(double value);
signals:
void phe_changed(bool value);
@@ -52,13 +52,13 @@ signals:
void po2_threshold_min_changed(double value);
private:
- void disk_phe(bool doSync);
- void disk_phe_threshold(bool doSync);
- void disk_pn2(bool doSync);
- void disk_pn2_threshold(bool doSync);
- void disk_po2(bool doSync);
- void disk_po2_threshold_min(bool doSync);
- void disk_po2_threshold_max(bool doSync);
+ static void disk_phe(bool doSync);
+ static void disk_phe_threshold(bool doSync);
+ static void disk_pn2(bool doSync);
+ static void disk_pn2_threshold(bool doSync);
+ static void disk_po2(bool doSync);
+ static void disk_po2_threshold_min(bool doSync);
+ static void disk_po2_threshold_max(bool doSync);
};
#endif