Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
CallbackGatherXThetasAbstractBase Class Referenceabstract

Base callback for collecting X/Theta independent variables, for functions, in preparation for exporting. More...

#include <CallbackGatherXThetasAbstractBase.h>

Inheritance diagram for CallbackGatherXThetasAbstractBase:
Inheritance graph
Collaboration diagram for CallbackGatherXThetasAbstractBase:
Collaboration graph

Public Member Functions

 CallbackGatherXThetasAbstractBase (bool firstCurveOnly, bool extrapolateOutsideEndpoints, const QStringList &curvesIncluded, const Transformation &transformation)
 Single constructor.
 
virtual ~CallbackGatherXThetasAbstractBase ()
 
virtual CallbackSearchReturn callback (const QString &curveName, const Point &point)=0
 Callback method.
 
CurveLimits curveLimitsMax () const
 Endpoint maxima for each curve, if extrapolation has been disabled.
 
CurveLimits curveLimitsMin () const
 Endpoint minima for each curve, if extrapolation has been disabled.
 
ValuesVectorXOrY xThetaValuesRaw () const
 Resulting x/theta values for all included functions.
 

Protected Member Functions

void addGraphX (double xGraph)
 Save one graph x value.
 
QStringList curvesIncluded () const
 Get method for included names.
 
CurvesIncludedHash curvesIncludedHash () const
 Get method for included names as hash.
 
const Transformationtransformation () const
 Get method for transformation.
 
void updateMinMax (const QString &curveName, const Point &point)
 Update the tracked min and max values for each curve.
 

Detailed Description

Base callback for collecting X/Theta independent variables, for functions, in preparation for exporting.

Definition at line 20 of file CallbackGatherXThetasAbstractBase.h.

Constructor & Destructor Documentation

◆ CallbackGatherXThetasAbstractBase()

CallbackGatherXThetasAbstractBase::CallbackGatherXThetasAbstractBase ( bool firstCurveOnly,
bool extrapolateOutsideEndpoints,
const QStringList & curvesIncluded,
const Transformation & transformation )

Single constructor.

Definition at line 17 of file CallbackGatherXThetasAbstractBase.cpp.

20 :
21 m_extrapolateOutsideEndpoints (extrapolateOutsideEndpoints),
22 m_curvesIncluded (curvesIncluded),
23 m_transformation (transformation)
24{
25 // Include just the first curve, or all curves depending on DocumentModelExportFormat
26 QStringList::const_iterator itr;
27 for (itr = curvesIncluded.begin(); itr != curvesIncluded.end(); itr++) {
28
30 m_curvesIncludedHash [curveIncluded] = true;
31
32 if (firstCurveOnly) {
33
34 // We only want points belonging to the first included curve so exit this loop
35 break;
36
37 }
38 }
39}
const int INNER_RADIUS_MIN
const Transformation & transformation() const
Get method for transformation.
QStringList curvesIncluded() const
Get method for included names.

◆ ~CallbackGatherXThetasAbstractBase()

CallbackGatherXThetasAbstractBase::~CallbackGatherXThetasAbstractBase ( )
virtual

Definition at line 41 of file CallbackGatherXThetasAbstractBase.cpp.

42{
43}

Member Function Documentation

◆ addGraphX()

void CallbackGatherXThetasAbstractBase::addGraphX ( double xGraph)
protected

Save one graph x value.

Definition at line 45 of file CallbackGatherXThetasAbstractBase.cpp.

46{
47 m_xThetaValues [xGraph] = true;
48}

◆ callback()

virtual CallbackSearchReturn CallbackGatherXThetasAbstractBase::callback ( const QString & curveName,
const Point & point )
pure virtual

Callback method.

Implemented in CallbackGatherXThetasInCurves, and CallbackGatherXThetasInGridLines.

◆ curveLimitsMax()

CurveLimits CallbackGatherXThetasAbstractBase::curveLimitsMax ( ) const

Endpoint maxima for each curve, if extrapolation has been disabled.

Definition at line 50 of file CallbackGatherXThetasAbstractBase.cpp.

51{
52 return m_curveLimitsMax;
53}

◆ curveLimitsMin()

CurveLimits CallbackGatherXThetasAbstractBase::curveLimitsMin ( ) const

Endpoint minima for each curve, if extrapolation has been disabled.

Definition at line 55 of file CallbackGatherXThetasAbstractBase.cpp.

56{
57 return m_curveLimitsMin;
58}

◆ curvesIncluded()

QStringList CallbackGatherXThetasAbstractBase::curvesIncluded ( ) const
protected

Get method for included names.

Definition at line 60 of file CallbackGatherXThetasAbstractBase.cpp.

61{
62 return m_curvesIncluded;
63}

◆ curvesIncludedHash()

CurvesIncludedHash CallbackGatherXThetasAbstractBase::curvesIncludedHash ( ) const
protected

Get method for included names as hash.

Definition at line 65 of file CallbackGatherXThetasAbstractBase.cpp.

66{
67 return m_curvesIncludedHash;
68}

◆ transformation()

const Transformation & CallbackGatherXThetasAbstractBase::transformation ( ) const
protected

Get method for transformation.

Definition at line 70 of file CallbackGatherXThetasAbstractBase.cpp.

71{
72 return m_transformation;
73}

◆ updateMinMax()

void CallbackGatherXThetasAbstractBase::updateMinMax ( const QString & curveName,
const Point & point )
protected

Update the tracked min and max values for each curve.

Definition at line 75 of file CallbackGatherXThetasAbstractBase.cpp.

77{
78 // Skip unless the endpoints are to be collected. We update the min/max values
79 // even if the curve is not curvesIncludedHash since endpoints are sometimes
80 // required for curves other than the first when collecting just xTheta values from
81 // the first curve
82 if (!m_extrapolateOutsideEndpoints) {
83
84 QPointF posGraph;
86 posGraph);
87
88 if (!m_curveLimitsMin.contains (curveName) ||
89 posGraph.x() < m_curveLimitsMin [curveName]) {
90
91 m_curveLimitsMin [curveName] = posGraph.x ();
92 }
93
94 if (!m_curveLimitsMax.contains (curveName) ||
95 posGraph.x() > m_curveLimitsMax [curveName]) {
96
97 m_curveLimitsMax [curveName] = posGraph.x ();
98 }
99 }
100}
QPointF posScreen() const
Accessor for screen position.
Definition Point.cpp:404
void transformScreenToRawGraph(const QPointF &coordScreen, QPointF &coordGraph) const
Transform from cartesian pixel screen coordinates to cartesian/polar graph coordinates.

◆ xThetaValuesRaw()

ValuesVectorXOrY CallbackGatherXThetasAbstractBase::xThetaValuesRaw ( ) const

Resulting x/theta values for all included functions.

Definition at line 102 of file CallbackGatherXThetasAbstractBase.cpp.

103{
104 LOG4CPP_INFO_S ((*mainCat)) << "CallbackGatherXThetasAbstractBase::xThetaValuesRaw";
105
106 return m_xThetaValues;
107}
log4cpp::Category * mainCat
Definition Logger.cpp:14
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

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