2019-01-09 09:08:35 +05:30
|
|
|
#include "LanguagePage.h"
|
|
|
|
|
2021-11-22 08:25:16 +05:30
|
|
|
#include "ui/widgets/LanguageSelectionWidget.h"
|
2019-01-09 09:08:35 +05:30
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
|
|
|
LanguagePage::LanguagePage(QWidget* parent) :
|
|
|
|
QWidget(parent)
|
|
|
|
{
|
|
|
|
setObjectName(QStringLiteral("languagePage"));
|
|
|
|
auto layout = new QVBoxLayout(this);
|
|
|
|
mainWidget = new LanguageSelectionWidget(this);
|
|
|
|
layout->setContentsMargins(0,0,0,0);
|
|
|
|
layout->addWidget(mainWidget);
|
|
|
|
retranslate();
|
|
|
|
}
|
|
|
|
|
|
|
|
LanguagePage::~LanguagePage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool LanguagePage::apply()
|
|
|
|
{
|
|
|
|
applySettings();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void LanguagePage::applySettings()
|
|
|
|
{
|
2021-11-20 20:52:22 +05:30
|
|
|
auto settings = APPLICATION->settings();
|
2019-01-09 09:08:35 +05:30
|
|
|
QString key = mainWidget->getSelectedLanguageKey();
|
|
|
|
settings->set("Language", key);
|
|
|
|
}
|
|
|
|
|
|
|
|
void LanguagePage::loadSettings()
|
|
|
|
{
|
|
|
|
// NIL
|
|
|
|
}
|
|
|
|
|
|
|
|
void LanguagePage::retranslate()
|
|
|
|
{
|
|
|
|
mainWidget->retranslate();
|
|
|
|
}
|