mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: Fix Configuration of Ceiling Display.
Fix the configuration of the deco ceilings in the mobile version: - make the settings work; - remove reading of the dive computer ceiling from git; - hide the gradient factor in the profile when the calculated ceiling is not shown; - when the calculated ceiling is disabled in the settings, disable editing of the gradient factor. Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
2036c68972
commit
df1974a244
7 changed files with 14 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
||||||
desktop: add a button linking to the 'Contribute' page
|
desktop: add a button linking to the 'Contribute' page
|
||||||
|
mobile: fix configuration of decompression ceiling and gradient factors
|
||||||
desktop: fix gas switches in UDDF exports
|
desktop: fix gas switches in UDDF exports
|
||||||
core: allow of up to 6 O2 sensors (and corresponding voting logic)
|
core: allow of up to 6 O2 sensors (and corresponding voting logic)
|
||||||
desktop: add divemode as a possible dive list column
|
desktop: add divemode as a possible dive list column
|
||||||
|
|
|
@ -3048,8 +3048,6 @@ void set_git_prefs(const char *prefs)
|
||||||
{
|
{
|
||||||
if (strstr(prefs, "TANKBAR"))
|
if (strstr(prefs, "TANKBAR"))
|
||||||
git_prefs.tankbar = 1;
|
git_prefs.tankbar = 1;
|
||||||
if (strstr(prefs, "DCCEILING"))
|
|
||||||
git_prefs.dcceiling = 1;
|
|
||||||
if (strstr(prefs, "SHOW_SETPOINT"))
|
if (strstr(prefs, "SHOW_SETPOINT"))
|
||||||
git_prefs.show_ccr_setpoint = 1;
|
git_prefs.show_ccr_setpoint = 1;
|
||||||
if (strstr(prefs, "SHOW_SENSORS"))
|
if (strstr(prefs, "SHOW_SENSORS"))
|
||||||
|
|
|
@ -121,6 +121,8 @@ extern struct divecomputer *get_dive_dc(struct dive *dive, int nr);
|
||||||
extern const struct divecomputer *get_dive_dc_const(const struct dive *dive, int nr);
|
extern const struct divecomputer *get_dive_dc_const(const struct dive *dive, int nr);
|
||||||
extern timestamp_t dive_endtime(const struct dive *dive);
|
extern timestamp_t dive_endtime(const struct dive *dive);
|
||||||
|
|
||||||
|
extern void set_git_prefs(const char *prefs);
|
||||||
|
|
||||||
extern struct dive *make_first_dc(const struct dive *d, int dc_number);
|
extern struct dive *make_first_dc(const struct dive *d, int dc_number);
|
||||||
extern struct dive *clone_delete_divecomputer(const struct dive *d, int dc_number);
|
extern struct dive *clone_delete_divecomputer(const struct dive *d, int dc_number);
|
||||||
void split_divecomputer(const struct dive *src, int num, struct dive **out1, struct dive **out2);
|
void split_divecomputer(const struct dive *src, int num, struct dive **out1, struct dive **out2);
|
||||||
|
|
|
@ -227,7 +227,6 @@ extern void subsurface_OS_pref_setup();
|
||||||
extern void copy_prefs(struct preferences *src, struct preferences *dest);
|
extern void copy_prefs(struct preferences *src, struct preferences *dest);
|
||||||
|
|
||||||
extern void set_informational_units(const char *units);
|
extern void set_informational_units(const char *units);
|
||||||
extern void set_git_prefs(const char *prefs);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -628,9 +628,11 @@ TemplatePage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TemplateLabel {
|
TemplateLabel {
|
||||||
|
enabled: PrefTechnicalDetails.calcceiling
|
||||||
text: qsTr("GFLow")
|
text: qsTr("GFLow")
|
||||||
}
|
}
|
||||||
TemplateSpinBox {
|
TemplateSpinBox {
|
||||||
|
enabled: PrefTechnicalDetails.calcceiling
|
||||||
id: gfLow
|
id: gfLow
|
||||||
from: 10
|
from: 10
|
||||||
to: 150
|
to: 150
|
||||||
|
@ -645,9 +647,11 @@ TemplatePage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TemplateLabel {
|
TemplateLabel {
|
||||||
|
enabled: PrefTechnicalDetails.calcceiling
|
||||||
text: qsTr("GFHigh")
|
text: qsTr("GFHigh")
|
||||||
}
|
}
|
||||||
TemplateSpinBox {
|
TemplateSpinBox {
|
||||||
|
enabled: PrefTechnicalDetails.calcceiling
|
||||||
id: gfHigh
|
id: gfHigh
|
||||||
from: 10
|
from: 10
|
||||||
to: 150
|
to: 150
|
||||||
|
|
|
@ -405,7 +405,6 @@ void QMLManager::openLocalThenRemote(QString url)
|
||||||
qPrefCloudStorage::set_cloud_verification_status(qPrefCloudStorage::CS_VERIFIED);
|
qPrefCloudStorage::set_cloud_verification_status(qPrefCloudStorage::CS_VERIFIED);
|
||||||
qPrefUnits::set_unit_system(git_prefs.unit_system);
|
qPrefUnits::set_unit_system(git_prefs.unit_system);
|
||||||
qPrefTechnicalDetails::set_tankbar(git_prefs.tankbar);
|
qPrefTechnicalDetails::set_tankbar(git_prefs.tankbar);
|
||||||
qPrefTechnicalDetails::set_dcceiling(git_prefs.dcceiling);
|
|
||||||
qPrefTechnicalDetails::set_show_ccr_setpoint(git_prefs.show_ccr_setpoint);
|
qPrefTechnicalDetails::set_show_ccr_setpoint(git_prefs.show_ccr_setpoint);
|
||||||
qPrefTechnicalDetails::set_show_ccr_sensors(git_prefs.show_ccr_sensors);
|
qPrefTechnicalDetails::set_show_ccr_sensors(git_prefs.show_ccr_sensors);
|
||||||
qPrefPartialPressureGas::set_po2(git_prefs.pp_graphs.po2);
|
qPrefPartialPressureGas::set_po2(git_prefs.pp_graphs.po2);
|
||||||
|
@ -878,7 +877,6 @@ void QMLManager::consumeFinishedLoad()
|
||||||
git_prefs.units = SI_units;
|
git_prefs.units = SI_units;
|
||||||
prefs.units = git_prefs.units;
|
prefs.units = git_prefs.units;
|
||||||
prefs.tankbar = git_prefs.tankbar;
|
prefs.tankbar = git_prefs.tankbar;
|
||||||
prefs.dcceiling = git_prefs.dcceiling;
|
|
||||||
prefs.show_ccr_setpoint = git_prefs.show_ccr_setpoint;
|
prefs.show_ccr_setpoint = git_prefs.show_ccr_setpoint;
|
||||||
prefs.show_ccr_sensors = git_prefs.show_ccr_sensors;
|
prefs.show_ccr_sensors = git_prefs.show_ccr_sensors;
|
||||||
prefs.pp_graphs.po2 = git_prefs.pp_graphs.po2;
|
prefs.pp_graphs.po2 = git_prefs.pp_graphs.po2;
|
||||||
|
|
|
@ -218,6 +218,11 @@ void ProfileScene::updateVisibility(bool diveHasHeartBeat, bool simplified)
|
||||||
return;
|
return;
|
||||||
bool ppGraphs = ppGraphsEnabled(currentdc, simplified);
|
bool ppGraphs = ppGraphsEnabled(currentdc, simplified);
|
||||||
|
|
||||||
|
diveCeiling->setVisible(prefs.calcceiling);
|
||||||
|
for (DiveCalculatedTissue *tissue: allTissues)
|
||||||
|
tissue->setVisible(prefs.calcalltissues && prefs.calcceiling);
|
||||||
|
reportedCeiling->setVisible(prefs.dcceiling);
|
||||||
|
|
||||||
if (simplified) {
|
if (simplified) {
|
||||||
pn2GasItem->setVisible(false);
|
pn2GasItem->setVisible(false);
|
||||||
po2GasItem->setVisible(ppGraphs);
|
po2GasItem->setVisible(ppGraphs);
|
||||||
|
@ -231,6 +236,8 @@ void ProfileScene::updateVisibility(bool diveHasHeartBeat, bool simplified)
|
||||||
ccrsensor2GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1));
|
ccrsensor2GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1));
|
||||||
ccrsensor3GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1));
|
ccrsensor3GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1));
|
||||||
ocpo2GasItem->setVisible((currentdc->divemode == PSCR) && prefs.show_scr_ocpo2);
|
ocpo2GasItem->setVisible((currentdc->divemode == PSCR) && prefs.show_scr_ocpo2);
|
||||||
|
// No point to show the gradient factor if we're not showing the calculated ceiling that is derived from it
|
||||||
|
decoModelParameters->setVisible(prefs.calcceiling);
|
||||||
} else {
|
} else {
|
||||||
pn2GasItem->setVisible(prefs.pp_graphs.pn2);
|
pn2GasItem->setVisible(prefs.pp_graphs.pn2);
|
||||||
po2GasItem->setVisible(prefs.pp_graphs.po2);
|
po2GasItem->setVisible(prefs.pp_graphs.po2);
|
||||||
|
@ -246,15 +253,11 @@ void ProfileScene::updateVisibility(bool diveHasHeartBeat, bool simplified)
|
||||||
|
|
||||||
heartBeatItem->setVisible(prefs.hrgraph && diveHasHeartBeat);
|
heartBeatItem->setVisible(prefs.hrgraph && diveHasHeartBeat);
|
||||||
|
|
||||||
diveCeiling->setVisible(prefs.calcceiling);
|
|
||||||
decoModelParameters->setVisible(prefs.decoinfo);
|
decoModelParameters->setVisible(prefs.decoinfo);
|
||||||
|
|
||||||
for (DiveCalculatedTissue *tissue: allTissues)
|
|
||||||
tissue->setVisible(prefs.calcalltissues && prefs.calcceiling);
|
|
||||||
percentageItem->setVisible(prefs.percentagegraph);
|
percentageItem->setVisible(prefs.percentagegraph);
|
||||||
|
|
||||||
meanDepthItem->setVisible(prefs.show_average_depth);
|
meanDepthItem->setVisible(prefs.show_average_depth);
|
||||||
reportedCeiling->setVisible(prefs.dcceiling);
|
|
||||||
tankItem->setVisible(prefs.tankbar);
|
tankItem->setVisible(prefs.tankbar);
|
||||||
temperatureItem->setVisible(true);
|
temperatureItem->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue