7 #include "CallbackScaleBar.h" 9 #include "DocumentModelExportFormat.h" 10 #include "ExportAlignLinear.h" 11 #include "ExportAlignLog.h" 12 #include "ExportLayoutFunctions.h" 13 #include "ExportPointsSelectionFunctions.h" 24 return m_axisCurvePointIdentifiers;
30 LOG4CPP_DEBUG_S ((*mainCat)) <<
"CallbackScaleBar::callback" 31 <<
" curveName=" << curveName.toLatin1().data()
32 <<
" point=" << point.
identifier().toLatin1().data();
34 if (curveName == AXIS_CURVE_NAME) {
36 bool isNonzeroX = (point.
posGraph ().x () != 0);
37 bool isNonzeroY = (point.
posGraph ().y () != 0);
39 if (isNonzeroX || isNonzeroY) {
41 m_scaleBarPointIdentifier = point.
identifier ();
42 m_scaleBarLength = (isNonzeroX ?
47 m_axisCurvePointIdentifiers << point.
identifier ();
50 return CALLBACK_SEARCH_RETURN_CONTINUE;
55 return m_scaleBarLength;
60 LOG4CPP_INFO_S ((*mainCat)) <<
"CallbackScaleBar::scaleBarPointIdentifier";
62 return m_scaleBarPointIdentifier;
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
QString scaleBarPointIdentifier() const
Identified axis point.
QStringList axisCurvePointIdentifiers() const
Points in axis curve.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
double scaleBarLength() const
Length of scale bar.
QString identifier() const
Unique identifier for a specific Point.
QPointF posGraph(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Accessor for graph position. Skip check if copying one instance to another.
CallbackScaleBar()
Single constructor.