diff framework/Document.cpp @ 428:b23db4cef02f alignment_view

Emit a signal when alignment completes
author Chris Cannam
date Fri, 21 Nov 2014 13:15:57 +0000
parents f32a64149602
children d9d132c0e240
line wrap: on
line diff
--- a/framework/Document.cpp	Fri Nov 21 11:48:39 2014 +0000
+++ b/framework/Document.cpp	Fri Nov 21 13:15:57 2014 +0000
@@ -55,6 +55,9 @@
     connect(this, SIGNAL(modelAboutToBeDeleted(Model *)),
             ModelTransformerFactory::getInstance(),
             SLOT(modelAboutToBeDeleted(Model *)));
+
+    connect(m_align, SIGNAL(alignmentComplete(AlignmentModel *)),
+            this, SIGNAL(alignmentComplete(AlignmentModel *)));
 }
 
 Document::~Document()
@@ -1033,24 +1036,10 @@
     return (m_models.find(const_cast<Model *>(model)) != m_models.end());
 }
 
-TransformId
-Document::getAlignmentTransformName()
+bool
+Document::canAlign()
 {
-    QSettings settings;
-    settings.beginGroup("Alignment");
-    TransformId id =
-        settings.value("transform-id",
-                       "vamp:match-vamp-plugin:match:path").toString();
-    settings.endGroup();
-    return id;
-}
-
-bool
-Document::canAlign() 
-{
-    TransformId id = getAlignmentTransformName();
-    TransformFactory *factory = TransformFactory::getInstance();
-    return factory->haveTransform(id);
+    return Align::canAlign();
 }
 
 void