aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-10-24 22:30:21 -0200
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-10-24 22:30:21 -0200
commit5eb2cc4594ab2181ccc3b09a2540af3fb615468e (patch)
tree2b2d6257d70dfcedc10549527f7819236f5b5191 /qt-ui/subsurfacewebservices.h
parent695f64a23a2b9b5caeceddf802fb1c0c29401c84 (diff)
downloadsubsurface-5eb2cc4594ab2181ccc3b09a2540af3fb615468e.tar.gz
Created a 'WebService' dialog that will handle download and upload.
Created a WebService dialog that will handle download and upload from all child based webservices. Also, ported the currently - only - one webservice to use the new dialog. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/subsurfacewebservices.h')
-rw-r--r--qt-ui/subsurfacewebservices.h32
1 files changed, 23 insertions, 9 deletions
diff --git a/qt-ui/subsurfacewebservices.h b/qt-ui/subsurfacewebservices.h
index 0719a8f15..19c3f56c7 100644
--- a/qt-ui/subsurfacewebservices.h
+++ b/qt-ui/subsurfacewebservices.h
@@ -5,16 +5,35 @@
#include <QNetworkReply>
#include <libxml/tree.h>
-#include "ui_subsurfacewebservices.h"
+#include "ui_webservices.h"
class QAbstractButton;
class QNetworkReply;
-class SubsurfaceWebServices : public QDialog {
+class WebServices : public QDialog{
+ Q_OBJECT
+public:
+ explicit WebServices(QWidget* parent = 0, Qt::WindowFlags f = 0);
+ void hidePassword();
+ void hideUpload();
+
+private slots:
+ virtual void startDownload() = 0;
+ virtual void buttonClicked(QAbstractButton* button) = 0;
+ virtual void downloadFinished() = 0;
+ virtual void downloadError(QNetworkReply::NetworkError error) = 0;
+
+protected:
+ Ui::WebServices ui;
+ QNetworkReply *reply;
+ QNetworkAccessManager *manager;
+ QByteArray downloadedData;
+};
+
+class SubsurfaceWebServices : public WebServices {
Q_OBJECT
public:
static SubsurfaceWebServices* instance();
- void runDialog();
private slots:
void startDownload();
@@ -23,15 +42,10 @@ private slots:
void downloadError(QNetworkReply::NetworkError error);
private:
+ explicit SubsurfaceWebServices(QWidget* parent = 0, Qt::WindowFlags f = 0);
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