Mercurial > hg > sonic-visualiser
diff document/Document.cpp @ 66:cf27fc7feb7a
* Add Pane menu entries for generating spectrogram etc from non-main models
* Some restructuring of MainWindow menu setup code
author | Chris Cannam |
---|---|
date | Fri, 20 Oct 2006 16:47:13 +0000 |
parents | ca1e3f5657d5 |
children | bedc7517b6e8 |
line wrap: on
line diff
--- a/document/Document.cpp Thu Oct 19 09:57:27 2006 +0000 +++ b/document/Document.cpp Fri Oct 20 16:47:13 2006 +0000 @@ -18,6 +18,7 @@ #include "data/model/WaveFileModel.h" #include "data/model/WritableWaveFileModel.h" #include "data/model/DenseThreeDimensionalModel.h" +#include "data/model/DenseTimeValueModel.h" #include "layer/Layer.h" #include "base/CommandHistory.h" #include "base/Command.h" @@ -610,6 +611,31 @@ } } +std::vector<Model *> +Document::getTransformInputModels() +{ + std::vector<Model *> models; + + if (!m_mainModel) return models; + + models.push_back(m_mainModel); + + //!!! This will pick up all models, including those that aren't visible... + + for (ModelMap::iterator i = m_models.begin(); i != m_models.end(); ++i) { + + Model *model = i->first; + if (!model || model == m_mainModel) continue; + DenseTimeValueModel *dtvm = dynamic_cast<DenseTimeValueModel *>(model); + + if (dtvm) { + models.push_back(dtvm); + } + } + + return models; +} + Document::AddLayerCommand::AddLayerCommand(Document *d, View *view, Layer *layer) :