diff layer/TimeValueLayer.cpp @ 316:c0b9eec70639

* Make XmlExportable::toXml the function that is universally overridden (and pure virtual) instead of toXmlString. Tidies up some classes, notably the model classes, significantly. Closes #1794561.
author Chris Cannam
date Thu, 18 Oct 2007 10:15:07 +0000
parents f4458c8bffa6
children 984c1975f1ff
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp	Wed Oct 17 12:58:45 2007 +0000
+++ b/layer/TimeValueLayer.cpp	Thu Oct 18 10:15:07 2007 +0000
@@ -34,6 +34,7 @@
 #include <QPainterPath>
 #include <QMouseEvent>
 #include <QRegExp>
+#include <QTextStream>
 
 #include <iostream>
 #include <cmath>
@@ -1389,14 +1390,16 @@
     return true;
 }
 
-QString
-TimeValueLayer::toXmlString(QString indent, QString extraAttributes) const
+void
+TimeValueLayer::toXml(QTextStream &stream,
+                      QString indent, QString extraAttributes) const
 {
-    return SingleColourLayer::toXmlString(indent, extraAttributes +
-                                          QString(" colourMap=\"%1\" plotStyle=\"%2\" verticalScale=\"%3\"")
-                                          .arg(m_colourMap)
-                                          .arg(m_plotStyle)
-                                          .arg(m_verticalScale));
+    SingleColourLayer::toXml(stream, indent,
+                             extraAttributes +
+                             QString(" colourMap=\"%1\" plotStyle=\"%2\" verticalScale=\"%3\"")
+                             .arg(m_colourMap)
+                             .arg(m_plotStyle)
+                             .arg(m_verticalScale));
 }
 
 void