mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 21:20:19 +00:00
f55ae15707
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>
38 lines
No EOL
926 B
C++
38 lines
No EOL
926 B
C++
#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 |