diff base/View.cpp @ 3:581f67f370f3

* Beginnings of session save code * Add spline curve mode to time value layer
author Chris Cannam
date Thu, 12 Jan 2006 17:19:08 +0000
parents a23739e2338a
children 149bb02a41ba
line wrap: on
line diff
--- a/base/View.cpp	Thu Jan 12 13:45:27 2006 +0000
+++ b/base/View.cpp	Thu Jan 12 17:19:08 2006 +0000
@@ -953,6 +953,39 @@
     QFrame::paintEvent(e);
 }
 
+QString
+View::toXmlString(QString indent, QString extraAttributes) const
+{
+    QString s;
+
+    s += indent;
+
+    s += QString("<view "
+		 "centre=\"%1\" "
+		 "zoom=\"%2\" "
+		 "followPan=\"%3\" "
+		 "followZoom=\"%4\" "
+		 "tracking=\"%5\" "
+		 "light=\"%6\" %7>\n")
+	.arg(m_centreFrame)
+	.arg(m_zoomLevel)
+	.arg(m_followPan)
+	.arg(m_followZoom)
+	.arg(m_followPlay == PlaybackScrollContinuous ? "scroll" :
+	     m_followPlay == PlaybackScrollPage ? "page" : "ignore")
+	.arg(m_lightBackground)
+	.arg(extraAttributes);
+
+    for (size_t i = 0; i < m_layers.size(); ++i) {
+	s += m_layers[i]->toXmlString(indent + "  ");
+    }
+
+    s += indent + "</view>";
+
+    return s;
+}
+
+
 #ifdef INCLUDE_MOCFILES
 #include "View.moc.cpp"
 #endif