comparison base/Preferences.cpp @ 387:7aa1de571880

* juggle some files around in order to free audioio, base, and system libraries from dependency on QtGui
author Chris Cannam
date Wed, 12 Mar 2008 17:42:56 +0000
parents 98a480c5f410
children 98077b21a9e1
comparison
equal deleted inserted replaced
386:e6d11871e4c9 387:7aa1de571880
21 21
22 #include <QDir> 22 #include <QDir>
23 #include <QFileInfo> 23 #include <QFileInfo>
24 #include <QMutex> 24 #include <QMutex>
25 #include <QSettings> 25 #include <QSettings>
26 #include <QApplication>
27 #include <QFont>
28 26
29 Preferences * 27 Preferences *
30 Preferences::m_instance = 0; 28 Preferences::m_instance = 0;
31 29
32 Preferences * 30 Preferences *
60 (settings.value("window-type", int(HanningWindow)).toInt()); 58 (settings.value("window-type", int(HanningWindow)).toInt());
61 m_resampleQuality = settings.value("resample-quality", 1).toInt(); 59 m_resampleQuality = settings.value("resample-quality", 1).toInt();
62 m_resampleOnLoad = settings.value("resample-on-load", false).toBool(); 60 m_resampleOnLoad = settings.value("resample-on-load", false).toBool();
63 m_backgroundMode = BackgroundMode 61 m_backgroundMode = BackgroundMode
64 (settings.value("background-mode", int(BackgroundFromTheme)).toInt()); 62 (settings.value("background-mode", int(BackgroundFromTheme)).toInt());
65 m_viewFontSize = settings.value 63 m_viewFontSize = settings.value("view-font-size", 10).toInt();
66 ("view-font-size", int(QApplication::font().pointSize() * 0.9))
67 .toInt();
68 m_showSplash = settings.value("show-splash", true).toBool(); 64 m_showSplash = settings.value("show-splash", true).toBool();
69 settings.endGroup(); 65 settings.endGroup();
70 66
71 settings.beginGroup("TempDirectory"); 67 settings.beginGroup("TempDirectory");
72 m_tempDirRoot = settings.value("create-in", "$HOME").toString(); 68 m_tempDirRoot = settings.value("create-in", "$HOME").toString();
220 } 216 }
221 217
222 if (name == "View Font Size") { 218 if (name == "View Font Size") {
223 if (min) *min = 3; 219 if (min) *min = 3;
224 if (max) *max = 48; 220 if (max) *max = 48;
225 if (deflt) *deflt = int(QApplication::font().pointSize() * 0.9); 221 if (deflt) *deflt = 10;
226 return int(m_viewFontSize); 222 return int(m_viewFontSize);
227 } 223 }
228 224
229 if (name == "Show Splash Screen") { 225 if (name == "Show Splash Screen") {
230 if (deflt) *deflt = 1; 226 if (deflt) *deflt = 1;