comparison framework/MainWindowBase.cpp @ 105:907e44e4ecf0

* 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 e154e24b7ec3
children e25e8f5d785b
comparison
equal deleted inserted replaced
104:e154e24b7ec3 105:907e44e4ecf0
33 #include "layer/SliceLayer.h" 33 #include "layer/SliceLayer.h"
34 #include "layer/SliceableLayer.h" 34 #include "layer/SliceableLayer.h"
35 #include "layer/ImageLayer.h" 35 #include "layer/ImageLayer.h"
36 36
37 #include "widgets/ListInputDialog.h" 37 #include "widgets/ListInputDialog.h"
38 #include "widgets/CommandHistory.h"
38 39
39 #include "audioio/AudioCallbackPlaySource.h" 40 #include "audioio/AudioCallbackPlaySource.h"
40 #include "audioio/AudioCallbackPlayTarget.h" 41 #include "audioio/AudioCallbackPlayTarget.h"
41 #include "audioio/AudioTargetFactory.h" 42 #include "audioio/AudioTargetFactory.h"
42 #include "audioio/PlaySpeedRangeMapper.h" 43 #include "audioio/PlaySpeedRangeMapper.h"
52 53
53 #include "base/RecentFiles.h" 54 #include "base/RecentFiles.h"
54 55
55 #include "base/PlayParameterRepository.h" 56 #include "base/PlayParameterRepository.h"
56 #include "base/XmlExportable.h" 57 #include "base/XmlExportable.h"
57 #include "base/CommandHistory.h"
58 #include "base/Profiler.h" 58 #include "base/Profiler.h"
59 #include "base/Preferences.h" 59 #include "base/Preferences.h"
60 60
61 #include "data/osc/OSCQueue.h" 61 #include "data/osc/OSCQueue.h"
62 62
120 connect(m_viewManager, SIGNAL(selectionChanged()), 120 connect(m_viewManager, SIGNAL(selectionChanged()),
121 this, SLOT(updateMenuStates())); 121 this, SLOT(updateMenuStates()));
122 connect(m_viewManager, SIGNAL(inProgressSelectionChanged()), 122 connect(m_viewManager, SIGNAL(inProgressSelectionChanged()),
123 this, SLOT(inProgressSelectionChanged())); 123 this, SLOT(inProgressSelectionChanged()));
124 124
125 // set a sensible default font size for views -- cannot do this
126 // in Preferences, which is in base and not supposed to use QtGui
127 int viewFontSize = QApplication::font().pointSize() * 0.9;
128 QSettings settings;
129 settings.beginGroup("Preferences");
130 viewFontSize = settings.value("view-font-size", viewFontSize).toInt();
131 settings.setValue("view-font-size", viewFontSize);
132 settings.endGroup();
133
125 Preferences::BackgroundMode mode = 134 Preferences::BackgroundMode mode =
126 Preferences::getInstance()->getBackgroundMode(); 135 Preferences::getInstance()->getBackgroundMode();
127 m_initialDarkBackground = m_viewManager->getGlobalDarkBackground(); 136 m_initialDarkBackground = m_viewManager->getGlobalDarkBackground();
128 if (mode != Preferences::BackgroundFromTheme) { 137 if (mode != Preferences::BackgroundFromTheme) {
129 m_viewManager->setGlobalDarkBackground 138 m_viewManager->setGlobalDarkBackground
186 connect(oscTimer, SIGNAL(timeout()), this, SLOT(pollOSC())); 195 connect(oscTimer, SIGNAL(timeout()), this, SLOT(pollOSC()));
187 oscTimer->start(1000); 196 oscTimer->start(1000);
188 } 197 }
189 198
190 Labeller::ValueType labellerType = Labeller::ValueFromTwoLevelCounter; 199 Labeller::ValueType labellerType = Labeller::ValueFromTwoLevelCounter;
191 QSettings settings;
192 settings.beginGroup("MainWindow"); 200 settings.beginGroup("MainWindow");
193 labellerType = (Labeller::ValueType) 201 labellerType = (Labeller::ValueType)
194 settings.value("labellertype", (int)labellerType).toInt(); 202 settings.value("labellertype", (int)labellerType).toInt();
195 int cycle = settings.value("labellercycle", 4).toInt(); 203 int cycle = settings.value("labellercycle", 4).toInt();
196 settings.endGroup(); 204 settings.endGroup();