aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpsettingswindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-09-23 17:35:03 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-09-23 17:35:03 +0800
commit09bc96b9afda262f7d3ff73be0a17a1e1be91649 (patch)
treed9ca6d67156cb7269f7c6c7274d7ef23d3ef7154 /qmidiplayer-desktop/qmpsettingswindow.cpp
parent41f9cf6fa2718155c8231d579c8af5f24d947b49 (diff)
downloadQMidiPlayer-09bc96b9afda262f7d3ff73be0a17a1e1be91649.tar.xz
Add a set of icons for dark themes and a option to change the icon theme.
Diffstat (limited to 'qmidiplayer-desktop/qmpsettingswindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpsettingswindow.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpsettingswindow.cpp b/qmidiplayer-desktop/qmpsettingswindow.cpp
index 67bfbb2..72d1cb5 100644
--- a/qmidiplayer-desktop/qmpsettingswindow.cpp
+++ b/qmidiplayer-desktop/qmpsettingswindow.cpp
@@ -24,6 +24,10 @@ qmpSettingsWindow::qmpSettingsWindow(QWidget *parent) :
connect(this,SIGNAL(dialogClosing()),parent,SLOT(dialogClosed()));
settings=new QSettings(QDir::homePath()+QString("/.config/qmprc"),QSettings::IniFormat);
settingsInit();outwidget=ui->cbOutputDevice;
+ ui->pbAdd->setIcon(QIcon(getThemedIcon(":/img/add.png")));
+ ui->pbRemove->setIcon(QIcon(getThemedIcon(":/img/remove.png")));
+ ui->pbDown->setIcon(QIcon(getThemedIcon(":/img/down.png")));
+ ui->pbUp->setIcon(QIcon(getThemedIcon(":/img/up.png")));
}
qmpSettingsWindow::~qmpSettingsWindow()
@@ -181,6 +185,9 @@ void qmpSettingsWindow::settingsInit()
settings->setValue("Behavior/SingleInstance",settings->value("Behavior/SingleInstance",0));
ui->cbPersistentfs->setChecked(settings->value("Behavior/SingleInstance",0).toInt());
+ settings->setValue("Behavior/IconTheme",settings->value("Behavior/IconTheme",0));
+ ui->cbIconTheme->setCurrentIndex(settings->value("Behavior/IconTheme",0).toInt());
+
settings->sync();
delete_fluid_settings(fsettings);
}
@@ -216,6 +223,7 @@ void qmpSettingsWindow::settingsUpdate()
settings->setValue("Audio/BankSelect",ui->cbBSMode->currentText());
settings->setValue("SoundFonts/SFCount",ui->twSoundfont->rowCount());
+
for(int i=0;i<ui->twSoundfont->rowCount();++i)
{
settings->setValue("SoundFonts/SF"+QString::number(i+1),ui->twSoundfont->item(i,1)->text());
@@ -227,6 +235,11 @@ void qmpSettingsWindow::settingsUpdate()
settings->setValue("Behavior/LoadFolder",ui->cbLoadFolder->isChecked()?1:0);
settings->setValue("Behavior/DialogStatus",ui->cbDialogStatus->isChecked()?1:0);
+
+ settings->setValue("Behavior/SingleInstance",ui->cbPersistentfs->isChecked()?1:0);
+
+ settings->setValue("Behavior/IconTheme",ui->cbIconTheme->currentIndex());
+
if(!ui->cbDialogStatus->isChecked())
{
settings->remove("DialogStatus/MainW");
@@ -256,8 +269,6 @@ void qmpSettingsWindow::settingsUpdate()
settings->remove("Effects/ChorusType");
}
- settings->setValue("Behavior/SingleInstance",ui->cbPersistentfs->isChecked()?1:0);
-
for(int i=0;i<ui->twPluginList->rowCount();++i)
settings->setValue(
QString("PluginSwitch/")+ui->twPluginList->item(i,1)->text(),