changeset 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 b9faa1418d29
files audioio/AudioCallbackPlaySource.cpp audioio/AudioCallbackPlaySource.h audioio/audioio.pro framework/Document.cpp framework/MainWindowBase.cpp
diffstat 5 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp	Tue Mar 11 09:23:48 2008 +0000
+++ b/audioio/AudioCallbackPlaySource.cpp	Wed Mar 12 17:42:56 2008 +0000
@@ -18,7 +18,7 @@
 #include "AudioGenerator.h"
 
 #include "data/model/Model.h"
-#include "view/ViewManager.h"
+#include "base/ViewManagerBase.h"
 #include "base/PlayParameterRepository.h"
 #include "base/Preferences.h"
 #include "data/model/DenseTimeValueModel.h"
@@ -39,7 +39,7 @@
 
 const size_t AudioCallbackPlaySource::m_ringBufferSize = 131071;
 
-AudioCallbackPlaySource::AudioCallbackPlaySource(ViewManager *manager,
+AudioCallbackPlaySource::AudioCallbackPlaySource(ViewManagerBase *manager,
                                                  QString clientName) :
     m_viewManager(manager),
     m_audioGenerator(new AudioGenerator()),
--- a/audioio/AudioCallbackPlaySource.h	Tue Mar 11 09:23:48 2008 +0000
+++ b/audioio/AudioCallbackPlaySource.h	Wed Mar 12 17:42:56 2008 +0000
@@ -38,7 +38,7 @@
 }
 
 class Model;
-class ViewManager;
+class ViewManagerBase;
 class AudioGenerator;
 class PlayParameters;
 class RealTimePluginInstance;
@@ -57,7 +57,7 @@
     Q_OBJECT
 
 public:
-    AudioCallbackPlaySource(ViewManager *, QString clientName);
+    AudioCallbackPlaySource(ViewManagerBase *, QString clientName);
     virtual ~AudioCallbackPlaySource();
     
     /**
@@ -260,7 +260,7 @@
     void modelChanged(size_t startFrame, size_t endFrame);
 
 protected:
-    ViewManager                      *m_viewManager;
+    ViewManagerBase                  *m_viewManager;
     AudioGenerator                   *m_audioGenerator;
     QString                           m_clientName;
 
--- a/audioio/audioio.pro	Tue Mar 11 09:23:48 2008 +0000
+++ b/audioio/audioio.pro	Wed Mar 12 17:42:56 2008 +0000
@@ -4,6 +4,7 @@
 load(../sv.prf)
 
 CONFIG += sv staticlib qt thread warn_on stl rtti exceptions
+QT -= gui
 
 TARGET = svaudioio
 
--- a/framework/Document.cpp	Tue Mar 11 09:23:48 2008 +0000
+++ b/framework/Document.cpp	Wed Mar 12 17:42:56 2008 +0000
@@ -20,7 +20,7 @@
 #include "data/model/DenseThreeDimensionalModel.h"
 #include "data/model/DenseTimeValueModel.h"
 #include "layer/Layer.h"
-#include "base/CommandHistory.h"
+#include "widgets/CommandHistory.h"
 #include "base/Command.h"
 #include "view/View.h"
 #include "base/PlayParameterRepository.h"
--- a/framework/MainWindowBase.cpp	Tue Mar 11 09:23:48 2008 +0000
+++ b/framework/MainWindowBase.cpp	Wed Mar 12 17:42:56 2008 +0000
@@ -35,6 +35,7 @@
 #include "layer/ImageLayer.h"
 
 #include "widgets/ListInputDialog.h"
+#include "widgets/CommandHistory.h"
 
 #include "audioio/AudioCallbackPlaySource.h"
 #include "audioio/AudioCallbackPlayTarget.h"
@@ -54,7 +55,6 @@
 
 #include "base/PlayParameterRepository.h"
 #include "base/XmlExportable.h"
-#include "base/CommandHistory.h"
 #include "base/Profiler.h"
 #include "base/Preferences.h"
 
@@ -122,6 +122,15 @@
     connect(m_viewManager, SIGNAL(inProgressSelectionChanged()),
 	    this, SLOT(inProgressSelectionChanged()));
 
+    // set a sensible default font size for views -- cannot do this
+    // in Preferences, which is in base and not supposed to use QtGui
+    int viewFontSize = QApplication::font().pointSize() * 0.9;
+    QSettings settings;
+    settings.beginGroup("Preferences");
+    viewFontSize = settings.value("view-font-size", viewFontSize).toInt();
+    settings.setValue("view-font-size", viewFontSize);
+    settings.endGroup();
+
     Preferences::BackgroundMode mode =
         Preferences::getInstance()->getBackgroundMode();
     m_initialDarkBackground = m_viewManager->getGlobalDarkBackground();
@@ -188,7 +197,6 @@
     }
 
     Labeller::ValueType labellerType = Labeller::ValueFromTwoLevelCounter;
-    QSettings settings;
     settings.beginGroup("MainWindow");
     labellerType = (Labeller::ValueType)
         settings.value("labellertype", (int)labellerType).toInt();