diff main/PreferencesDialog.cpp @ 237:99fa3387dfef

* Update remaining editable layers to support proper realignment on copy/paste * Permit pasting when no suitable layer is current: create a new layer on paste * Add preference for showing the splash screen or not * Rename spectrogram smoothing prefs (partly following Craig's suggestions)
author Chris Cannam
date Wed, 06 Feb 2008 14:15:09 +0000
parents e3ff897a60bf
children cf8748822f4d
line wrap: on
line diff
--- a/main/PreferencesDialog.cpp	Wed Feb 06 12:49:49 2008 +0000
+++ b/main/PreferencesDialog.cpp	Wed Feb 06 14:15:09 2008 +0000
@@ -145,6 +145,14 @@
             this, SLOT(tempDirButtonClicked()));
     tempDirButton->setFixedSize(QSize(24, 24));
 
+    QCheckBox *showSplash = new QCheckBox;
+    m_showSplash = prefs->getShowSplash();
+    showSplash->setCheckState(m_showSplash ? Qt::Checked : Qt::Unchecked);
+    connect(showSplash, SIGNAL(stateChanged(int)),
+            this, SLOT(showSplashChanged(int)));
+
+#ifndef Q_WS_MAC
+
     QComboBox *bgMode = new QComboBox;
     int bg = prefs->getPropertyRangeAndValue("Background Mode", &min, &max,
                                              &deflt);
@@ -156,6 +164,7 @@
 
     connect(bgMode, SIGNAL(currentIndexChanged(int)),
             this, SLOT(backgroundModeChanged(int)));
+#endif
 
     QSpinBox *fontSize = new QSpinBox;
     int fs = prefs->getPropertyRangeAndValue("View Font Size", &min, &max,
@@ -195,6 +204,18 @@
     subgrid->addWidget(fontSize, row++, 1, 1, 2);
 
     subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel
+                                                ("Show Splash Screen"))),
+                       row, 0);
+    subgrid->addWidget(showSplash, row++, 1, 1, 1);
+
+    subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel
+                                                ("Temporary Directory Root"))),
+                       row, 0);
+    subgrid->addWidget(m_tempDirRootEdit, row, 1, 1, 1);
+    subgrid->addWidget(tempDirButton, row, 2, 1, 1);
+    row++;
+
+    subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel
                                                 ("Resample On Load"))),
                        row, 0);
     subgrid->addWidget(resampleOnLoad, row++, 1, 1, 1);
@@ -204,13 +225,6 @@
                        row, 0);
     subgrid->addWidget(resampleQuality, row++, 1, 1, 2);
 
-    subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel
-                                                ("Temporary Directory Root"))),
-                       row, 0);
-    subgrid->addWidget(m_tempDirRootEdit, row, 1, 1, 1);
-    subgrid->addWidget(tempDirButton, row, 2, 1, 1);
-    row++;
-
     subgrid->setRowStretch(row, 10);
     
     tab->addTab(frame, tr("&General"));
@@ -307,6 +321,14 @@
 }
 
 void
+PreferencesDialog::showSplashChanged(int state)
+{
+    m_showSplash = (state == Qt::Checked);
+    m_applyButton->setEnabled(true);
+    m_changesOnRestart = true;
+}
+
+void
 PreferencesDialog::tempDirRootChanged(QString r)
 {
     m_tempDirRoot = r;
@@ -359,6 +381,7 @@
     prefs->setTuningFrequency(m_tuningFrequency);
     prefs->setResampleQuality(m_resampleQuality);
     prefs->setResampleOnLoad(m_resampleOnLoad);
+    prefs->setShowSplash(m_showSplash);
     prefs->setTemporaryDirectoryRoot(m_tempDirRoot);
     prefs->setBackgroundMode(Preferences::BackgroundMode(m_backgroundMode));
     prefs->setViewFontSize(m_viewFontSize);