mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 12:54:10 -07:00
* update format.sh add shellcheck to format.sh add statement macros to .clang-format add no clang format to format.sh add changed file list to format.sh diff rename --cf-version to --print-version in format.sh lint files * enable --shell on ci runs * remove useless semicolons removes the semicolons after empty function definitions these semicolons are optional, they don't do anything this will have functions be consistently formatted if we want to keep the option to have these on the same line like they were before we should use the option AllowShortFunctionsOnASingleLine: None * fix script * update echo line in lint_cpp.sh which doesn't lint cpp only at all
67 lines
1.5 KiB
C++
67 lines
1.5 KiB
C++
#ifndef PAGETEMPLATES_H
|
|
#define PAGETEMPLATES_H
|
|
|
|
#include <QWizardPage>
|
|
|
|
class OracleWizard;
|
|
class QCheckBox;
|
|
class QLabel;
|
|
class QLineEdit;
|
|
class QProgressBar;
|
|
|
|
class OracleWizardPage : public QWizardPage
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit OracleWizardPage(QWidget *parent = nullptr) : QWizardPage(parent)
|
|
{
|
|
}
|
|
virtual void retranslateUi() = 0;
|
|
|
|
signals:
|
|
void readyToContinue();
|
|
|
|
protected:
|
|
inline OracleWizard *wizard()
|
|
{
|
|
return (OracleWizard *)QWizardPage::wizard();
|
|
};
|
|
};
|
|
|
|
class SimpleDownloadFilePage : public OracleWizardPage
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit SimpleDownloadFilePage(QWidget *parent = nullptr);
|
|
|
|
protected:
|
|
void initializePage() override;
|
|
bool validatePage() override;
|
|
void downloadFile(QUrl url);
|
|
virtual QString getDefaultUrl() = 0;
|
|
virtual QString getCustomUrlSettingsKey() = 0;
|
|
virtual QString getDefaultSavePath() = 0;
|
|
virtual QString getWindowTitle() = 0;
|
|
virtual QString getFileType() = 0;
|
|
bool saveToFile();
|
|
bool internalSaveToFile(const QString &fileName);
|
|
|
|
protected:
|
|
QByteArray downloadData;
|
|
QLabel *urlLabel;
|
|
QLabel *pathLabel;
|
|
QLineEdit *urlLineEdit;
|
|
QPushButton *urlButton;
|
|
QLabel *progressLabel;
|
|
QProgressBar *progressBar;
|
|
QCheckBox *defaultPathCheckBox;
|
|
|
|
signals:
|
|
void parsedDataReady();
|
|
private slots:
|
|
void actRestoreDefaultUrl();
|
|
void actDownloadProgress(qint64 received, qint64 total);
|
|
void actDownloadFinished();
|
|
};
|
|
|
|
#endif // PAGETEMPLATES_H
|