7 #ifndef CALLBACK_AXIS_POINTS_ABSTRACT 8 #define CALLBACK_AXIS_POINTS_ABSTRACT 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,
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; }
87 bool anyPointsRepeatPair (
const CoordPairVector &vector)
const;
88 bool anyPointsRepeatSingle (
const CoordSingleVector &vector)
const;
90 const QPointF &posGraph);
92 const QPointF &posScreen,
93 const QPointF &posGraph);
94 void computeTransforms3();
95 void computeTransforms4();
96 void loadTransforms3();
97 void loadTransforms4();
98 bool threePointsAreCollinear (
const QTransform &transform);
104 QString m_pointIdentifierOverride;
105 QPointF m_posScreenOverride;
106 QPointF m_posGraphOverride;
109 CoordPairVector m_screenInputs;
110 CoordPairVector m_graphOutputs;
113 CoordPairVector m_screenInputsX;
114 CoordPairVector m_screenInputsY;
115 CoordSingleVector m_graphOutputsX;
116 CoordSingleVector m_graphOutputsY;
119 QTransform m_screenInputsTransform;
120 QTransform m_graphOutputsTransform;
124 QString m_errorMessage;
133 DocumentAxesPointsRequired m_documentAxesPointsRequired;
136 #endif // CALLBACK_AXIS_POINTS_ABSTRACT QTransform matrixGraph() const
Returns graph coordinates matrix after transformIsDefined has already indicated success.
DocumentAxesPointsRequired documentAxesPointsRequired() const
Number of axes points required for the transformation.
Unit tests of graph coordinate sanity checking.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
CallbackSearchReturn
Return values for search callback methods.
double xGraphRange() const
Return the range of the x graph coordinate from low to high, after the transform is defined...
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.
unsigned int numberAxisPoints() const
Number of axis points which is less than 3 if the axes curve is incomplete.
double yGraphRange() const
Return the range of the y graph coordinate from low to high, after the transform is defined...
Callback for collecting axis points and then performing common calculations on those axis points...
QString errorMessage() const
This value is checked after iterating to see what was wrong if the axis data was incorrect.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
QTransform matrixScreen() const
Returns screen coordinates matrix after transformIsDefined has already indicated success.