changeset 8:06bba0b79b1c

* Session file save, and the skeleton of session file load.
author Chris Cannam
date Fri, 13 Jan 2006 18:05:07 +0000
parents 634324c6296e
children 561be41ad083
files layer/LayerFactory.cpp widgets/Pane.cpp widgets/Pane.h
diffstat 3 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/layer/LayerFactory.cpp	Thu Jan 12 17:45:23 2006 +0000
+++ b/layer/LayerFactory.cpp	Fri Jan 13 18:05:07 2006 +0000
@@ -195,7 +195,7 @@
 	std::cerr << "LayerFactory::createLayer: Unknown layer type " 
 		  << type << std::endl;
     } else {
-	setModel(layer, model);
+	if (model) setModel(layer, model);
 	std::cerr << "LayerFactory::createLayer: Setting object name "
 		  << getLayerPresentationName(type).toStdString() << " on " << layer << std::endl;
 	layer->setObjectName(getLayerPresentationName(type));
--- a/widgets/Pane.cpp	Thu Jan 12 17:45:23 2006 +0000
+++ b/widgets/Pane.cpp	Fri Jan 13 18:05:07 2006 +0000
@@ -389,7 +389,16 @@
 
     emit paneInteractedWith();
 }
-    
+
+QString
+Pane::toXmlString(QString indent, QString extraAttributes) const
+{
+    return View::toXmlString
+	(indent,
+	 QString("type=\"pane\" centreLineVisible=\"%1\" %2")
+	 .arg(m_centreLineVisible).arg(extraAttributes));
+}
+
 
 #ifdef INCLUDE_MOCFILES
 #include "Pane.moc.cpp"
--- a/widgets/Pane.h	Thu Jan 12 17:45:23 2006 +0000
+++ b/widgets/Pane.h	Fri Jan 13 18:05:07 2006 +0000
@@ -34,6 +34,9 @@
     void setCentreLineVisible(bool visible);
     bool getCentreLineVisible() const { return m_centreLineVisible; }
 
+    virtual QString toXmlString(QString indent = "",
+				QString extraAttributes = "") const;
+
 signals:
     void paneInteractedWith();