Engauge Digitizer  2
Public Member Functions | Protected Member Functions | Friends | List of all members
CallbackAxisPointsAbstract Class Reference

Callback for collecting axis points and then performing common calculations on those axis points. More...

#include <CallbackAxisPointsAbstract.h>

Inheritance diagram for CallbackAxisPointsAbstract:
CallbackCheckAddPointAxis CallbackCheckEditPointAxis CallbackUpdateTransform

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. More...
 
QTransform matrixScreen () const
 Returns screen coordinates matrix after transformIsDefined has already indicated success. More...
 
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. More...
 
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.
 

Detailed Description

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:

  1. Use all existing axis points, and then the subclass can effectively append one more point to check if that additional point would violate any constraints (prior to adding the point)
  2. Use all existing axis points, but override the details of one existing axis point to see if those details violate any constraint (prior to editing the point)
  3. Use all existing axis points as is. This is for computing the transformation after axis points are added/edited

Definition at line 35 of file CallbackAxisPointsAbstract.h.

Member Function Documentation

◆ isError()

bool CallbackAxisPointsAbstract::isError ( ) const
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.

◆ matrixGraph()

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 459 of file CallbackAxisPointsAbstract.cpp.

◆ matrixScreen()

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 464 of file CallbackAxisPointsAbstract.cpp.


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