NOISSUE Flatten gui and logic libraries into MultiMC
This commit is contained in:
parent
dd13368085
commit
20b9f2b42a
1113 changed files with 1228 additions and 1401 deletions
|
@ -1,48 +0,0 @@
|
|||
#include "LanguageWizardPage.h"
|
||||
#include <MultiMC.h>
|
||||
#include <translations/TranslationsModel.h>
|
||||
|
||||
#include "widgets/LanguageSelectionWidget.h"
|
||||
#include <QVBoxLayout>
|
||||
|
||||
LanguageWizardPage::LanguageWizardPage(QWidget *parent)
|
||||
: BaseWizardPage(parent)
|
||||
{
|
||||
setObjectName(QStringLiteral("languagePage"));
|
||||
auto layout = new QVBoxLayout(this);
|
||||
mainWidget = new LanguageSelectionWidget(this);
|
||||
layout->setContentsMargins(0,0,0,0);
|
||||
layout->addWidget(mainWidget);
|
||||
|
||||
retranslate();
|
||||
}
|
||||
|
||||
LanguageWizardPage::~LanguageWizardPage()
|
||||
{
|
||||
}
|
||||
|
||||
bool LanguageWizardPage::wantsRefreshButton()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void LanguageWizardPage::refresh()
|
||||
{
|
||||
auto translations = MMC->translations();
|
||||
translations->downloadIndex();
|
||||
}
|
||||
|
||||
bool LanguageWizardPage::validatePage()
|
||||
{
|
||||
auto settings = MMC->settings();
|
||||
QString key = mainWidget->getSelectedLanguageKey();
|
||||
settings->set("Language", key);
|
||||
return true;
|
||||
}
|
||||
|
||||
void LanguageWizardPage::retranslate()
|
||||
{
|
||||
setTitle(tr("Language"));
|
||||
setSubTitle(tr("Select the language to use in MultiMC"));
|
||||
mainWidget->retranslate();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue