aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/setupwizard/BaseWizardPage.h
blob: 80cc64969710cc4ce78e8c8273cc06e309e57582 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <QEvent>
#include <QWizardPage>

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);
    }
};