summaryrefslogtreecommitdiffstats
path: root/application/setupwizard/BaseWizardPage.h
diff options
context:
space:
mode:
Diffstat (limited to 'application/setupwizard/BaseWizardPage.h')
-rw-r--r--application/setupwizard/BaseWizardPage.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/application/setupwizard/BaseWizardPage.h b/application/setupwizard/BaseWizardPage.h
new file mode 100644
index 00000000..9ad54e09
--- /dev/null
+++ b/application/setupwizard/BaseWizardPage.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <QWizardPage>
+#include <QEvent>
+
+class BaseWizardPage : public QWizardPage
+{
+public:
+ explicit BaseWizardPage(QWidget *parent = Q_NULLPTR)
+ : QWizardPage(parent)
+ {
+ }
+ virtual ~BaseWizardPage() {};
+
+ virtual bool wantsRefreshButton()
+ {
+ return false;
+ }
+ virtual void refresh()
+ {
+ }
+
+protected:
+ virtual void retranslate() = 0;
+ void changeEvent(QEvent * event) override
+ {
+ if (event->type() == QEvent::LanguageChange)
+ {
+ retranslate();
+ }
+ QWizardPage::changeEvent(event);
+ }
+};