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)
21 CallbackDocumentHash::~CallbackDocumentHash()
35 details += curveName.toLatin1();
37 details +=
" " + QPointFToString (point.
posScreen());
40 details +=
" " + QString::number (point.
ordinal ());
45 switch (m_documentAxesPointsRequired) {
46 case DOCUMENT_AXES_POINTS_REQUIRED_2:
48 details +=
" " + QString::number (point.
posGraph().x());
51 case DOCUMENT_AXES_POINTS_REQUIRED_3:
53 details +=
" " + QPointFToString (point.
posGraph());
56 case DOCUMENT_AXES_POINTS_REQUIRED_4:
60 details +=
" " + QString::number (point.
posGraph().x());
64 details +=
" " + QString::number (point.
posGraph().y());
70 ENGAUGE_ASSERT (
false);
74 LOG4CPP_DEBUG_S ((*mainCat)) <<
"CallbackDocumentHash::callback details=" << details.toLatin1().data();
77 m_documentHash.addData (details.toLatin1());
79 return CALLBACK_SEARCH_RETURN_CONTINUE;
84 return m_documentHash.result ();
bool isXOnly() const
In DOCUMENT_AXES_POINTS_REQUIRED_4 modes, this is true/false if y/x coordinate is undefined...
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.
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.
QString identifier() const
Unique identifier for a specific Point.
bool hasOrdinal() const
True if ordinal is defined.
QPointF posGraph(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Accessor for graph position. Skip check if copying one instance to another.
CallbackDocumentHash(DocumentAxesPointsRequired documentAxesPointsRequired)
Single constructor.
DocumentHash hash() const
Computed hash value.