Mercurial > hg > sonic-visualiser
comparison document/Document.cpp @ 107:dd11619b73ba
* Update along with latest Vamp API change. This has not yet been tested.
author | Chris Cannam |
---|---|
date | Mon, 26 Feb 2007 18:13:07 +0000 |
parents | 2678a1f132d2 |
children | d25ea0c2af5c |
comparison
equal
deleted
inserted
replaced
106:f8e362511b2f | 107:dd11619b73ba |
---|---|
147 return newLayer; | 147 return newLayer; |
148 } | 148 } |
149 | 149 |
150 Layer * | 150 Layer * |
151 Document::createDerivedLayer(LayerFactory::LayerType type, | 151 Document::createDerivedLayer(LayerFactory::LayerType type, |
152 TransformName transform) | 152 TransformId transform) |
153 { | 153 { |
154 Layer *newLayer = createLayer(type); | 154 Layer *newLayer = createLayer(type); |
155 if (!newLayer) return 0; | 155 if (!newLayer) return 0; |
156 | 156 |
157 newLayer->setObjectName(getUniqueLayerName | 157 newLayer->setObjectName(getUniqueLayerName |
160 | 160 |
161 return newLayer; | 161 return newLayer; |
162 } | 162 } |
163 | 163 |
164 Layer * | 164 Layer * |
165 Document::createDerivedLayer(TransformName transform, | 165 Document::createDerivedLayer(TransformId transform, |
166 Model *inputModel, | 166 Model *inputModel, |
167 const PluginTransform::ExecutionContext &context, | 167 const PluginTransform::ExecutionContext &context, |
168 QString configurationXml) | 168 QString configurationXml) |
169 { | 169 { |
170 Model *newModel = addDerivedModel(transform, inputModel, | 170 Model *newModel = addDerivedModel(transform, inputModel, |
259 std::cerr << "... it uses a model derived from the old main model, regenerating" << std::endl; | 259 std::cerr << "... it uses a model derived from the old main model, regenerating" << std::endl; |
260 | 260 |
261 // This model was derived from the previous main | 261 // This model was derived from the previous main |
262 // model: regenerate it. | 262 // model: regenerate it. |
263 | 263 |
264 TransformName transform = m_models[model].transform; | 264 TransformId transform = m_models[model].transform; |
265 PluginTransform::ExecutionContext context = m_models[model].context; | 265 PluginTransform::ExecutionContext context = m_models[model].context; |
266 | 266 |
267 Model *replacementModel = | 267 Model *replacementModel = |
268 addDerivedModel(transform, | 268 addDerivedModel(transform, |
269 m_mainModel, | 269 m_mainModel, |
307 // we already emitted modelAboutToBeDeleted for this | 307 // we already emitted modelAboutToBeDeleted for this |
308 delete oldMainModel; | 308 delete oldMainModel; |
309 } | 309 } |
310 | 310 |
311 void | 311 void |
312 Document::addDerivedModel(TransformName transform, | 312 Document::addDerivedModel(TransformId transform, |
313 Model *inputModel, | 313 Model *inputModel, |
314 const PluginTransform::ExecutionContext &context, | 314 const PluginTransform::ExecutionContext &context, |
315 Model *outputModelToAdd, | 315 Model *outputModelToAdd, |
316 QString configurationXml) | 316 QString configurationXml) |
317 { | 317 { |
354 | 354 |
355 emit modelAdded(model); | 355 emit modelAdded(model); |
356 } | 356 } |
357 | 357 |
358 Model * | 358 Model * |
359 Document::addDerivedModel(TransformName transform, | 359 Document::addDerivedModel(TransformId transform, |
360 Model *inputModel, | 360 Model *inputModel, |
361 const PluginTransform::ExecutionContext &context, | 361 const PluginTransform::ExecutionContext &context, |
362 QString configurationXml) | 362 QString configurationXml) |
363 { | 363 { |
364 Model *model = 0; | 364 Model *model = 0; |