mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: activate qPrefPartialPressureGas
remove PartialPressureGas from SettingsObjectWrapper and reference qPrefPartialPressureGas update files using SettingsObjectWrapper/PartialPressureGas to use qPrefPartialPressureGas this activated qPrefPartialPressureGas and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
881395318c
commit
9d005888fb
8 changed files with 85 additions and 218 deletions
|
|
@ -13,49 +13,6 @@
|
|||
* and QWidget frontends. This class will be huge, since
|
||||
* I need tons of properties, one for each option. */
|
||||
|
||||
/* Control the state of the Partial Pressure Graphs preferences */
|
||||
class PartialPressureGasSettings : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool show_po2 READ showPo2 WRITE setShowPo2 NOTIFY showPo2Changed)
|
||||
Q_PROPERTY(bool show_pn2 READ showPn2 WRITE setShowPn2 NOTIFY showPn2Changed)
|
||||
Q_PROPERTY(bool show_phe READ showPhe WRITE setShowPhe NOTIFY showPheChanged)
|
||||
Q_PROPERTY(double po2_threshold_min READ po2ThresholdMin WRITE setPo2ThresholdMin NOTIFY po2ThresholdMinChanged)
|
||||
Q_PROPERTY(double po2_threshold_max READ po2ThresholdMax WRITE setPo2ThresholdMax NOTIFY po2ThresholdMaxChanged)
|
||||
Q_PROPERTY(double pn2_threshold READ pn2Threshold WRITE setPn2Threshold NOTIFY pn2ThresholdChanged)
|
||||
Q_PROPERTY(double phe_threshold READ pheThreshold WRITE setPheThreshold NOTIFY pheThresholdChanged)
|
||||
|
||||
public:
|
||||
PartialPressureGasSettings(QObject *parent);
|
||||
bool showPo2() const;
|
||||
bool showPn2() const;
|
||||
bool showPhe() const;
|
||||
double po2ThresholdMin() const;
|
||||
double po2ThresholdMax() const;
|
||||
double pn2Threshold() const;
|
||||
double pheThreshold() const;
|
||||
|
||||
public slots:
|
||||
void setShowPo2(bool value);
|
||||
void setShowPn2(bool value);
|
||||
void setShowPhe(bool value);
|
||||
void setPo2ThresholdMin(double value);
|
||||
void setPo2ThresholdMax(double value);
|
||||
void setPn2Threshold(double value);
|
||||
void setPheThreshold(double value);
|
||||
|
||||
signals:
|
||||
void showPo2Changed(bool value);
|
||||
void showPn2Changed(bool value);
|
||||
void showPheChanged(bool value);
|
||||
void po2ThresholdMaxChanged(double value);
|
||||
void po2ThresholdMinChanged(double value);
|
||||
void pn2ThresholdChanged(double value);
|
||||
void pheThresholdChanged(double value);
|
||||
|
||||
private:
|
||||
const QString group = QStringLiteral("TecDetails");
|
||||
};
|
||||
|
||||
class GeneralSettingsObjectWrapper : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString default_filename READ defaultFilename WRITE setDefaultFilename NOTIFY defaultFilenameChanged)
|
||||
|
|
@ -117,7 +74,7 @@ class SettingsObjectWrapper : public QObject {
|
|||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(qPrefTechnicalDetails* techical_details MEMBER techDetails CONSTANT)
|
||||
Q_PROPERTY(PartialPressureGasSettings* pp_gas MEMBER pp_gas CONSTANT)
|
||||
Q_PROPERTY(qPrefPartialPressureGas* pp_gas MEMBER pp_gas CONSTANT)
|
||||
Q_PROPERTY(qPrefFacebook* facebook MEMBER facebook CONSTANT)
|
||||
Q_PROPERTY(qPrefGeocoding* geocoding MEMBER geocoding CONSTANT)
|
||||
Q_PROPERTY(qPrefProxy* proxy MEMBER proxy CONSTANT)
|
||||
|
|
@ -136,7 +93,7 @@ public:
|
|||
static SettingsObjectWrapper *instance();
|
||||
|
||||
qPrefTechnicalDetails *techDetails;
|
||||
PartialPressureGasSettings *pp_gas;
|
||||
qPrefPartialPressureGas *pp_gas;
|
||||
qPrefFacebook *facebook;
|
||||
qPrefGeocoding *geocoding;
|
||||
qPrefProxy *proxy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue