comparison layer/TextLayer.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 a66ff2059dae
children 984c1975f1ff
comparison
equal deleted inserted replaced
315:c30a7cd29f4a 316:c0b9eec70639
24 #include "data/model/TextModel.h" 24 #include "data/model/TextModel.h"
25 25
26 #include <QPainter> 26 #include <QPainter>
27 #include <QMouseEvent> 27 #include <QMouseEvent>
28 #include <QInputDialog> 28 #include <QInputDialog>
29 #include <QTextStream>
29 30
30 #include <iostream> 31 #include <iostream>
31 #include <cmath> 32 #include <cmath>
32 33
33 TextLayer::TextLayer() : 34 TextLayer::TextLayer() :
703 impose = false; 704 impose = false;
704 return ColourDatabase::getInstance()->getColourIndex 705 return ColourDatabase::getInstance()->getColourIndex
705 (QString(darkbg ? "Bright Orange" : "Orange")); 706 (QString(darkbg ? "Bright Orange" : "Orange"));
706 } 707 }
707 708
708 QString 709 void
709 TextLayer::toXmlString(QString indent, QString extraAttributes) const 710 TextLayer::toXml(QTextStream &stream,
710 { 711 QString indent, QString extraAttributes) const
711 return SingleColourLayer::toXmlString(indent, extraAttributes); 712 {
713 SingleColourLayer::toXml(stream, indent, extraAttributes);
712 } 714 }
713 715
714 void 716 void
715 TextLayer::setProperties(const QXmlAttributes &attributes) 717 TextLayer::setProperties(const QXmlAttributes &attributes)
716 { 718 {