comparison 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
comparison
equal deleted inserted replaced
465:b3b9cc8f5466 466:33d0632255b5
189 m_showSplash = prefs->getShowSplash(); 189 m_showSplash = prefs->getShowSplash();
190 showSplash->setCheckState(m_showSplash ? Qt::Checked : Qt::Unchecked); 190 showSplash->setCheckState(m_showSplash ? Qt::Checked : Qt::Unchecked);
191 connect(showSplash, SIGNAL(stateChanged(int)), 191 connect(showSplash, SIGNAL(stateChanged(int)),
192 this, SLOT(showSplashChanged(int))); 192 this, SLOT(showSplashChanged(int)));
193 193
194 QCheckBox *startInMiniMode = new QCheckBox;
195 m_startInMiniMode = prefs->getStartInMiniMode();
196 startInMiniMode->setCheckState(m_startInMiniMode ? Qt::Checked : Qt::Unchecked);
197 connect(startInMiniMode, SIGNAL(stateChanged(int)),
198 this, SLOT(startInMiniModeChanged(int)));
199
194 #ifndef Q_WS_MAC 200 #ifndef Q_WS_MAC
195 QComboBox *bgMode = new QComboBox; 201 QComboBox *bgMode = new QComboBox;
196 int bg = prefs->getPropertyRangeAndValue("Background Mode", &min, &max, 202 int bg = prefs->getPropertyRangeAndValue("Background Mode", &min, &max,
197 &deflt); 203 &deflt);
198 m_backgroundMode = bg; 204 m_backgroundMode = bg;
297 ("Show Splash Screen"))), 303 ("Show Splash Screen"))),
298 row, 0); 304 row, 0);
299 subgrid->addWidget(showSplash, row++, 1, 1, 1); 305 subgrid->addWidget(showSplash, row++, 1, 1, 1);
300 306
301 subgrid->setRowStretch(row, 10); 307 subgrid->setRowStretch(row, 10);
308
309 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel
310 ("Start In Minimal Mode"))), row, 0);
311 subgrid->addWidget(startInMiniMode, row++, 1, 1, 1);
312
313 subgrid->setRowStretch(row, 10);
302 314
303 m_tabOrdering[AppearanceTab] = m_tabs->count(); 315 m_tabOrdering[AppearanceTab] = m_tabs->count();
316
304 m_tabs->addTab(frame, tr("&Appearance")); 317 m_tabs->addTab(frame, tr("&Appearance"));
318
305 319
306 // Analysis tab 320 // Analysis tab
307 321
308 frame = new QFrame; 322 frame = new QFrame;
309 subgrid = new QGridLayout; 323 subgrid = new QGridLayout;
479 void 493 void
480 PreferencesDialog::defaultTemplateChanged(int i) 494 PreferencesDialog::defaultTemplateChanged(int i)
481 { 495 {
482 m_currentTemplate = m_templates[i]; 496 m_currentTemplate = m_templates[i];
483 m_applyButton->setEnabled(true); 497 m_applyButton->setEnabled(true);
498 }
499
500
501 void
502 PreferencesDialog::startInMiniModeChanged(int state)
503 {
504 m_startInMiniMode = (state == Qt::Checked);
505 m_applyButton->setEnabled(true);
506 m_changesOnRestart = true;
484 } 507 }
485 508
486 void 509 void
487 PreferencesDialog::tempDirRootChanged(QString r) 510 PreferencesDialog::tempDirRootChanged(QString r)
488 { 511 {
544 (m_propertyLayout)); 567 (m_propertyLayout));
545 prefs->setTuningFrequency(m_tuningFrequency); 568 prefs->setTuningFrequency(m_tuningFrequency);
546 prefs->setResampleQuality(m_resampleQuality); 569 prefs->setResampleQuality(m_resampleQuality);
547 prefs->setResampleOnLoad(m_resampleOnLoad); 570 prefs->setResampleOnLoad(m_resampleOnLoad);
548 prefs->setShowSplash(m_showSplash); 571 prefs->setShowSplash(m_showSplash);
572 prefs->setStartInMiniMode(m_startInMiniMode);
549 prefs->setTemporaryDirectoryRoot(m_tempDirRoot); 573 prefs->setTemporaryDirectoryRoot(m_tempDirRoot);
550 prefs->setBackgroundMode(Preferences::BackgroundMode(m_backgroundMode)); 574 prefs->setBackgroundMode(Preferences::BackgroundMode(m_backgroundMode));
551 prefs->setTimeToTextMode(Preferences::TimeToTextMode(m_timeToTextMode)); 575 prefs->setTimeToTextMode(Preferences::TimeToTextMode(m_timeToTextMode));
552 prefs->setViewFontSize(m_viewFontSize); 576 prefs->setViewFontSize(m_viewFontSize);
553 577