comparison framework/Document.h @ 672:ae7584dbd668 tuning-difference

Provide facility to re-align models
author Chris Cannam
date Fri, 17 May 2019 09:45:12 +0100
parents 351b1302064e
children 1f18e0f64af8
comparison
equal deleted inserted replaced
671:b6cafe05017d 672:ae7584dbd668
292 * the main model has changed since they were calculated. 292 * the main model has changed since they were calculated.
293 */ 293 */
294 void alignModels(); 294 void alignModels();
295 295
296 /** 296 /**
297 * Re-generate alignments for all appropriate models against the
298 * main model. Existing alignments will be re-calculated.
299 */
300 void realignModels();
301
302 /**
297 * Return true if any external files (most obviously audio) failed 303 * Return true if any external files (most obviously audio) failed
298 * to be found on load, so that the document is incomplete 304 * to be found on load, so that the document is incomplete
299 * compared to its saved description. 305 * compared to its saved description.
300 */ 306 */
301 bool isIncomplete() const { return m_isIncomplete; } 307 bool isIncomplete() const { return m_isIncomplete; }
336 protected: 342 protected:
337 void releaseModel(Model *model); 343 void releaseModel(Model *model);
338 344
339 /** 345 /**
340 * If model is suitable for alignment, align it against the main 346 * If model is suitable for alignment, align it against the main
341 * model and store the alignment in the model. (If the model has 347 * model and store the alignment in the model. If the model has an
342 * an alignment already for the current main model, leave it 348 * alignment already for the current main model, leave it
343 * unchanged.) 349 * unchanged unless forceRecalculate is true.
344 */ 350 */
345 void alignModel(Model *); 351 void alignModel(Model *, bool forceRecalculate = false);
346 352
347 /* 353 /*
348 * Every model that is in use by a layer in the document must be 354 * Every model that is in use by a layer in the document must be
349 * found in either m_mainModel or m_models. We own and control 355 * found in either m_mainModel or m_models. We own and control
350 * the lifespan of all of these models. 356 * the lifespan of all of these models.