mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
8e81d3f100
This means we don't have to new/delete them, which is a waste of overhead. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
37 lines
918 B
C++
37 lines
918 B
C++
#ifndef SUBSURFACEWEBSERVICES_H
|
|
#define SUBSURFACEWEBSERVICES_H
|
|
|
|
#include <QDialog>
|
|
#include <QNetworkReply>
|
|
#include <libxml/tree.h>
|
|
|
|
#include "ui_subsurfacewebservices.h"
|
|
|
|
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
|