summaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Joseph W. Joshua <joejoshw@gmail.com>2014-06-11 11:09:01 +0300
committerGravatar Thiago Macieira <thiago@macieira.org>2014-08-13 10:48:14 -0700
commit09ec8a44e5c48b6b6a2e4ebb1253fd3cd94154ae (patch)
tree8e446dedf7e8ee9ac3eca4ade11ec0ea46bce238 /qt-ui/configuredivecomputer.cpp
parentaad60ef6da3308960767a47cb750c2ba9aab54bd (diff)
downloadsubsurface-09ec8a44e5c48b6b6a2e4ebb1253fd3cd94154ae.tar.gz
Add Support for more OSTC 3 Settings
Adds support for more OSTC 3 Settings to the reading, writing, backup and restore functions. These settings are: last deco, units, sampling rate, salinity, dive mode colour and compass gain. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
Diffstat (limited to 'qt-ui/configuredivecomputer.cpp')
-rw-r--r--qt-ui/configuredivecomputer.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputer.cpp b/qt-ui/configuredivecomputer.cpp
index 72f2427d4..c88534e9f 100644
--- a/qt-ui/configuredivecomputer.cpp
+++ b/qt-ui/configuredivecomputer.cpp
@@ -61,9 +61,15 @@ bool ConfigureDiveComputer::saveXMLBackup(QString fileName, DeviceDetails *detai
xml += "\n</DiveComputer>";
xml += "\n<Settings>";
xml += addSettingToXML("CustomText", details->customText());
+ xml += addSettingToXML("LastDeco", details->lastDeco());
xml += addSettingToXML("Brightness", details->brightness());
+ xml += addSettingToXML("Units", details->units());
+ xml += addSettingToXML("SamplingRate", details->samplingRate());
+ xml += addSettingToXML("Salinity", details->salinity());
+ xml += addSettingToXML("DiveModeColor", details->diveModeColor());
xml += addSettingToXML("Language", details->language());
xml += addSettingToXML("DateFormat", details->dateFormat());
+ xml += addSettingToXML("CompassGain", details->compassGain());
xml += "\n</Settings>";
xml += "\n</DiveComputerSettingsBackup>";
QFile file(fileName);
@@ -120,14 +126,32 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
if (settingName == "CustomText")
details->setCustomText(keyString);
+ if (settingName == "LastDeco")
+ details->setLastDeco(keyString.toInt());
+
if (settingName == "Brightness")
details->setBrightness(keyString.toInt());
+ if (settingName == "Units")
+ details->setUnits(keyString.toInt());
+
+ if (settingName == "SamplingRate")
+ details->setSamplingRate(keyString.toInt());
+
+ if (settingName == "Salinity")
+ details->setSalinity(keyString.toInt());
+
+ if (settingName == "DiveModeColour")
+ details->setDiveModeColor(keyString.toInt());
+
if (settingName == "Language")
details->setLanguage(keyString.toInt());
if (settingName == "DateFormat")
details->setDateFormat(keyString.toInt());
+
+ if (settingName == "CompassGain")
+ details->setCompassGain(keyString.toInt());
}
settingNode = settingNode->next;