Hoocked up the buttons and the parsing of the XML.

The XML is now being correctly parsed, Clicking on Help
will open the browser pointing to the api site, and clicking
on cancel will cancel the download.

Clicking on Apply still doesn't apply, but that's next. :)

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-06-06 11:31:55 -03:00
parent c1cf6c02a8
commit f55ae15707
5 changed files with 114 additions and 71 deletions

View file

@ -3,6 +3,7 @@
#include <QDialog>
#include <QNetworkReply>
#include <libxml/tree.h>
namespace Ui{
class SubsurfaceWebServices;
@ -23,9 +24,15 @@ private slots:
void downloadError(QNetworkReply::NetworkError error);
private:
explicit SubsurfaceWebServices(QWidget* parent = 0, Qt::WindowFlags f = 0);
Ui::SubsurfaceWebServices *ui;
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