summaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-07 13:31:42 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-07 13:31:42 +0900
commitc774bab6e62a112dd186142a7a55a4776388eaba (patch)
tree0fcd269255f70fed4bed097c2a7b6e0d96967c3b /qt-ui/subsurfacewebservices.h
parent6f7e13ac70499ccc74ecf9d03aea65883f530b5c (diff)
parent2d05f4227e5538f3e8976a8244b54a5247ec833c (diff)
downloadsubsurface-c774bab6e62a112dd186142a7a55a4776388eaba.tar.gz
Merge branch '112_webservices' of https://github.com/tcanabrava/subsurface
Diffstat (limited to 'qt-ui/subsurfacewebservices.h')
-rw-r--r--qt-ui/subsurfacewebservices.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/qt-ui/subsurfacewebservices.h b/qt-ui/subsurfacewebservices.h
new file mode 100644
index 000000000..9e85db155
--- /dev/null
+++ b/qt-ui/subsurfacewebservices.h
@@ -0,0 +1,38 @@
+#ifndef SUBSURFACEWEBSERVICES_H
+#define SUBSURFACEWEBSERVICES_H
+
+#include <QDialog>
+#include <QNetworkReply>
+#include <libxml/tree.h>
+
+namespace Ui{
+ class SubsurfaceWebServices;
+};
+class QAbstractButton;
+class QNetworkReply;
+
+class SubsurfaceWebServices : public QDialog {
+ Q_OBJECT
+public:
+ static SubsurfaceWebServices* instance();
+ void runDialog();
+
+private slots:
+ void startDownload();
+ void buttonClicked(QAbstractButton* button);
+ void downloadFinished();
+ void downloadError(QNetworkReply::NetworkError error);
+
+private:
+ void setStatusText(int status);
+ void download_dialog_traverse_xml(xmlNodePtr node, unsigned int *download_status);
+ unsigned int download_dialog_parse_response(const QByteArray& length);
+
+ explicit SubsurfaceWebServices(QWidget* parent = 0, Qt::WindowFlags f = 0);
+ Ui::SubsurfaceWebServices *ui;
+ QNetworkReply *reply;
+ QNetworkAccessManager *manager;
+ QByteArray downloadedData;
+};
+
+#endif \ No newline at end of file