14#include <QXmlStreamReader>
15#include <QXmlStreamWriter>
31 QStringList::const_iterator itr;
32 for (itr = graphCurveNames.begin (); itr != graphCurveNames.end (); itr++) {
34 const QString &graphCurveName = *itr;
44 QStringList::const_iterator itr;
47 QString curveName = *itr;
49 m_curveStyles [curveName] = other.
curveStyle (curveName);
56 QStringList::const_iterator itr;
59 QString curveName = *itr;
61 m_curveStyles [curveName] = other.
curveStyle (curveName);
70 CurveStylesInternal::const_iterator itr;
71 for (itr = m_curveStyles.begin(); itr != m_curveStyles.end(); itr++) {
82 return m_curveStyles [curveName];
88 return m_curveStyles [curveName].lineStyle().paletteColor();
94 return m_curveStyles [curveName].lineStyle().curveConnectAs();
99 return m_curveStyles [curveName].lineStyle();
105 return signed (m_curveStyles [curveName].
lineStyle().width());
115 if (reader.atEnd() || reader.hasError ()) {
120 if ((reader.tokenType() == QXmlStreamReader::EndElement) &&
126 if ((reader.tokenType() == QXmlStreamReader::StartElement) &&
131 QString curveName =
curveStyle.loadXml (reader);
138 reader.raiseError (
"Cannot read curve styles");
145 return m_curveStyles [curveName].pointStyle().paletteColor();
151 return m_curveStyles [curveName].pointStyle().isCircle();
157 return m_curveStyles [curveName].pointStyle().lineWidth();
163 return m_curveStyles [curveName].pointStyle().polygon();
169 return m_curveStyles [curveName].pointStyle().radius();
175 return m_curveStyles [curveName].pointStyle().shape ();
181 return m_curveStyles [curveName].pointStyle();
189 CurveStylesInternal::const_iterator itr;
190 for (itr = m_curveStyles.begin(); itr != m_curveStyles.end(); itr++) {
192 QString curveName = itr.key();
198 writer.writeEndElement();
const QString AXIS_CURVE_NAME
const QString DOCUMENT_SERIALIZE_CURVE_STYLES
const QString DOCUMENT_SERIALIZE_CURVE_STYLE
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT.
log4cpp::Category * mainCat
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
Storage of data belonging to one coordinate system.
virtual Curve * curveForCurveName(const QString &curveName)
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.
virtual const Curve & curveAxes() const
Get method for axis curve.
virtual QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
Container for LineStyle and PointStyle for one Curve.
LineStyle lineStyle() const
Get method for LineStyle.
PointStyle pointStyle() const
Get method for PointStyle.
ColorPalette pointColor(const QString &curveName) const
Get method for curve point color in specified curve.
bool pointIsCircle(const QString &curveName) const
Get method for curve point is circle in specified curve.
const LineStyle lineStyle(const QString &curveName) const
Get method for copying one line style in one step.
void setPointRadius(const QString &curveName, int radius)
Set method for curve point radius.
void setPointLineWidth(const QString &curveName, int width)
Set method for curve point perimeter line width.
void setPointColor(const QString &curveName, ColorPalette curveColor)
Set method curve point color in specified curve.
ColorPalette lineColor(const QString &curveName) const
Get method for line color in specified curve.
int pointRadius(const QString &curveName) const
Get method for curve point radius.
void saveXml(QXmlStreamWriter &writer) const
Serialize to xml.
void loadXml(QXmlStreamReader &reader)
Load from serialized xml.
int pointLineWidth(const QString &curveName) const
Get method for curve point line width.
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
CurveConnectAs lineConnectAs(const QString &curveName) const
Get method for connect as method for lines in specified curve.
void setLineColor(const QString &curveName, ColorPalette lineColor)
Set method for line color in specified curve.
QPolygonF pointPolygon(const QString &curveName) const
Get method for curve point polygon in specified curve.
const PointStyle pointStyle(const QString &curveName) const
Get method for copying one point style. Cannot return just a reference or else there is a warning abo...
QStringList curveNames() const
List of all curve names.
int lineWidth(const QString &curveName) const
Get method for line width in specified curve.
void setCurveStyle(const QString &curveName, const CurveStyle &curveStyle)
Set method for curve style.
CurveStyles()
Default constructor.
void setPointShape(const QString &curveName, PointShape shape)
Set method for curve point shape in specified curve.
void setLineWidth(const QString &curveName, int width)
Set method for line width in specified curve.
CurveStyles & operator=(const CurveStyles &other)
Assignment constructor.
PointShape pointShape(const QString &curveName) const
Get method for curve point shape.
void setLineConnectAs(const QString &curveName, CurveConnectAs curveConnectAs)
Set method for connect as method for lines in specified curve.
Container for one set of digitized Points.
CurveStyle curveStyle() const
Return the curve style.
Details for a specific Line.
Details for a specific Point.
#define LOG4CPP_INFO_S(logger)