11#include <QXmlStreamReader>
12#include <QXmlStreamWriter>
38 QXmlStreamAttributes attributes = reader.attributes();
45 while ((reader.tokenType() != QXmlStreamReader::EndElement) ||
54 if ((reader.tokenType() == QXmlStreamReader::StartElement) &&
57 m_lineStyle.loadXml (reader);
59 }
else if ((reader.tokenType() == QXmlStreamReader::StartElement) &
62 m_pointStyle.loadXml (reader);
69 reader.raiseError (QObject::tr (
"Cannot read curve style data"));
81 QTextStream &str)
const
83 str << indentation <<
"CurveStyle\n";
87 m_pointStyle.printStream (indentation,
89 m_lineStyle.printStream (indentation,
94 const QString &curveName)
const
100 m_lineStyle.saveXml (writer);
101 m_pointStyle.saveXml (writer);
102 writer.writeEndElement();
107 m_lineStyle.setPaletteColor(lineColor);
112 m_lineStyle.setCurveConnectAs(curveConnectAs);
122 m_lineStyle.setWidth(width);
127 m_pointStyle.setPaletteColor(curveColor);
132 m_pointStyle.setLineWidth(width);
137 m_pointStyle.setRadius(radius);
142 m_pointStyle.setShape(shape);
const QString DOCUMENT_SERIALIZE_LINE_STYLE
const QString DOCUMENT_SERIALIZE_CURVE_NAME
const QString DOCUMENT_SERIALIZE_CURVE_STYLE
const QString DOCUMENT_SERIALIZE_POINT_STYLE
log4cpp::Category * mainCat
const QString INDENTATION_DELTA
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
void setLineColor(ColorPalette lineColor)
Set method for line color in specified curve.
void setPointRadius(int radius)
Set method for curve point radius.
LineStyle lineStyle() const
Get method for LineStyle.
void setPointLineWidth(int width)
Set method for curve point perimeter line width.
QString loadXml(QXmlStreamReader &reader)
Load from serialized xml. Returns the curve name.
void setLineConnectAs(CurveConnectAs curveConnectAs)
Set method for connect as method for lines in specified curve.
void setLineWidth(int width)
Set method for line width in specified curve.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setPointStyle(const PointStyle &pointStyle)
Set method for PointStyle.
void saveXml(QXmlStreamWriter &writer, const QString &curveName) const
Serialize to xml.
void setPointColor(ColorPalette curveColor)
Set method curve point color in specified curve.
CurveStyle()
Default constructor.
PointStyle pointStyle() const
Get method for PointStyle.
void setLineStyle(const LineStyle &lineStyle)
Set method for LineStyle.
void setPointShape(PointShape shape)
Set method for curve point shape in specified curve.
Details for a specific Line.
Details for a specific Point.
#define LOG4CPP_INFO_S(logger)