diff main/PreferencesDialog.cpp @ 466:33d0632255b5 integration_library

Merge with the Kiosk branch
author mathieub <mathieu.barthet@eecs.qmul.ac.uk>
date Mon, 25 Jul 2011 21:04:31 +0100
parents 4bccf2014f80 f8f74f1b5b4f
children
line wrap: on
line diff
--- a/main/PreferencesDialog.cpp	Mon Jul 25 19:38:50 2011 +0100
+++ b/main/PreferencesDialog.cpp	Mon Jul 25 21:04:31 2011 +0100
@@ -191,6 +191,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,
@@ -299,9 +305,17 @@
     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);
     
     m_tabOrdering[AppearanceTab] = m_tabs->count();
+
     m_tabs->addTab(frame, tr("&Appearance"));
+    
 
     // Analysis tab
 
@@ -483,6 +497,15 @@
     m_applyButton->setEnabled(true);
 }
 
+
+void
+PreferencesDialog::startInMiniModeChanged(int state)
+{
+    m_startInMiniMode = (state == Qt::Checked);
+    m_applyButton->setEnabled(true);
+    m_changesOnRestart = true;
+}
+
 void
 PreferencesDialog::tempDirRootChanged(QString r)
 {
@@ -546,6 +569,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));