comparison 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
comparison
equal deleted inserted replaced
47:d97a7ed7aa39 48:c6328c8d6536
187 /** 187 /**
188 * Remove the given layer from the given view. 188 * Remove the given layer from the given view.
189 */ 189 */
190 void removeLayerFromView(View *, Layer *); 190 void removeLayerFromView(View *, Layer *);
191 191
192 /**
193 * Specify whether models added via addImportedModel should be
194 * automatically aligned against the main model if appropriate.
195 */
196 void setAutoAlignment(bool on) { m_autoAlignment = on; }
197
198 /**
199 * Generate alignments for all appropriate models against the main
200 * model. Existing alignments will not be re-calculated unless
201 * the main model has changed since they were calculated.
202 */
203 void alignModels();
204
192 void toXml(QTextStream &, QString indent, QString extraAttributes) const; 205 void toXml(QTextStream &, QString indent, QString extraAttributes) const;
193
194 void setAutoAlignment(bool on) { m_autoAlignment = on; }
195 206
196 signals: 207 signals:
197 void layerAdded(Layer *); 208 void layerAdded(Layer *);
198 void layerRemoved(Layer *); 209 void layerRemoved(Layer *);
199 void layerAboutToBeDeleted(Layer *); 210 void layerAboutToBeDeleted(Layer *);
220 */ 231 */
221 void deleteLayer(Layer *, bool force = false); 232 void deleteLayer(Layer *, bool force = false);
222 233
223 /** 234 /**
224 * If model is suitable for alignment, align it against the main 235 * If model is suitable for alignment, align it against the main
225 * model and store the alignment in the model. 236 * model and store the alignment in the model. (If the model has
237 * an alignment already for the current main model, leave it
238 * unchanged.)
226 */ 239 */
227 void alignModel(Model *); 240 void alignModel(Model *);
228
229 /**
230 * Realign all models if the main model has changed. Is this wise?
231 */
232 void alignModels();
233 241
234 /* 242 /*
235 * Every model that is in use by a layer in the document must be 243 * Every model that is in use by a layer in the document must be
236 * found in either m_mainModel or m_models. We own and control 244 * found in either m_mainModel or m_models. We own and control
237 * the lifespan of all of these models. 245 * the lifespan of all of these models.