Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
315:c30a7cd29f4a | 316:c0b9eec70639 |
---|---|
26 | 26 |
27 #include "widgets/ItemEditDialog.h" | 27 #include "widgets/ItemEditDialog.h" |
28 | 28 |
29 #include <QPainter> | 29 #include <QPainter> |
30 #include <QMouseEvent> | 30 #include <QMouseEvent> |
31 #include <QTextStream> | |
31 | 32 |
32 #include <iostream> | 33 #include <iostream> |
33 #include <cmath> | 34 #include <cmath> |
34 | 35 |
35 TimeInstantLayer::TimeInstantLayer() : | 36 TimeInstantLayer::TimeInstantLayer() : |
725 impose = false; | 726 impose = false; |
726 return ColourDatabase::getInstance()->getColourIndex | 727 return ColourDatabase::getInstance()->getColourIndex |
727 (QString(darkbg ? "Bright Purple" : "Purple")); | 728 (QString(darkbg ? "Bright Purple" : "Purple")); |
728 } | 729 } |
729 | 730 |
730 QString | 731 void |
731 TimeInstantLayer::toXmlString(QString indent, QString extraAttributes) const | 732 TimeInstantLayer::toXml(QTextStream &stream, |
732 { | 733 QString indent, QString extraAttributes) const |
733 return SingleColourLayer::toXmlString(indent, extraAttributes + | 734 { |
734 QString(" plotStyle=\"%1\"") | 735 SingleColourLayer::toXml(stream, indent, |
735 .arg(m_plotStyle)); | 736 extraAttributes + |
737 QString(" plotStyle=\"%1\"") | |
738 .arg(m_plotStyle)); | |
736 } | 739 } |
737 | 740 |
738 void | 741 void |
739 TimeInstantLayer::setProperties(const QXmlAttributes &attributes) | 742 TimeInstantLayer::setProperties(const QXmlAttributes &attributes) |
740 { | 743 { |