mirror of
https://github.com/ioquake/launch.git
synced 2024-11-10 06:31:39 +00:00
41 lines
933 B
C++
41 lines
933 B
C++
#ifndef INSTALLWIZARD_PATCH_H
|
|
#define INSTALLWIZARD_PATCH_H
|
|
|
|
#include <QNetworkAccessManager>
|
|
#include <QTemporaryFile>
|
|
#include <QWizardPage>
|
|
|
|
namespace Ui {
|
|
class InstallWizard_Patch;
|
|
}
|
|
|
|
class InstallWizard_Patch : public QWizardPage
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit InstallWizard_Patch(QWidget *parent = 0);
|
|
~InstallWizard_Patch();
|
|
virtual void initializePage();
|
|
virtual void cleanupPage();
|
|
virtual bool isComplete() const;
|
|
void cancel();
|
|
|
|
private slots:
|
|
void downloadRead();
|
|
void downloadProgress(qint64 bytesRead, qint64 bytesTotal);
|
|
void downloadFinished();
|
|
|
|
private:
|
|
Ui::InstallWizard_Patch *ui;
|
|
QTemporaryFile *patchFile, *unzippedPatchFile;
|
|
QNetworkAccessManager nam;
|
|
QNetworkReply *networkReply;
|
|
bool isCancelled;
|
|
bool isDownloadFinished;
|
|
bool isPatchInstalled;
|
|
bool usePatchFileBuffer;
|
|
QByteArray patchFileBuffer;
|
|
};
|
|
|
|
#endif // INSTALLWIZARD_PATCH_H
|