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