comparison framework/Document.h @ 601:021d42e6c8cb

Avoid setting the session file path when loading an incomplete document, so that the default-file save-on-exit and File->Save are not activated (to avoid losing references to unfound audio files)
author Chris Cannam
date Mon, 18 Jun 2018 14:16:06 +0100
parents b23bebfdfaba
children 7d3a6357ce64
comparison
equal deleted inserted replaced
600:ca96a514fbbb 601:021d42e6c8cb
194 194
195 /** 195 /**
196 * Get the main model (the source for playback sample rate, etc). 196 * Get the main model (the source for playback sample rate, etc).
197 */ 197 */
198 const WaveFileModel *getMainModel() const { return m_mainModel; } 198 const WaveFileModel *getMainModel() const { return m_mainModel; }
199 199
200 std::vector<Model *> getTransformInputModels(); 200 std::vector<Model *> getTransformInputModels();
201 201
202 bool isKnownModel(const Model *) const; 202 bool isKnownModel(const Model *) const;
203 203
204 /** 204 /**
290 * Generate alignments for all appropriate models against the main 290 * Generate alignments for all appropriate models against the main
291 * model. Existing alignments will not be re-calculated unless 291 * model. Existing alignments will not be re-calculated unless
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
296 /**
297 * Return true if any external files (most obviously audio) failed
298 * to be found on load, so that the document is incomplete
299 * compared to its saved description.
300 */
301 bool isIncomplete() const { return m_isIncomplete; }
302
303 void setIncomplete(bool i) { m_isIncomplete = i; }
295 304
296 void toXml(QTextStream &, QString indent, QString extraAttributes) const; 305 void toXml(QTextStream &, QString indent, QString extraAttributes) const;
297 void toXmlAsTemplate(QTextStream &, QString indent, QString extraAttributes) const; 306 void toXmlAsTemplate(QTextStream &, QString indent, QString extraAttributes) const;
298 307
299 signals: 308 signals:
441 typedef std::set<Layer *> LayerSet; 450 typedef std::set<Layer *> LayerSet;
442 LayerSet m_layers; 451 LayerSet m_layers;
443 452
444 bool m_autoAlignment; 453 bool m_autoAlignment;
445 Align *m_align; 454 Align *m_align;
455
456 bool m_isIncomplete;
446 }; 457 };
447 458
448 #endif 459 #endif