Preferences had icon embeddeed in the ui

This commit is contained in:
Romolo Manfredini
2014-01-19 15:58:23 +01:00
parent a4e3cf6f3c
commit 15203266ac
2 changed files with 15 additions and 5 deletions
+15 -1
View File
@@ -17,7 +17,21 @@ preferencesDialog::preferencesDialog(QWidget *parent) :
updateLock(false)
{
ui->setupUi(this);
QSettings settings("companion", "companion");
int theme_set=settings.value("theme", 1).toInt();
QIcon Icon;
QString Theme;
switch(theme_set) {
case 0:
Theme="classic";
break;
default:
Theme="monochrome";
break;
}
Icon.addPixmap(":/themes/"+Theme+"/preferences.png");
this->setWindowIcon(Icon);
QCheckBox * OptionCheckBox[]= {
ui->optionCheckBox_1, ui->optionCheckBox_2, ui->optionCheckBox_3, ui->optionCheckBox_4, ui->optionCheckBox_5, ui->optionCheckBox_6, ui->optionCheckBox_7,
-4
View File
@@ -25,10 +25,6 @@
<property name="windowTitle">
<string>Preferences</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>:/images/preferences.png</normaloff>:/images/preferences.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0,0,1,0">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>