7 #include "CallbackDocumentHash.h"
8 #include "EngaugeAssert.h"
11 #include <QCryptographicHash>
12 #include "QtToString.h"
13 #include "Transformation.h"
16 m_documentAxesPointsRequired (documentAxesPointsRequired),
17 m_documentHash (QCryptographicHash::Md5)
31 details += curveName.toLatin1();
33 details +=
" " + QPointFToString (point.
posScreen());
36 details +=
" " + QString::number (point.
ordinal ());
41 switch (m_documentAxesPointsRequired) {
42 case DOCUMENT_AXES_POINTS_REQUIRED_2:
44 details +=
" " + QString::number (point.
posGraph().x());
47 case DOCUMENT_AXES_POINTS_REQUIRED_3:
49 details +=
" " + QPointFToString (point.
posGraph());
52 case DOCUMENT_AXES_POINTS_REQUIRED_4:
56 details +=
" " + QString::number (point.
posGraph().x());
60 details +=
" " + QString::number (point.
posGraph().y());
66 ENGAUGE_ASSERT (
false);
70 LOG4CPP_DEBUG_S ((*mainCat)) <<
"CallbackDocumentHash::callback details=" << details.toLatin1().data();
73 m_documentHash.addData (details.toLatin1());
75 return CALLBACK_SEARCH_RETURN_CONTINUE;
80 return m_documentHash.result ();
QPointF posGraph(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Accessor for graph position. Skip check if copying one instance to another.
bool isAxisPoint() const
True if point is an axis point. This is used only for sanity checks.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
QPointF posScreen() const
Accessor for screen position.
QString identifier() const
Unique identifier for a specific Point.
bool isXOnly() const
In DOCUMENT_AXES_POINTS_REQUIRED_4 modes, this is true/false if y/x coordinate is undefined...
DocumentHash hash() const
Computed hash value.
CallbackDocumentHash(DocumentAxesPointsRequired documentAxesPointsRequired)
Single constructor.
bool hasOrdinal() const
True if ordinal is defined.
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.