Mercurial > hg > sonic-visualiser
comparison 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 |
comparison
equal
deleted
inserted
replaced
65:77c083741589 | 66:cf27fc7feb7a |
---|---|
16 #include "Document.h" | 16 #include "Document.h" |
17 | 17 |
18 #include "data/model/WaveFileModel.h" | 18 #include "data/model/WaveFileModel.h" |
19 #include "data/model/WritableWaveFileModel.h" | 19 #include "data/model/WritableWaveFileModel.h" |
20 #include "data/model/DenseThreeDimensionalModel.h" | 20 #include "data/model/DenseThreeDimensionalModel.h" |
21 #include "data/model/DenseTimeValueModel.h" | |
21 #include "layer/Layer.h" | 22 #include "layer/Layer.h" |
22 #include "base/CommandHistory.h" | 23 #include "base/CommandHistory.h" |
23 #include "base/Command.h" | 24 #include "base/Command.h" |
24 #include "view/View.h" | 25 #include "view/View.h" |
25 #include "base/PlayParameterRepository.h" | 26 #include "base/PlayParameterRepository.h" |
608 | 609 |
609 if (!duplicate) return adjusted; | 610 if (!duplicate) return adjusted; |
610 } | 611 } |
611 } | 612 } |
612 | 613 |
614 std::vector<Model *> | |
615 Document::getTransformInputModels() | |
616 { | |
617 std::vector<Model *> models; | |
618 | |
619 if (!m_mainModel) return models; | |
620 | |
621 models.push_back(m_mainModel); | |
622 | |
623 //!!! This will pick up all models, including those that aren't visible... | |
624 | |
625 for (ModelMap::iterator i = m_models.begin(); i != m_models.end(); ++i) { | |
626 | |
627 Model *model = i->first; | |
628 if (!model || model == m_mainModel) continue; | |
629 DenseTimeValueModel *dtvm = dynamic_cast<DenseTimeValueModel *>(model); | |
630 | |
631 if (dtvm) { | |
632 models.push_back(dtvm); | |
633 } | |
634 } | |
635 | |
636 return models; | |
637 } | |
638 | |
613 Document::AddLayerCommand::AddLayerCommand(Document *d, | 639 Document::AddLayerCommand::AddLayerCommand(Document *d, |
614 View *view, | 640 View *view, |
615 Layer *layer) : | 641 Layer *layer) : |
616 m_d(d), | 642 m_d(d), |
617 m_view(view), | 643 m_view(view), |