Mercurial > hg > svgui
diff layer/SpectrumLayer.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 | 3101c68a00c1 |
children | 29fcf125f98b |
line wrap: on
line diff
--- a/layer/SpectrumLayer.cpp Wed Oct 17 12:58:45 2007 +0000 +++ b/layer/SpectrumLayer.cpp Thu Oct 18 10:15:07 2007 +0000 @@ -24,6 +24,8 @@ #include "base/ColourMapper.h" #include <QPainter> +#include <QTextStream> + SpectrumLayer::SpectrumLayer() : m_originModel(0), @@ -795,17 +797,16 @@ curve = m_biasCurve; } -QString -SpectrumLayer::toXmlString(QString indent, QString extraAttributes) const +void +SpectrumLayer::toXml(QTextStream &stream, + QString indent, QString extraAttributes) const { - QString s; - - s += QString("windowSize=\"%1\" " - "windowHopLevel=\"%2\"") + QString s = QString("windowSize=\"%1\" " + "windowHopLevel=\"%2\"") .arg(m_windowSize) .arg(m_windowHopLevel); - return SliceLayer::toXmlString(indent, extraAttributes + " " + s); + SliceLayer::toXml(stream, indent, extraAttributes + " " + s); } void