mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add preference to change deco model
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b5de08b709
commit
0d20344c90
5 changed files with 130 additions and 70 deletions
|
@ -299,6 +299,11 @@ bool TechnicalDetailsSettings::calcndltts() const
|
|||
return prefs.calcndltts;
|
||||
}
|
||||
|
||||
bool TechnicalDetailsSettings::buehlmann() const
|
||||
{
|
||||
return (prefs.deco_mode == BUEHLMANN);
|
||||
}
|
||||
|
||||
int TechnicalDetailsSettings::gflow() const
|
||||
{
|
||||
return prefs.gflow;
|
||||
|
@ -499,6 +504,17 @@ void TechnicalDetailsSettings::setCalcndltts(bool value)
|
|||
emit calcndlttsChanged(value);
|
||||
}
|
||||
|
||||
void TechnicalDetailsSettings::setBuehlmann(bool value)
|
||||
{
|
||||
if (value == (prefs.deco_mode == BUEHLMANN))
|
||||
return;
|
||||
QSettings s;
|
||||
s.beginGroup(group);
|
||||
s.setValue("buehlmann", value);
|
||||
prefs.deco_mode = value ? BUEHLMANN : VPMB;
|
||||
emit buehlmannChanged(value);
|
||||
}
|
||||
|
||||
void TechnicalDetailsSettings::setGflow(int value)
|
||||
{
|
||||
if (value == prefs.gflow)
|
||||
|
@ -2105,6 +2121,11 @@ void SettingsObjectWrapper::load()
|
|||
GET_BOOL("tankbar", tankbar);
|
||||
GET_BOOL("RulerBar", rulergraph);
|
||||
GET_BOOL("percentagegraph", percentagegraph);
|
||||
v = s.value("buehlmann");
|
||||
if (v.isValid())
|
||||
prefs.deco_mode = v.toBool() ? BUEHLMANN : VPMB;
|
||||
else
|
||||
prefs.deco_mode = BUEHLMANN;
|
||||
GET_INT("gflow", gflow);
|
||||
GET_INT("gfhigh", gfhigh);
|
||||
GET_INT("vpmb_conservatism", vpmb_conservatism);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue