Engauge Digitizer 2
Loading...
Searching...
No Matches
CallbackGatherXThetasAbstractBase.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2019 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef CALLBACK_GATHER_X_THETAS_ABSTRACT_BASE_H
8#define CALLBACK_GATHER_X_THETAS_ABSTRACT_BASE_H
9
11#include "CurveLimits.h"
12#include "CurvesIncludedHash.h"
13#include "ExportValuesXOrY.h"
14#include "Transformation.h"
15#include "ValuesVectorXOrY.h"
16
17class Point;
18
21{
22public:
24 CallbackGatherXThetasAbstractBase(bool firstCurveOnly,
25 bool extrapolateOutsideEndpoints,
26 const QStringList &curvesIncluded,
29
31 virtual CallbackSearchReturn callback (const QString &curveName,
32 const Point &point) = 0;
33
36
39
42
43protected:
44
46 void addGraphX (double xGraph);
47
49 QStringList curvesIncluded () const;
50
53
55 const Transformation &transformation() const;
56
58 void updateMinMax (const QString &curveName,
59 const Point &point);
60
61private:
63
64 bool m_extrapolateOutsideEndpoints;
65 QStringList m_curvesIncluded;
66 const Transformation m_transformation;
67 CurvesIncludedHash m_curvesIncludedHash;
68 ValuesVectorXOrY m_xThetaValues;
69
70 // Curve limits that may or may not be merged into m_xThetaValues
71 CurveLimits m_curveLimitsMin;
72 CurveLimits m_curveLimitsMax;
73};
74
75#endif // CALLBACK_GATHER_X_THETAS_ABSTRACT_BASE_H
CallbackSearchReturn
Return values for search callback methods.
QHash< QString, double > CurveLimits
Definition CurveLimits.h:14
QHash< QString, bool > CurvesIncludedHash
QMap< double, bool > ValuesVectorXOrY
Base callback for collecting X/Theta independent variables, for functions, in preparation for exporti...
const Transformation & transformation() const
Get method for transformation.
void updateMinMax(const QString &curveName, const Point &point)
Update the tracked min and max values for each curve.
virtual CallbackSearchReturn callback(const QString &curveName, const Point &point)=0
Callback method.
CurvesIncludedHash curvesIncludedHash() const
Get method for included names as hash.
CurveLimits curveLimitsMax() const
Endpoint maxima for each curve, if extrapolation has been disabled.
void addGraphX(double xGraph)
Save one graph x value.
ValuesVectorXOrY xThetaValuesRaw() const
Resulting x/theta values for all included functions.
QStringList curvesIncluded() const
Get method for included names.
CurveLimits curveLimitsMin() const
Endpoint minima for each curve, if extrapolation has been disabled.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition Point.h:26
Affine transformation between screen and graph coordinates, based on digitized axis points.