servatrice/cockatrice/src/dlg_update.h
ctrlaltca b29bd9e070
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
2018-01-27 10:41:32 +01:00

43 lines
1.1 KiB
C++

#ifndef DLG_UPDATE_H
#define DLG_UPDATE_H
#include <QDialogButtonBox>
#include <QProgressDialog>
#include <QtNetwork>
#include "update_downloader.h"
class Release;
class DlgUpdate : public QDialog
{
Q_OBJECT
public:
DlgUpdate(QWidget *parent);
private slots:
void finishedUpdateCheck(bool needToUpdate, bool isCompatible, Release *release);
void gotoDownloadPage();
void downloadUpdate();
void cancelDownload();
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 enableOkButton(bool enable);
void addStopDownloadAndRemoveOthers(bool enable);
void beginUpdateCheck();
void setLabel(QString text);
QLabel *statusLabel, *descriptionLabel;
QProgressBar *progress;
QPushButton *manualDownload, *gotoDownload, *ok, *stopDownload;
QPushButton *cancel;
UpdateDownloader *uDownloader;
QDialogButtonBox *buttonBox;
};
#endif