Mercurial > hg > svapp
diff framework/Document.cpp @ 90:db267a315058
* Make alignment plugin configurable through settings file, even though it
isn't yet available in the preferences GUI
author | Chris Cannam |
---|---|
date | Thu, 07 Feb 2008 12:35:08 +0000 |
parents | dd74c5332b49 |
children | 907e44e4ecf0 |
line wrap: on
line diff
--- a/framework/Document.cpp Wed Feb 06 17:40:53 2008 +0000 +++ b/framework/Document.cpp Thu Feb 07 12:35:08 2008 +0000 @@ -29,6 +29,7 @@ #include "plugin/transform/ModelTransformerFactory.h" #include <QApplication> #include <QTextStream> +#include <QSettings> #include <iostream> // For alignment: @@ -759,10 +760,22 @@ return (m_models.find(const_cast<Model *>(model)) != m_models.end()); } +TransformId +Document::getAlignmentTransformName() +{ + 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 = "vamp:match-vamp-plugin:match:path"; + TransformId id = getAlignmentTransformName(); TransformFactory *factory = TransformFactory::getInstance(); return factory->haveTransform(id); } @@ -832,9 +845,6 @@ std::cerr << "Document::alignModel: Alignment transform step size " << transform.getStepSize() << ", block size " << transform.getBlockSize() << std::endl; -//!!! QString args = "<plugin param-serialise=\"1\"/>"; -// Model *transformOutput = factory->transform(id, aggregate, context, args); - ModelTransformerFactory *mtf = ModelTransformerFactory::getInstance(); QString message;