|
|
|
@ -10,36 +10,12 @@
|
|
|
|
|
#include <QScrollArea>
|
|
|
|
|
#include <QRegExp>
|
|
|
|
|
#include <QRegExpValidator>
|
|
|
|
|
#include <QPair>
|
|
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
|
|
#include "calculateconfig.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <QPair>
|
|
|
|
|
|
|
|
|
|
InitializableMap<QString, QString> PageConfiguration::m_langMap =
|
|
|
|
|
InitializableMap<QString, QString>()
|
|
|
|
|
<< QPair<QString, QString>( "be_BY", QObject::tr("Belarusian") )
|
|
|
|
|
<< QPair<QString, QString>( "bg_BG", QObject::tr("Bulgarian") )
|
|
|
|
|
<< QPair<QString, QString>( "da_DK", QObject::tr("Danish") )
|
|
|
|
|
<< QPair<QString, QString>( "en_GB", QObject::tr("English [en_GB]") )
|
|
|
|
|
<< QPair<QString, QString>( "en_US", QObject::tr("English [en_US]") )
|
|
|
|
|
<< QPair<QString, QString>( "fr_BE", QObject::tr("French [fr_BE]") )
|
|
|
|
|
<< QPair<QString, QString>( "fr_CA", QObject::tr("French [fr_CA]") )
|
|
|
|
|
<< QPair<QString, QString>( "fr_FR", QObject::tr("French [fr_FR]") )
|
|
|
|
|
<< QPair<QString, QString>( "de_DE", QObject::tr("German") )
|
|
|
|
|
<< QPair<QString, QString>( "is_IS", QObject::tr("Icelandic") )
|
|
|
|
|
<< QPair<QString, QString>( "it_IT", QObject::tr("Italian") )
|
|
|
|
|
<< QPair<QString, QString>( "pl_PL", QObject::tr("Polish") )
|
|
|
|
|
<< QPair<QString, QString>( "pt_BR", QObject::tr("Portuguese") )
|
|
|
|
|
<< QPair<QString, QString>( "ru_RU", QObject::tr("Russian") )
|
|
|
|
|
<< QPair<QString, QString>( "sv_SE", QObject::tr("Swedish") )
|
|
|
|
|
<< QPair<QString, QString>( "es_ES", QObject::tr("Spanish") )
|
|
|
|
|
<< QPair<QString, QString>( "nn_NO", QObject::tr("Norwegian Nynorsk") )
|
|
|
|
|
<< QPair<QString, QString>( "uk_UA", QObject::tr("Ukrainian") )
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
PageConfiguration::PageConfiguration() :
|
|
|
|
|
InstallerPage()
|
|
|
|
|
{
|
|
|
|
@ -105,7 +81,6 @@ void PageConfiguration::setupUi()
|
|
|
|
|
m_labelComposite = new QLabel;
|
|
|
|
|
m_chkboxComposite = new QCheckBox;
|
|
|
|
|
m_chkboxComposite->setLayoutDirection( Qt::RightToLeft );
|
|
|
|
|
m_chkboxComposite->setChecked(true);
|
|
|
|
|
hbox_composite->addWidget(m_labelComposite);
|
|
|
|
|
hbox_composite->addWidget(m_chkboxComposite);
|
|
|
|
|
|
|
|
|
@ -115,6 +90,14 @@ void PageConfiguration::setupUi()
|
|
|
|
|
|
|
|
|
|
QVBoxLayout* vbox_extparam = new QVBoxLayout;
|
|
|
|
|
|
|
|
|
|
// builder
|
|
|
|
|
QHBoxLayout* hbox_builder = new QHBoxLayout;
|
|
|
|
|
m_labelBuilder = new QLabel;
|
|
|
|
|
m_chkboxBuilder = new QCheckBox;
|
|
|
|
|
m_chkboxComposite->setLayoutDirection( Qt::RightToLeft );
|
|
|
|
|
hbox_builder->addWidget(m_labelBuilder);
|
|
|
|
|
hbox_builder->addWidget(m_chkboxBuilder);
|
|
|
|
|
|
|
|
|
|
// makeopts
|
|
|
|
|
QHBoxLayout* hbox_makeopts = new QHBoxLayout;
|
|
|
|
|
m_labelMakeOpts = new QLabel;
|
|
|
|
@ -148,6 +131,7 @@ void PageConfiguration::setupUi()
|
|
|
|
|
hbox_clockt->addWidget(m_labelClockType);
|
|
|
|
|
hbox_clockt->addWidget(m_cmbboxClockType);
|
|
|
|
|
|
|
|
|
|
vbox_extparam->addLayout(hbox_builder);
|
|
|
|
|
vbox_extparam->addLayout(hbox_makeopts);
|
|
|
|
|
vbox_extparam->addLayout(hbox_proxy);
|
|
|
|
|
vbox_extparam->addLayout(hbox_ntp);
|
|
|
|
@ -209,6 +193,7 @@ void PageConfiguration::mapSignals()
|
|
|
|
|
connect(m_cmbboxMbrDevice, SIGNAL(currentIndexChanged(int)), this, SLOT( updateData()));
|
|
|
|
|
connect(m_cmbboxVideoDrv, SIGNAL(currentIndexChanged(int)), this, SLOT( updateData()));
|
|
|
|
|
connect(m_chkboxComposite, SIGNAL(toggled(bool)), this, SLOT( updateData()));
|
|
|
|
|
connect(m_chkboxBuilder, SIGNAL(toggled(bool)), this, SLOT( updateData()));
|
|
|
|
|
connect(m_editMakeOpts, SIGNAL(textChanged(QString)), this, SLOT( updateData()));
|
|
|
|
|
connect(m_editProxy, SIGNAL(textChanged(QString)), this, SLOT( updateData()));
|
|
|
|
|
connect(m_editNtp, SIGNAL(textChanged(QString)), this, SLOT( updateData()));
|
|
|
|
@ -225,7 +210,12 @@ void PageConfiguration::unmapSignals()
|
|
|
|
|
disconnect(m_cmbboxMbrDevice);
|
|
|
|
|
disconnect(m_cmbboxVideoDrv);
|
|
|
|
|
disconnect(m_chkboxComposite);
|
|
|
|
|
disconnect(m_chkboxBuilder);
|
|
|
|
|
disconnect(m_editMakeOpts);
|
|
|
|
|
disconnect(m_editProxy);
|
|
|
|
|
disconnect(m_editNtp);
|
|
|
|
|
disconnect(m_cmbboxClockType);
|
|
|
|
|
disconnect(m_chkboxExtParameters);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PageConfiguration::retranslateUi()
|
|
|
|
@ -238,6 +228,27 @@ void PageConfiguration::retranslateUi()
|
|
|
|
|
|
|
|
|
|
m_labelDomainName->setText( tr("Domain: ") );
|
|
|
|
|
|
|
|
|
|
// lang
|
|
|
|
|
m_langMap.clear();
|
|
|
|
|
m_langMap["be_BY"] = tr("Belarusian");
|
|
|
|
|
m_langMap["bg_BG"] = tr("Bulgarian");
|
|
|
|
|
m_langMap["da_DK"] = tr("Danish");
|
|
|
|
|
m_langMap["en_GB"] = tr("English [en_GB]");
|
|
|
|
|
m_langMap["en_US"] = tr("English [en_US]");
|
|
|
|
|
m_langMap["fr_BE"] = tr("French [fr_BE]");
|
|
|
|
|
m_langMap["fr_CA"] = tr("French [fr_CA]");
|
|
|
|
|
m_langMap["fr_FR"] = tr("French [fr_FR]");
|
|
|
|
|
m_langMap["de_DE"] = tr("German");
|
|
|
|
|
m_langMap["is_IS"] = tr("Icelandic");
|
|
|
|
|
m_langMap["it_IT"] = tr("Italian");
|
|
|
|
|
m_langMap["pl_PL"] = tr("Polish");
|
|
|
|
|
m_langMap["pt_BR"] = tr("Portuguese");
|
|
|
|
|
m_langMap["ru_RU"] = tr("Russian");
|
|
|
|
|
m_langMap["sv_SE"] = tr("Swedish");
|
|
|
|
|
m_langMap["es_ES"] = tr("Spanish");
|
|
|
|
|
m_langMap["nn_NO"] = tr("Norwegian Nynorsk");
|
|
|
|
|
m_langMap["uk_UA"] = tr("Ukrainian");
|
|
|
|
|
|
|
|
|
|
m_labelLanguage->setText( tr("Language:") );
|
|
|
|
|
m_cmbboxLanguage->clear();
|
|
|
|
|
foreach(QString lang, CalculateConfig::instance()->getValue("os_install_lang").toStringList() )
|
|
|
|
@ -270,6 +281,8 @@ void PageConfiguration::retranslateUi()
|
|
|
|
|
|
|
|
|
|
m_chkboxExtParameters->setText( tr("Expert settings") );
|
|
|
|
|
|
|
|
|
|
m_labelBuilder->setText( tr("Installation for assembling") );
|
|
|
|
|
|
|
|
|
|
m_labelMakeOpts->setText( tr("Make options (MAKEOPTS):") );
|
|
|
|
|
|
|
|
|
|
m_labelProxy->setText( tr("Proxy server:") );
|
|
|
|
@ -331,6 +344,10 @@ void PageConfiguration::show()
|
|
|
|
|
clConf->getValue("gui_os_install_x11_composite").toString() == "on"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
m_chkboxBuilder->setChecked(
|
|
|
|
|
clConf->getValue("gui_os_install_builder").toString() == "on"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
m_editMakeOpts->setText( clConf->getValue("gui_os_install_makeopts").toString() );
|
|
|
|
|
|
|
|
|
|
m_editProxy->setText( clConf->getValue("gui_os_install_proxy").toString() );
|
|
|
|
@ -359,6 +376,7 @@ void PageConfiguration::updateData()
|
|
|
|
|
clConf->setValue("gui_os_install_x11_composite", m_chkboxComposite->isChecked() ? "on" : "off" );
|
|
|
|
|
|
|
|
|
|
clConf->setValue("gui_expert_mode", m_chkboxExtParameters->isChecked() ? "on" : "off" );
|
|
|
|
|
clConf->setValue("gui_os_install_builder", m_chkboxBuilder->isChecked() ? "on" : "off" );
|
|
|
|
|
clConf->setValue("gui_os_install_makeopts", m_editMakeOpts->text() );
|
|
|
|
|
clConf->setValue("gui_os_install_proxy", m_editProxy->text() );
|
|
|
|
|
clConf->setValue("gui_os_install_ntp", m_editNtp->text() );
|
|
|
|
|