Mercurial > hg > svgui
diff layer/Colour3DPlotLayer.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 | cd2492c5fe45 |
children | 984c1975f1ff |
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp Wed Oct 17 12:58:45 2007 +0000 +++ b/layer/Colour3DPlotLayer.cpp Thu Oct 18 10:15:07 2007 +0000 @@ -23,6 +23,7 @@ #include <QPainter> #include <QImage> #include <QRect> +#include <QTextStream> #include <iostream> @@ -779,21 +780,20 @@ return true; } -QString -Colour3DPlotLayer::toXmlString(QString indent, QString extraAttributes) const +void +Colour3DPlotLayer::toXml(QTextStream &stream, + QString indent, QString extraAttributes) const { - QString s; - - s += QString("scale=\"%1\" " - "colourScheme=\"%2\" " - "normalizeColumns=\"%3\" " - "normalizeVisibleArea=\"%4\"") + QString s = QString("scale=\"%1\" " + "colourScheme=\"%2\" " + "normalizeColumns=\"%3\" " + "normalizeVisibleArea=\"%4\"") .arg((int)m_colourScale) .arg(m_colourMap) .arg(m_normalizeColumns ? "true" : "false") .arg(m_normalizeVisibleArea ? "true" : "false"); - return Layer::toXmlString(indent, extraAttributes + " " + s); + Layer::toXml(stream, indent, extraAttributes + " " + s); } void