comparison 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
comparison
equal deleted inserted replaced
315:c30a7cd29f4a 316:c0b9eec70639
32 32
33 #include <QPainter> 33 #include <QPainter>
34 #include <QPainterPath> 34 #include <QPainterPath>
35 #include <QMouseEvent> 35 #include <QMouseEvent>
36 #include <QRegExp> 36 #include <QRegExp>
37 #include <QTextStream>
37 38
38 #include <iostream> 39 #include <iostream>
39 #include <cmath> 40 #include <cmath>
40 41
41 TimeValueLayer::TimeValueLayer() : 42 TimeValueLayer::TimeValueLayer() :
1387 1388
1388 command->finish(); 1389 command->finish();
1389 return true; 1390 return true;
1390 } 1391 }
1391 1392
1392 QString 1393 void
1393 TimeValueLayer::toXmlString(QString indent, QString extraAttributes) const 1394 TimeValueLayer::toXml(QTextStream &stream,
1394 { 1395 QString indent, QString extraAttributes) const
1395 return SingleColourLayer::toXmlString(indent, extraAttributes + 1396 {
1396 QString(" colourMap=\"%1\" plotStyle=\"%2\" verticalScale=\"%3\"") 1397 SingleColourLayer::toXml(stream, indent,
1397 .arg(m_colourMap) 1398 extraAttributes +
1398 .arg(m_plotStyle) 1399 QString(" colourMap=\"%1\" plotStyle=\"%2\" verticalScale=\"%3\"")
1399 .arg(m_verticalScale)); 1400 .arg(m_colourMap)
1401 .arg(m_plotStyle)
1402 .arg(m_verticalScale));
1400 } 1403 }
1401 1404
1402 void 1405 void
1403 TimeValueLayer::setProperties(const QXmlAttributes &attributes) 1406 TimeValueLayer::setProperties(const QXmlAttributes &attributes)
1404 { 1407 {