Mercurial > hg > sonic-visualiser
diff main/PreferencesDialog.cpp @ 459:f8f74f1b5b4f toggle
Start in minimal mode option added in the Preferences/Appearance menu
author | mathieub <mathieu.barthet@eecs.qmul.ac.uk> |
---|---|
date | Mon, 04 Jul 2011 16:08:20 +0100 |
parents | 868f73825b37 |
children | 33d0632255b5 |
line wrap: on
line diff
--- a/main/PreferencesDialog.cpp Mon Jul 04 13:06:02 2011 +0100 +++ b/main/PreferencesDialog.cpp Mon Jul 04 16:08:20 2011 +0100 @@ -187,6 +187,12 @@ connect(showSplash, SIGNAL(stateChanged(int)), this, SLOT(showSplashChanged(int))); + QCheckBox *startInMiniMode = new QCheckBox; + m_startInMiniMode = prefs->getStartInMiniMode(); + startInMiniMode->setCheckState(m_startInMiniMode ? Qt::Checked : Qt::Unchecked); + connect(startInMiniMode, SIGNAL(stateChanged(int)), + this, SLOT(startInMiniModeChanged(int))); + #ifndef Q_WS_MAC QComboBox *bgMode = new QComboBox; int bg = prefs->getPropertyRangeAndValue("Background Mode", &min, &max, @@ -294,6 +300,13 @@ subgrid->addWidget(showSplash, row++, 1, 1, 1); subgrid->setRowStretch(row, 10); + + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel + ("Start In Minimal Mode"))), + row, 0); + subgrid->addWidget(startInMiniMode, row++, 1, 1, 1); + + subgrid->setRowStretch(row, 10); tab->addTab(frame, tr("&Appearance")); @@ -417,6 +430,14 @@ } void +PreferencesDialog::startInMiniModeChanged(int state) +{ + m_startInMiniMode = (state == Qt::Checked); + m_applyButton->setEnabled(true); + m_changesOnRestart = true; +} + +void PreferencesDialog::tempDirRootChanged(QString r) { m_tempDirRoot = r; @@ -479,6 +500,7 @@ prefs->setResampleQuality(m_resampleQuality); prefs->setResampleOnLoad(m_resampleOnLoad); prefs->setShowSplash(m_showSplash); + prefs->setStartInMiniMode(m_startInMiniMode); prefs->setTemporaryDirectoryRoot(m_tempDirRoot); prefs->setBackgroundMode(Preferences::BackgroundMode(m_backgroundMode)); prefs->setTimeToTextMode(Preferences::TimeToTextMode(m_timeToTextMode));