1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 21:42:13 +00:00
OpenMW/apps/wizard/methodselectionpage.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.0 KiB
C++
Raw Normal View History

2013-12-08 20:35:57 +00:00
#include "methodselectionpage.hpp"
2013-12-08 21:58:29 +00:00
#include "mainwizard.hpp"
#include <QDesktopServices>
#include <QUrl>
Wizard::MethodSelectionPage::MethodSelectionPage(QWidget* parent)
: QWizardPage(parent)
2013-12-08 20:35:57 +00:00
{
mWizard = qobject_cast<MainWizard*>(parent);
2013-12-08 20:35:57 +00:00
setupUi(this);
2014-11-22 23:51:57 +00:00
#ifndef OPENMW_USE_UNSHIELD
retailDiscRadioButton->setEnabled(false);
2014-11-22 23:51:57 +00:00
existingLocationRadioButton->setChecked(true);
buyLinkButton->released();
2014-11-22 23:51:57 +00:00
#endif
2022-09-22 18:26:05 +00:00
registerField(QLatin1String("installation.retailDisc"), retailDiscRadioButton);
2022-09-22 18:26:05 +00:00
connect(buyLinkButton, &QCommandLinkButton::released, this, &MethodSelectionPage::handleBuyButton);
2013-12-08 20:35:57 +00:00
}
2013-12-08 21:58:29 +00:00
int Wizard::MethodSelectionPage::nextId() const
{
if (field(QLatin1String("installation.retailDisc")).toBool() == true)
{
return MainWizard::Page_InstallationTarget;
}
else
{
return MainWizard::Page_ExistingInstallation;
}
2013-12-08 21:58:29 +00:00
}
void Wizard::MethodSelectionPage::handleBuyButton()
{
QDesktopServices::openUrl(QUrl("https://openmw.org/faq/#do_i_need_morrowind"));
}