summaryrefslogtreecommitdiff
path: root/plugins/Themes/Oxygen/factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Themes/Oxygen/factory.cpp')
-rw-r--r--plugins/Themes/Oxygen/factory.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/plugins/Themes/Oxygen/factory.cpp b/plugins/Themes/Oxygen/factory.cpp
index c509e10..2e90337 100644
--- a/plugins/Themes/Oxygen/factory.cpp
+++ b/plugins/Themes/Oxygen/factory.cpp
@@ -24,7 +24,7 @@ PluginInterface_Themes * Factory::getInstance()
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
PluginInterface_Themes * newInterface=new Themes(
- optionsEngine->getOptionValue("checkBoxShowSpeed").toBool(),facilityEngine
+ optionsEngine->getOptionValue("checkBoxShowSpeed").toBool(),facilityEngine,optionsEngine->getOptionValue("moreButtonPushed").toBool()
);
connect(newInterface,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)),this,SIGNAL(debugInformation(DebugLevel,QString,QString,QString,int)));
connect(this,SIGNAL(reloadLanguage()),newInterface,SLOT(newLanguageLoaded()));
@@ -43,7 +43,8 @@ void Factory::setResources(OptionInterface * optionsEngine,const QString &writeP
this->optionsEngine=optionsEngine;
//load the options
QList<QPair<QString, QVariant> > KeysList;
- KeysList.append(qMakePair(QString("checkBoxShowSpeed"),QVariant(true)));
+ KeysList.append(qMakePair(QString("checkBoxShowSpeed"),QVariant(false)));
+ KeysList.append(qMakePair(QString("moreButtonPushed"),QVariant(false)));
optionsEngine->addOptionGroup(KeysList);
connect(optionsEngine,SIGNAL(resetOptions()),this,SLOT(resetOptions()));
}
@@ -58,10 +59,14 @@ void Factory::setResources(OptionInterface * optionsEngine,const QString &writeP
QWidget * Factory::options()
{
if(optionsEngine!=NULL)
+ {
ui->checkBoxShowSpeed->setChecked(optionsEngine->getOptionValue("checkBoxShowSpeed").toBool());
+ ui->checkBoxStartWithMoreButtonPushed->setChecked(optionsEngine->getOptionValue("moreButtonPushed").toBool());
+ }
else
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"internal error, crash prevented");
- connect(ui->checkBoxShowSpeed,SIGNAL(toggled(bool)),this,SLOT(checkBoxHaveChanged(bool)));
+ connect(ui->checkBoxShowSpeed,SIGNAL(toggled(bool)),this,SLOT(checkBoxShowSpeedHaveChanged(bool)));
+ connect(ui->checkBoxStartWithMoreButtonPushed,SIGNAL(toggled(bool)),this,SLOT(checkBoxStartWithMoreButtonPushedHaveChanged(bool)));
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"return the options");
return tempWidget;
}
@@ -109,9 +114,11 @@ QIcon Factory::getIcon(const QString &fileName)
void Factory::resetOptions()
{
+ ui->checkBoxShowSpeed->setChecked(true);
+ ui->checkBoxStartWithMoreButtonPushed->setChecked(false);
}
-void Factory::checkBoxHaveChanged(bool toggled)
+void Factory::checkBoxShowSpeedHaveChanged(bool toggled)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Information,"the checkbox have changed");
if(optionsEngine!=NULL)
@@ -120,6 +127,15 @@ void Factory::checkBoxHaveChanged(bool toggled)
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"internal error, crash prevented");
}
+void Factory::checkBoxStartWithMoreButtonPushedHaveChanged(bool toggled)
+{
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Information,"the checkbox have changed");
+ if(optionsEngine!=NULL)
+ optionsEngine->setOptionValue("moreButtonPushed",toggled);
+ else
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"internal error, crash prevented");
+}
+
void Factory::newLanguageLoaded()
{
ui->retranslateUi(tempWidget);