Engauge Digitizer 2
Loading...
Searching...
No Matches
CallbackCheckAddPointAxis Class Reference

Callback for sanity checking the screen and graph coordinates of an axis point, before it is added to the axes curve. More...

#include <CallbackCheckAddPointAxis.h>

Inheritance diagram for CallbackCheckAddPointAxis:
Inheritance graph
Collaboration diagram for CallbackCheckAddPointAxis:
Collaboration graph

Public Member Functions

 CallbackCheckAddPointAxis (const DocumentModelCoords &modelCoords, const QPointF &posScreen, const QPointF &posGraph, DocumentAxesPointsRequired documentAxesPointsRequired, bool isXOnly)
 Single constructor.
bool isError () const
 True if an error occurred during iteration.
QString errorMessage () const
 Error message that explains the problem indicated by isError.
Public Member Functions inherited from CallbackAxisPointsAbstract
 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.

Additional Inherited Members

Protected Member Functions inherited from CallbackAxisPointsAbstract
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.

Detailed Description

Callback for sanity checking the screen and graph coordinates of an axis point, before it is added to the axes curve.

Definition at line 18 of file CallbackCheckAddPointAxis.h.

Constructor & Destructor Documentation

◆ CallbackCheckAddPointAxis()

CallbackCheckAddPointAxis::CallbackCheckAddPointAxis ( const DocumentModelCoords & modelCoords,
const QPointF & posScreen,
const QPointF & posGraph,
DocumentAxesPointsRequired documentAxesPointsRequired,
bool isXOnly )

Single constructor.

Definition at line 13 of file CallbackCheckAddPointAxis.cpp.

17 :
18 CallbackAxisPointsAbstract (modelCoords,
20{
21 // Insert an extra Point as if it already was in the axes curve. This is done before iterating rather
22 // than after since there is no safe place to do this afterwards (isError and errorMessage may be called more than once)
23 Point point (AXIS_CURVE_NAME,
24 posScreen,
25 posGraph,
26 isXOnly);
27
29 point);
30}
const QString AXIS_CURVE_NAME
DocumentAxesPointsRequired documentAxesPointsRequired() const
Number of axes points required for the transformation.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
CallbackAxisPointsAbstract(const DocumentModelCoords &modelCoords, DocumentAxesPointsRequired documentAxesPointsRequired)
Constructor for when all of the existing axis points are to be processed as is.

Member Function Documentation

◆ errorMessage()

QString CallbackCheckAddPointAxis::errorMessage ( ) const

Error message that explains the problem indicated by isError.

Definition at line 37 of file CallbackCheckAddPointAxis.cpp.

38{
40}
QString errorMessage() const
This value is checked after iterating to see what was wrong if the axis data was incorrect.

◆ isError()

bool CallbackCheckAddPointAxis::isError ( ) const

True if an error occurred during iteration.

Definition at line 32 of file CallbackCheckAddPointAxis.cpp.

33{
35}
bool isError() const
This value is checked after iterating to see if the axis data is correct.

The documentation for this class was generated from the following files: