summaryrefslogtreecommitdiffstats
path: root/application/setupwizard/BaseWizardPage.h
blob: 9ad54e0947025abbe7b20b74f73261a00c3902fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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);
	}
};