comparison main/MainWindow.cpp @ 53:94f1c2747de4

* Tidy up plugin parameter dialog by switching it to a simple constructor with separate methods for passing in the additional options if necessary * Fix sizing problem on advanced pane toggle in plugin parameter dialog * Make a start on passing in list of candidate input models for transform
author Chris Cannam
date Wed, 11 Oct 2006 16:18:51 +0000
parents 17787ea5f732
children ec77936c268e
comparison
equal deleted inserted replaced
52:527598e2fa10 53:94f1c2747de4
2965 // supposed to be configurable, because we need to let the user 2965 // supposed to be configurable, because we need to let the user
2966 // change the execution context (block size etc). 2966 // change the execution context (block size etc).
2967 2967
2968 PluginTransform::ExecutionContext context(channel); 2968 PluginTransform::ExecutionContext context(channel);
2969 2969
2970 std::vector<Model *> candidateInputModels;
2971 candidateInputModels.push_back(m_document->getMainModel());
2972
2973 //!!! rationalise this (via document method for example)
2974 for (int i = 0; i < m_paneStack->getPaneCount(); ++i) {
2975 Pane *ip = m_paneStack->getPane(i);
2976 if (!ip) continue;
2977 for (int j = 0; j < ip->getLayerCount(); ++j) {
2978 Layer *jl = ip->getLayer(j);
2979 if (jl) {
2980 Model *model = jl->getModel();
2981 DenseTimeValueModel *dtvm = dynamic_cast<DenseTimeValueModel *>
2982 (model);
2983 if (dtvm) {
2984 int k;
2985 for (k = 0; k < candidateInputModels.size(); ++k) {
2986 if (candidateInputModels[k] == dtvm) break;
2987 }
2988 if (k == candidateInputModels.size()) {
2989 candidateInputModels.push_back(dtvm);
2990 }
2991 }
2992 }
2993 }
2994 }
2995
2970 bool ok = factory->getConfigurationForTransform(transform, 2996 bool ok = factory->getConfigurationForTransform(transform,
2971 m_document->getMainModel(), 2997 candidateInputModels,
2972 context, 2998 context,
2973 configurationXml, 2999 configurationXml,
2974 m_playSource); 3000 m_playSource);
2975 if (!ok) return; 3001 if (!ok) return;
2976 3002