11 #include "ColorFilterSettings.h"
12 #include "CurveStyle.h"
20 extern const QString AXIS_CURVE_NAME;
21 extern const QString DEFAULT_GRAPH_CURVE_NAME;
22 extern const QString DUMMY_CURVE_NAME;
27 class QXmlStreamReader;
28 class QXmlStreamWriter;
41 Curve (QDataStream &str);
44 Curve (QXmlStreamReader &reader);
66 const QString &identifier);
76 bool isXOnly (
const QString &pointIdentifier)
const;
79 void iterateThroughCurvePoints (
const Functor2wRet<const QString &, const Point &, CallbackSearchReturn> &ftorWithCallback)
const;
85 void movePoint (
const QString &pointIdentifier,
86 const QPointF &deltaScreen);
92 const Points
points ()
const;
102 QTextStream &str)
const;
108 void saveXml(QXmlStreamWriter &writer)
const;
126 void loadCurvePoints(QXmlStreamReader &reader);
127 void loadXml(QXmlStreamReader &reader);
128 Point *pointForPointIdentifier (
const QString pointIdentifier);
129 void updatePointOrdinalsFunctions (
const Transformation &transformation);
130 void updatePointOrdinalsRelations ();
void removePoint(const QString &identifier)
Perform the opposite of addPointAtEnd.
QPointF positionScreen(const QString &pointIdentifier) const
Return the position, in screen coordinates, of the specified Point.
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
void exportToClipboard(const QHash< QString, bool > &selectedHash, const Transformation &transformation, QTextStream &strCsv, QTextStream &strHtml, CurvesGraphs &curvesGraphs) const
Export points in this Curve found in the specified point list.
const Points points() const
Return a shallow copy of the Points.
void setCurveStyle(const CurveStyle &curveStyle)
Set curve style.
void addPoint(Point point)
Add Point to this Curve.
void setColorFilterSettings(const ColorFilterSettings &colorFilterSettings)
Set color filter.
int numPoints() const
Number of points.
void updatePointOrdinals(const Transformation &transformation)
See CurveGraphs::updatePointOrdinals.
bool isXOnly(const QString &pointIdentifier) const
Determine if specified point has just x coordinate. Otherwise has just y coordinate, or both x and y coordinates.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
QPointF positionGraph(const QString &pointIdentifier) const
Return the position, in graph coordinates, of the specified Point.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void editPoint(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of an axis point. This method does not apply to a graph point...
Curve & operator=(const Curve &curve)
Assignment constructor.
void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
Translate the position of a point by the specified distance vector.
Container for all graph curves. The axes point curve is external to this class.
void iterateThroughCurvePoints(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to Points on Curve.
void setCurveName(const QString &curveName)
Change the curve name.
Container for LineStyle and PointStyle for one Curve.
Container for one set of digitized Points.
CurveStyle curveStyle() const
Return the curve style.
void iterateThroughCurveSegments(const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to successive Points, as line segments, on Curve. This could be a bit slow...
void saveXml(QXmlStreamWriter &writer) const
Serialize curve.
ColorFilterSettings colorFilterSettings() const
Return the color filter.
QString curveName() const
Name of this Curve.