summaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputer.h
diff options
context:
space:
mode:
authorGravatar Joseph W. Joshua <joejoshw@gmail.com>2014-06-11 09:37:27 +0300
committerGravatar Thiago Macieira <thiago@macieira.org>2014-08-13 10:48:14 -0700
commitaad60ef6da3308960767a47cb750c2ba9aab54bd (patch)
tree3160041761184cdb3d871eec35ef54c8305c2efe /qt-ui/configuredivecomputer.h
parente54d7d9178fc159f068587a59244340bec068efb (diff)
downloadsubsurface-aad60ef6da3308960767a47cb750c2ba9aab54bd.tar.gz
Working XML Backup and Restore
The ConfigureDiveComputer class now has functions for complete XML backup and restore. These dump the loaded settings on a dive computer to an XML file, and there is an option to restore them. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
Diffstat (limited to 'qt-ui/configuredivecomputer.h')
-rw-r--r--qt-ui/configuredivecomputer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/configuredivecomputer.h b/qt-ui/configuredivecomputer.h
index ca072e148..31c0cb756 100644
--- a/qt-ui/configuredivecomputer.h
+++ b/qt-ui/configuredivecomputer.h
@@ -8,6 +8,8 @@
#include "configuredivecomputerthreads.h"
#include <QDateTime>
+#include "libxml/xmlreader.h"
+
class ConfigureDiveComputer : public QObject
{
Q_OBJECT
@@ -31,6 +33,7 @@ public:
void saveDeviceDetails(DeviceDetails *details, device_data_t *data);
void fetchDeviceDetails();
bool saveXMLBackup(QString fileName, DeviceDetails *details, device_data_t *data, QString errorText);
+ bool restoreXMLBackup(QString fileName, DeviceDetails *details, QString errorText);
signals:
void message(QString msg);
void error(QString err);
@@ -43,7 +46,7 @@ private:
ReadSettingsThread *readThread;
WriteSettingsThread *writeThread;
void setState(states newState);
-
+ QString addSettingToXML(QString settingName, QVariant value);
private slots:
void readThreadFinished();
void writeThreadFinished();