diff layer/TimeInstantLayer.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 cda569dfbdfe
children 984c1975f1ff
line wrap: on
line diff
--- a/layer/TimeInstantLayer.cpp	Wed Oct 17 12:58:45 2007 +0000
+++ b/layer/TimeInstantLayer.cpp	Thu Oct 18 10:15:07 2007 +0000
@@ -28,6 +28,7 @@
 
 #include <QPainter>
 #include <QMouseEvent>
+#include <QTextStream>
 
 #include <iostream>
 #include <cmath>
@@ -727,12 +728,14 @@
         (QString(darkbg ? "Bright Purple" : "Purple"));
 }
 
-QString
-TimeInstantLayer::toXmlString(QString indent, QString extraAttributes) const
+void
+TimeInstantLayer::toXml(QTextStream &stream,
+                        QString indent, QString extraAttributes) const
 {
-    return SingleColourLayer::toXmlString(indent, extraAttributes +
-                                          QString(" plotStyle=\"%1\"")
-                                          .arg(m_plotStyle));
+    SingleColourLayer::toXml(stream, indent,
+                             extraAttributes +
+                             QString(" plotStyle=\"%1\"")
+                             .arg(m_plotStyle));
 }
 
 void