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) &&
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();
void setLineColor(const QString &curveName, ColorPalette lineColor)
Set method for line color in specified curve.
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
void setLineConnectAs(const QString &curveName, CurveConnectAs curveConnectAs)
Set method for connect as method for lines in specified curve.
void setLineWidth(const QString &curveName, int width)
Set method for line width in specified curve.
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
CurveStyles()
Default constructor.
void setPointLineWidth(const QString &curveName, int width)
Set method for curve point perimeter line width.
const QString DOCUMENT_SERIALIZE_CURVE_STYLES
QStringList curveNames() const
List of all curve names.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
int lineWidth(const QString &curveName) const
Get method for line width in specified curve.
CurveStyles & operator=(const CurveStyles &other)
Assignment constructor.
Storage of data belonging to one coordinate system.
PointStyle pointStyle() const
Get method for PointStyle.
void loadXml(QXmlStreamReader &reader)
Load from serialized xml.
void setPointShape(PointShape shape)
Set method for curve point shape 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...
virtual QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
#define LOG4CPP_INFO_S(logger)
void setLineConnectAs(CurveConnectAs curveConnectAs)
Set method for connect as method for lines in specified curve.
void saveXml(QXmlStreamWriter &writer) const
Serialize to xml.
PointShape pointShape(const QString &curveName) const
Get method for curve point shape.
void setPointRadius(int radius)
Set method for curve point radius.
bool pointIsCircle(const QString &curveName) const
Get method for curve point is circle in specified curve.
void setPointLineWidth(int width)
Set method for curve point perimeter line width.
void setCurveStyle(const QString &curveName, const CurveStyle &curveStyle)
Set method for curve style.
ColorPalette pointColor(const QString &curveName) const
Get method for curve point color in specified curve.
Details for a specific Point.
QString loadXml(QXmlStreamReader &reader)
Load from serialized xml. Returns the curve name.
QPolygonF pointPolygon(const QString &curveName) const
Get method for curve point polygon in specified curve.
const LineStyle lineStyle(const QString &curveName) const
Get method for copying one line style in one step.
LineStyle lineStyle() const
Get method for LineStyle.
int pointRadius(const QString &curveName) const
Get method for curve point radius.
const QString DOCUMENT_SERIALIZE_CURVE_STYLE
Container for LineStyle and PointStyle for one Curve.
Container for one set of digitized Points.
Details for a specific Line.
void setPointRadius(const QString &curveName, int radius)
Set method for curve point radius.
void setLineColor(ColorPalette lineColor)
Set method for line color in specified curve.
virtual Curve * curveForCurveName(const QString &curveName)
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.
void saveXml(QXmlStreamWriter &writer, const QString &curveName) const
Serialize to xml.
CurveConnectAs lineConnectAs(const QString &curveName) const
Get method for connect as method for lines in specified curve.
log4cpp::Category * mainCat
void setPointColor(ColorPalette curveColor)
Set method curve point color in specified curve.
CurveStyle curveStyle() const
Return the curve style.
ColorPalette lineColor(const QString &curveName) const
Get method for line color in specified curve.
int pointLineWidth(const QString &curveName) const
Get method for curve point line width.
void setPointShape(const QString &curveName, PointShape shape)
Set method for curve point shape in specified curve.
void setLineWidth(int width)
Set method for line width in specified curve.
virtual const Curve & curveAxes() const
Get method for axis curve.
const QString AXIS_CURVE_NAME
void setPointColor(const QString &curveName, ColorPalette curveColor)
Set method curve point color in specified curve.
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...