diff main/OSCHandler.cpp @ 245:fc542303eda2 1.2-stable

* merge from trunk (1.2 ended up being tracked from trunk, but we may want this branch for fixes later)
author Chris Cannam
date Wed, 27 Feb 2008 10:32:45 +0000
parents 1fa0d271fd2c
children
line wrap: on
line diff
--- a/main/OSCHandler.cpp	Fri Nov 30 17:36:14 2007 +0000
+++ b/main/OSCHandler.cpp	Wed Feb 27 10:32:45 2008 +0000
@@ -1,3 +1,17 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    Sonic Visualiser
+    An audio file viewer and annotation editor.
+    Centre for Digital Music, Queen Mary, University of London.
+    This file copyright 2006-2007 Chris Cannam and QMUL.
+    
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the GNU General Public License as
+    published by the Free Software Foundation; either version 2 of the
+    License, or (at your option) any later version.  See the file
+    COPYING included with this distribution for more information.
+*/
 
 #include "MainWindow.h"
 #include "data/osc/OSCQueue.h"
@@ -12,7 +26,7 @@
 #include "audioio/AudioCallbackPlayTarget.h"
 #include "framework/Document.h"
 #include "data/fileio/WavFileWriter.h"
-#include "plugin/transform/ModelTransformerFactory.h"
+#include "plugin/transform/TransformFactory.h"
 #include "widgets/Fader.h"
 #include "widgets/AudioDial.h"
 
@@ -267,9 +281,9 @@
                               << "type " << str.toStdString() << std::endl;
                 } else {
 
-                    PaneConfiguration configuration(type,
-                                                    getMainModel(),
-                                                    channel);
+                    LayerConfiguration configuration(type,
+                                                     getMainModel(),
+                                                     channel);
                     
                     addPane(configuration,
                             tr("Add %1 Pane")
@@ -482,18 +496,17 @@
             message.getArgCount() == 1 &&
             message.getArg(0).canConvert(QVariant::String)) {
 
-            TransformId transform = message.getArg(0).toString();
+            TransformId transformId = message.getArg(0).toString();
 
+	    Transform transform = TransformFactory::getInstance()->
+                getDefaultTransformFor(transformId);
+	    
             Layer *newLayer = m_document->createDerivedLayer
-                (transform,
-                 getMainModel(),
-                 ModelTransformerFactory::getInstance()->getDefaultContextForTransformer
-                 (transform, getMainModel()),
-                 "");
+                (transform, getMainModel());
 
             if (newLayer) {
                 m_document->addLayerToView(pane, newLayer);
-                m_recentTransforms.add(transform);
+                m_recentTransforms.add(transformId);
                 m_paneStack->setCurrentLayer(pane, newLayer);
             }
         }