1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
OpenMW/apps/wizard/languageselectionpage.cpp
2013-12-24 23:09:31 +01:00

35 lines
812 B
C++

#include "languageselectionpage.hpp"
#include "mainwizard.hpp"
Wizard::LanguageSelectionPage::LanguageSelectionPage(MainWizard *wizard) :
QWizardPage(wizard),
mWizard(wizard)
{
setupUi(this);
registerField(QLatin1String("installation.language"), languageComboBox);
}
void Wizard::LanguageSelectionPage::initializePage()
{
QStringList languages;
languages << "English"
<< "French"
<< "German"
<< "Italian"
<< "Polish"
<< "Russian"
<< "Spanish";
languageComboBox->addItems(languages);
}
int Wizard::LanguageSelectionPage::nextId() const
{
if (field("installation.new").toBool() == true)
return MainWizard::Page_InstallationTarget;
return MainWizard::Page_ExistingInstallation;
}