mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 13:03:55 -07:00
Client update implementation
This commit is contained in:
parent
36c3536e0c
commit
66fda086c3
10 changed files with 503 additions and 4 deletions
37
cockatrice/src/dlg_update.h
Normal file
37
cockatrice/src/dlg_update.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#ifndef DLG_UPDATE_H
|
||||
#define DLG_UPDATE_H
|
||||
|
||||
#include <QtNetwork>
|
||||
#include <QProgressDialog>
|
||||
|
||||
#include "update_checker.h"
|
||||
#include "update_downloader.h"
|
||||
|
||||
class DlgUpdate : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
DlgUpdate(QWidget *parent);
|
||||
|
||||
private slots:
|
||||
void finishedUpdateCheck(bool needToUpdate, bool isCompatible, QVariantMap *build);
|
||||
void gotoDownloadPage();
|
||||
void downloadUpdate();
|
||||
void updateCheckError(QString errorString);
|
||||
void downloadSuccessful(QUrl filepath);
|
||||
void downloadProgressMade(qint64 bytesRead, qint64 totalBytes);
|
||||
void downloadError(QString errorString);
|
||||
void closeDialog();
|
||||
private:
|
||||
QUrl updateUrl;
|
||||
void enableUpdateButton(bool enable);
|
||||
void beginUpdateCheck();
|
||||
void setLabel(QString text);
|
||||
QLabel *text;
|
||||
QProgressBar *progress;
|
||||
QPushButton *manualDownload, *gotoDownload, *ok;
|
||||
QPushButton *cancel;
|
||||
UpdateChecker *uChecker;
|
||||
UpdateDownloader *uDownloader;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue