Mercurial > hg > sonic-visualiser
comparison 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 |
comparison
equal
deleted
inserted
replaced
458:a94be56cf98f | 459:f8f74f1b5b4f |
---|---|
185 m_showSplash = prefs->getShowSplash(); | 185 m_showSplash = prefs->getShowSplash(); |
186 showSplash->setCheckState(m_showSplash ? Qt::Checked : Qt::Unchecked); | 186 showSplash->setCheckState(m_showSplash ? Qt::Checked : Qt::Unchecked); |
187 connect(showSplash, SIGNAL(stateChanged(int)), | 187 connect(showSplash, SIGNAL(stateChanged(int)), |
188 this, SLOT(showSplashChanged(int))); | 188 this, SLOT(showSplashChanged(int))); |
189 | 189 |
190 QCheckBox *startInMiniMode = new QCheckBox; | |
191 m_startInMiniMode = prefs->getStartInMiniMode(); | |
192 startInMiniMode->setCheckState(m_startInMiniMode ? Qt::Checked : Qt::Unchecked); | |
193 connect(startInMiniMode, SIGNAL(stateChanged(int)), | |
194 this, SLOT(startInMiniModeChanged(int))); | |
195 | |
190 #ifndef Q_WS_MAC | 196 #ifndef Q_WS_MAC |
191 QComboBox *bgMode = new QComboBox; | 197 QComboBox *bgMode = new QComboBox; |
192 int bg = prefs->getPropertyRangeAndValue("Background Mode", &min, &max, | 198 int bg = prefs->getPropertyRangeAndValue("Background Mode", &min, &max, |
193 &deflt); | 199 &deflt); |
194 m_backgroundMode = bg; | 200 m_backgroundMode = bg; |
292 ("Show Splash Screen"))), | 298 ("Show Splash Screen"))), |
293 row, 0); | 299 row, 0); |
294 subgrid->addWidget(showSplash, row++, 1, 1, 1); | 300 subgrid->addWidget(showSplash, row++, 1, 1, 1); |
295 | 301 |
296 subgrid->setRowStretch(row, 10); | 302 subgrid->setRowStretch(row, 10); |
303 | |
304 subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel | |
305 ("Start In Minimal Mode"))), | |
306 row, 0); | |
307 subgrid->addWidget(startInMiniMode, row++, 1, 1, 1); | |
308 | |
309 subgrid->setRowStretch(row, 10); | |
297 | 310 |
298 tab->addTab(frame, tr("&Appearance")); | 311 tab->addTab(frame, tr("&Appearance")); |
299 | 312 |
300 // Analysis tab | 313 // Analysis tab |
301 | 314 |
410 | 423 |
411 void | 424 void |
412 PreferencesDialog::showSplashChanged(int state) | 425 PreferencesDialog::showSplashChanged(int state) |
413 { | 426 { |
414 m_showSplash = (state == Qt::Checked); | 427 m_showSplash = (state == Qt::Checked); |
428 m_applyButton->setEnabled(true); | |
429 m_changesOnRestart = true; | |
430 } | |
431 | |
432 void | |
433 PreferencesDialog::startInMiniModeChanged(int state) | |
434 { | |
435 m_startInMiniMode = (state == Qt::Checked); | |
415 m_applyButton->setEnabled(true); | 436 m_applyButton->setEnabled(true); |
416 m_changesOnRestart = true; | 437 m_changesOnRestart = true; |
417 } | 438 } |
418 | 439 |
419 void | 440 void |
477 (m_propertyLayout)); | 498 (m_propertyLayout)); |
478 prefs->setTuningFrequency(m_tuningFrequency); | 499 prefs->setTuningFrequency(m_tuningFrequency); |
479 prefs->setResampleQuality(m_resampleQuality); | 500 prefs->setResampleQuality(m_resampleQuality); |
480 prefs->setResampleOnLoad(m_resampleOnLoad); | 501 prefs->setResampleOnLoad(m_resampleOnLoad); |
481 prefs->setShowSplash(m_showSplash); | 502 prefs->setShowSplash(m_showSplash); |
503 prefs->setStartInMiniMode(m_startInMiniMode); | |
482 prefs->setTemporaryDirectoryRoot(m_tempDirRoot); | 504 prefs->setTemporaryDirectoryRoot(m_tempDirRoot); |
483 prefs->setBackgroundMode(Preferences::BackgroundMode(m_backgroundMode)); | 505 prefs->setBackgroundMode(Preferences::BackgroundMode(m_backgroundMode)); |
484 prefs->setTimeToTextMode(Preferences::TimeToTextMode(m_timeToTextMode)); | 506 prefs->setTimeToTextMode(Preferences::TimeToTextMode(m_timeToTextMode)); |
485 prefs->setViewFontSize(m_viewFontSize); | 507 prefs->setViewFontSize(m_viewFontSize); |
486 | 508 |