7 #ifndef CALLBACK_AXIS_POINTS_ABSTRACT 8 #define CALLBACK_AXIS_POINTS_ABSTRACT 10 #include "CallbackSearchReturn.h" 11 #include "DocumentAxesPointsRequired.h" 12 #include "DocumentModelCoords.h" 17 typedef QList<QPointF> CoordPairVector;
18 typedef QList<double> CoordSingleVector;
47 const QString pointIdentifierOverride,
48 const QPointF &posGraphOverride,
49 const QPointF &posScreenOverride,
53 CallbackSearchReturn
callback (
const QString &curveName,
65 double xGraphRange ()
const {
return m_xGraphHigh - m_xGraphLow; }
68 double yGraphRange ()
const {
return m_yGraphHigh - m_yGraphLow; }
80 bool isError ()
const {
return m_isError; }
88 bool anyPointsRepeatPair (
const CoordPairVector &vector,
89 double epsilon)
const;
92 bool anyPointsRepeatSingle (
const CoordSingleVector &vector,
93 double epsilon)
const;
94 CallbackSearchReturn callbackRequire2AxisPoints (
const QPointF &posScreen,
95 const QPointF &posGraph);
96 CallbackSearchReturn callbackRequire3AxisPoints (
const QPointF &posScreen,
97 const QPointF &posGraph);
98 CallbackSearchReturn callbackRequire4AxisPoints (
bool isXOnly,
99 const QPointF &posScreen,
100 const QPointF &posGraph);
101 void computeTransforms3();
102 void computeTransforms4();
103 void loadTransforms2();
104 void loadTransforms3();
105 void loadTransforms4();
106 bool threePointsAreCollinear (
const QTransform &transform);
112 QString m_pointIdentifierOverride;
113 QPointF m_posScreenOverride;
114 QPointF m_posGraphOverride;
117 CoordPairVector m_screenInputs;
118 CoordPairVector m_graphOutputs;
121 CoordPairVector m_screenInputsX;
122 CoordPairVector m_screenInputsY;
123 CoordSingleVector m_graphOutputsX;
124 CoordSingleVector m_graphOutputsY;
127 QTransform m_screenInputsTransform;
128 QTransform m_graphOutputsTransform;
132 QString m_errorMessage;
141 DocumentAxesPointsRequired m_documentAxesPointsRequired;
144 #endif // CALLBACK_AXIS_POINTS_ABSTRACT QTransform matrixScreen() const
Returns screen coordinates matrix after transformIsDefined has already indicated success.
Unit tests of graph coordinate sanity checking.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
double yGraphRange() const
Return the range of the y graph coordinate from low to high, after the transform is defined.
unsigned int numberAxisPoints() const
Number of axis points which is less than 3 if the axes curve is incomplete.
QString errorMessage() const
This value is checked after iterating to see what was wrong if the axis data was incorrect.
Model for DlgSettingsCoords and CmdSettingsCoords.
CallbackAxisPointsAbstract(const DocumentModelCoords &modelCoords, DocumentAxesPointsRequired documentAxesPointsRequired)
Constructor for when all of the existing axis points are to be processed as is.
bool isError() const
This value is checked after iterating to see if the axis data is correct.
double xGraphRange() const
Return the range of the x graph coordinate from low to high, after the transform is defined.
QTransform matrixGraph() const
Returns graph coordinates matrix after transformIsDefined has already indicated success.
Callback for collecting axis points and then performing common calculations on those axis points.
DocumentAxesPointsRequired documentAxesPointsRequired() const
Number of axes points required for the transformation.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.