diff options
Diffstat (limited to 'configurationdialog.cpp')
-rw-r--r-- | configurationdialog.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/configurationdialog.cpp b/configurationdialog.cpp index d963d3c..12198e3 100644 --- a/configurationdialog.cpp +++ b/configurationdialog.cpp @@ -140,9 +140,27 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent, Qt::WindowFlags f) : S archiveLayout->addWidget(mIconizeCovers); archiveBox->setLayout(archiveLayout); + //auto refresh + QGroupBox *autoRefreshBox = new QGroupBox(tr("Auto Refresh")); + QVBoxLayout *autoRefreshLayout = new QVBoxLayout; + mAutoRefresh = new QCheckBox(tr("Automatically refresh directory")); + autoRefreshLayout->addWidget(mAutoRefresh); + QLabel *refreshL1 = new QLabel(tr("Refresh every (s)")); + mAutoRefreshValue = new QSpinBox; + mAutoRefreshValue->setMinimum(5); + mAutoRefreshValue->setValue(5); + QHBoxLayout *autoSpinLayout = new QHBoxLayout; + autoSpinLayout->addWidget(refreshL1); + autoSpinLayout->addWidget(mAutoRefreshValue); + QVBoxLayout *autoRefreshBoxL = new QVBoxLayout; + autoRefreshBoxL->addWidget(mAutoRefresh); + autoRefreshBoxL->addLayout(autoSpinLayout); + autoRefreshBox->setLayout(autoRefreshBoxL); + //misc - assemble miscLayout->addWidget(hoverBox); miscLayout->addWidget(archiveBox); + miscLayout->addWidget(autoRefreshBox); miscWidget->setLayout(miscLayout); mTab->addTab(miscWidget, tr("Misc. settings")); @@ -431,6 +449,8 @@ void ConfigurationDialog::readSettings(){ mAutoAddCovers->setChecked(s.value("ui/autoaddcovers", false).toBool()); mIconizeCovers->setChecked(s.value("ui/iconizecovers", false).toBool()); mCursorOffset->setValue(s.value("ui/cursoroffset", SmGlobals::instance()->cursorSize().height()).toInt()); + mAutoRefresh->setChecked(s.value("ui/autorefresh", false).toBool()); + mAutoRefreshValue->setValue(s.value("ui/autorefreshvalue", 5).toInt()); //read paths mArchiveDir->setText(s.value("paths/archivedir").toString()); @@ -521,6 +541,8 @@ void ConfigurationDialog::writeSettings(){ s.setValue("ui/autoaddcovers", (mAutoAddCovers->checkState() == Qt::Checked)); s.setValue("ui/iconizecovers", (mIconizeCovers->checkState() == Qt::Checked)); s.setValue("ui/cursoroffset", mCursorOffset->value()); + s.setValue("ui/autorefresh", (mAutoRefresh->checkState() == Qt::Checked)); + s.setValue("ui/autorefreshvalue", mAutoRefreshValue->value()); //write pictures QString curPos = mInfoBox->currentText(); |