mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
[Move refactor] Move dialogs to interface/widgets/ (#6234)
* Move dialogs/ underneath interface/widgets since QDialog inherits from QWidget. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
b8983f27ab
commit
474c1d0d89
66 changed files with 60 additions and 60 deletions
53
cockatrice/src/interface/widgets/dialogs/dlg_update.h
Normal file
53
cockatrice/src/interface/widgets/dialogs/dlg_update.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
* @file dlg_update.h
|
||||
* @ingroup ClientUpdateDialogs
|
||||
* @brief TODO: Document this.
|
||||
*/
|
||||
|
||||
#ifndef DLG_UPDATE_H
|
||||
#define DLG_UPDATE_H
|
||||
|
||||
#include "../client/network/update/client/update_downloader.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLoggingCategory>
|
||||
#include <QProgressDialog>
|
||||
#include <QtNetwork>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(DlgUpdateLog, "dlg_update");
|
||||
|
||||
class Release;
|
||||
|
||||
class DlgUpdate : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgUpdate(QWidget *parent);
|
||||
|
||||
private slots:
|
||||
void finishedUpdateCheck(bool needToUpdate, bool isCompatible, Release *release);
|
||||
void gotoDownloadPage();
|
||||
void downloadUpdate(const QString &releaseName);
|
||||
void cancelDownload();
|
||||
void updateCheckError(const QString &errorString);
|
||||
void downloadSuccessful(const QUrl &filepath);
|
||||
void downloadProgressMade(qint64 bytesRead, qint64 totalBytes);
|
||||
void downloadError(const QString &errorString);
|
||||
void closeDialog();
|
||||
|
||||
private:
|
||||
QUrl updateUrl;
|
||||
void enableUpdateButton(bool enable);
|
||||
void enableOkButton(bool enable);
|
||||
void addStopDownloadAndRemoveOthers(bool enable);
|
||||
void beginUpdateCheck();
|
||||
void setLabel(const QString &text);
|
||||
QLabel *statusLabel, *descriptionLabel;
|
||||
QProgressBar *progress;
|
||||
QPushButton *manualDownload, *gotoDownload, *ok, *stopDownload;
|
||||
QPushButton *cancel;
|
||||
UpdateDownloader *uDownloader;
|
||||
QDialogButtonBox *buttonBox;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue