Engauge Digitizer 2
|
Callback for collecting axis points and then performing common calculations on those axis points. More...
#include <CallbackAxisPointsAbstract.h>
Public Member Functions | |
CallbackAxisPointsAbstract (const DocumentModelCoords &modelCoords, DocumentAxesPointsRequired documentAxesPointsRequired) | |
Constructor for when all of the existing axis points are to be processed as is. | |
CallbackAxisPointsAbstract (const DocumentModelCoords &modelCoords, const QString pointIdentifierOverride, const QPointF &posGraphOverride, const QPointF &posScreenOverride, DocumentAxesPointsRequired documentAxesPointsRequired) | |
Constructor for when the data for one of the existing axis points is to be locally overwritten. | |
CallbackSearchReturn | callback (const QString &curveName, const Point &point) |
Callback method. | |
QTransform | matrixGraph () const |
Returns graph coordinates matrix after transformIsDefined has already indicated success. | |
QTransform | matrixScreen () const |
Returns screen coordinates matrix after transformIsDefined has already indicated success. | |
double | xGraphRange () const |
Return the range of the x graph coordinate from low to high, after the transform is defined. | |
double | yGraphRange () const |
Return the range of the y graph coordinate from low to high, after the transform is defined. |
Protected Member Functions | |
DocumentAxesPointsRequired | documentAxesPointsRequired () const |
Number of axes points required for the transformation. | |
QString | errorMessage () const |
This value is checked after iterating to see what was wrong if the axis data was incorrect. | |
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. |
Friends | |
class | TestGraphCoords |
For unit testing. |
Callback for collecting axis points and then performing common calculations on those axis points.
This class collects 3x3 matrix G which contains columns of graph coordinates, and 3x3 matrix S which contains columns of screen coordinates. Although it goes almost as far as solving (G) = (T) (S) for the transformation T, that is left for the Transformation class. This class does, however, do the sanity checking (like for collinear points) so the gui can provide immediate feedback to the user well before the Transformation class gets involved
This class is versatile. The cases are:
Definition at line 35 of file CallbackAxisPointsAbstract.h.
CallbackAxisPointsAbstract::CallbackAxisPointsAbstract | ( | const DocumentModelCoords & | modelCoords, |
DocumentAxesPointsRequired | documentAxesPointsRequired ) |
Constructor for when all of the existing axis points are to be processed as is.
Definition at line 24 of file CallbackAxisPointsAbstract.cpp.
CallbackAxisPointsAbstract::CallbackAxisPointsAbstract | ( | const DocumentModelCoords & | modelCoords, |
const QString | pointIdentifierOverride, | ||
const QPointF & | posGraphOverride, | ||
const QPointF & | posScreenOverride, | ||
DocumentAxesPointsRequired | documentAxesPointsRequired ) |
Constructor for when the data for one of the existing axis points is to be locally overwritten.
Definition at line 32 of file CallbackAxisPointsAbstract.cpp.
CallbackSearchReturn CallbackAxisPointsAbstract::callback | ( | const QString & | curveName, |
const Point & | point ) |
Callback method.
Definition at line 83 of file CallbackAxisPointsAbstract.cpp.
|
protected |
Number of axes points required for the transformation.
Definition at line 319 of file CallbackAxisPointsAbstract.cpp.
|
inlineprotected |
This value is checked after iterating to see what was wrong if the axis data was incorrect.
Definition at line 76 of file CallbackAxisPointsAbstract.h.
|
inlineprotected |
This value is checked after iterating to see if the axis data is correct.
The error state does NOT include the case when there are not enough axis points
Definition at line 80 of file CallbackAxisPointsAbstract.h.
QTransform CallbackAxisPointsAbstract::matrixGraph | ( | ) | const |
Returns graph coordinates matrix after transformIsDefined has already indicated success.
Since QMatrix is deprecated the results are returned as QTransform
Definition at line 493 of file CallbackAxisPointsAbstract.cpp.
QTransform CallbackAxisPointsAbstract::matrixScreen | ( | ) | const |
Returns screen coordinates matrix after transformIsDefined has already indicated success.
Since QMatrix is deprecated the results are returned as QTransform
Definition at line 498 of file CallbackAxisPointsAbstract.cpp.
|
protected |
Number of axis points which is less than 3 if the axes curve is incomplete.
Definition at line 503 of file CallbackAxisPointsAbstract.cpp.
|
inline |
Return the range of the x graph coordinate from low to high, after the transform is defined.
Definition at line 65 of file CallbackAxisPointsAbstract.h.
|
inline |
Return the range of the y graph coordinate from low to high, after the transform is defined.
Definition at line 68 of file CallbackAxisPointsAbstract.h.
|
friend |
For unit testing.
Definition at line 38 of file CallbackAxisPointsAbstract.h.