Mercurial > hg > svapp
diff framework/Document.h @ 48:c6328c8d6536
* Add Align button to main window; use it
author | Chris Cannam |
---|---|
date | Thu, 25 Oct 2007 15:45:12 +0000 |
parents | d97a7ed7aa39 |
children | a8bb5b2aca4c |
line wrap: on
line diff
--- a/framework/Document.h Thu Oct 25 11:32:54 2007 +0000 +++ b/framework/Document.h Thu Oct 25 15:45:12 2007 +0000 @@ -189,10 +189,21 @@ */ void removeLayerFromView(View *, Layer *); + /** + * Specify whether models added via addImportedModel should be + * automatically aligned against the main model if appropriate. + */ + void setAutoAlignment(bool on) { m_autoAlignment = on; } + + /** + * Generate alignments for all appropriate models against the main + * model. Existing alignments will not be re-calculated unless + * the main model has changed since they were calculated. + */ + void alignModels(); + void toXml(QTextStream &, QString indent, QString extraAttributes) const; - void setAutoAlignment(bool on) { m_autoAlignment = on; } - signals: void layerAdded(Layer *); void layerRemoved(Layer *); @@ -222,15 +233,12 @@ /** * If model is suitable for alignment, align it against the main - * model and store the alignment in the model. + * model and store the alignment in the model. (If the model has + * an alignment already for the current main model, leave it + * unchanged.) */ void alignModel(Model *); - /** - * Realign all models if the main model has changed. Is this wise? - */ - void alignModels(); - /* * Every model that is in use by a layer in the document must be * found in either m_mainModel or m_models. We own and control