14 class QXmlStreamReader;
15 class QXmlStreamWriter;
31 Point (
const QString &curveName,
36 Point (
const QString &curveName,
37 const QPointF &posScreen,
42 Point (
const QString &curveName,
44 const QPointF &posScreen,
45 const QPointF &posGraph,
50 Point (
const QString &curveName,
51 const QPointF &posScreen,
52 const QPointF &posGraph,
57 Point (
const QString &curveName,
58 const QString &identifier,
59 const QPointF &posScreen,
63 Point (
const QString &curveName,
64 const QPointF &posScreen,
68 Point (QXmlStreamReader &reader);
98 double ordinal (ApplyHasCheck applyHasCheck = KEEP_HAS_CHECK)
const;
101 QPointF
posGraph (ApplyHasCheck applyHasCheck = KEEP_HAS_CHECK)
const;
108 QTextStream &str)
const;
111 void saveXml(QXmlStreamWriter &writer)
const;
137 void loadXml(QXmlStreamReader &reader);
144 static QString uniqueIdentifierGenerator(
const QString &curveName);
147 QString m_identifier;
155 static unsigned int m_identifierIndex;
void saveXml(QXmlStreamWriter &writer) const
Serialize to stream.
bool isXOnly() const
In DOCUMENT_AXES_POINTS_REQUIRED_4 modes, this is true/false if y/x coordinate is undefined...
static QString curveNameFromPointIdentifier(const QString &pointIdentifier)
Parse the curve name from the specified point identifier. This does the opposite of uniqueIdentifierG...
static void setIdentifierIndex(unsigned int identifierIndex)
Reset the current index while performing a Redo.
static unsigned int identifierIndex()
Return the current index for storage in case we need to reset it later while performing a Redo...
bool isAxisPoint() const
True if point is an axis point. This is used only for sanity checks.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
QPointF posScreen() const
Accessor for screen position.
Point & operator=(const Point &point)
Assignment constructor.
void setPosGraph(const QPointF &posGraph)
Set method for position in graph coordinates.
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.
static QString temporaryPointIdentifier()
Point identifier for temporary point that is used by DigitzeStateAxis.
QString identifier() const
Unique identifier for a specific Point.
bool hasOrdinal() const
True if ordinal is defined.
static double UNDEFINED_ORDINAL()
Get method for undefined ordinal constant.
QPointF posGraph(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Accessor for graph position. Skip check if copying one instance to another.
bool hasPosGraph() const
True if graph position is defined.
void setPosScreen(const QPointF &posScreen)
Set method for position in screen coordinates.
Point()
Default constructor so this class can be used inside a container.
void setOrdinal(double ordinal)
Set the ordinal used for ordering Points.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void setCurveName(const QString &curveName)
Update the point identifer to match the specified curve name.