Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Callback
CallbackGatherXThetasInCurves.cpp
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
#include "
CallbackGatherXThetasInCurves.h
"
8
#include "
DocumentModelExportFormat.h
"
9
#include "
EngaugeAssert.h
"
10
#include "
ExportPointsSelectionFunctions.h
"
11
#include "
Logger.h
"
12
#include "
Point.h
"
13
14
CallbackGatherXThetasInCurves::CallbackGatherXThetasInCurves
(
const
DocumentModelExportFormat
&modelExport,
15
const
QStringList &
curvesIncluded
,
16
const
Transformation
&
transformation
) :
17
CallbackGatherXThetasAbstractBase
((modelExport.pointsSelectionFunctions() ==
18
EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_FIRST_CURVE
),
19
modelExport.extrapolateOutsideEndpoints (),
20
curvesIncluded
,
21
transformation
)
22
{
23
}
24
25
CallbackSearchReturn
CallbackGatherXThetasInCurves::callback
(
const
QString &curveName,
26
const
Point
&point)
27
{
28
qCDebug(ENGAUGE_LOG) <<
"CallbackGatherXThetasInCurves::callback"
29
<<
" curveName="
<< curveName.toLatin1().data()
30
<<
" point="
<< point.
identifier
().toLatin1().data();
31
32
updateMinMax
(curveName,
33
point);
34
35
if
(
curvesIncludedHash
().contains (curveName)) {
36
37
QPointF posGraph;
38
transformation
().
transformScreenToRawGraph
(point.
posScreen
(),
39
posGraph);
40
addGraphX
(posGraph.x ());
41
}
42
43
return
CALLBACK_SEARCH_RETURN_CONTINUE
;
44
}
CallbackGatherXThetasInCurves.h
CallbackSearchReturn
CallbackSearchReturn
Return values for search callback methods.
Definition
CallbackSearchReturn.h:18
CALLBACK_SEARCH_RETURN_CONTINUE
@ CALLBACK_SEARCH_RETURN_CONTINUE
Continue normal execution of the search.
Definition
CallbackSearchReturn.h:19
DocumentModelExportFormat.h
EngaugeAssert.h
ExportPointsSelectionFunctions.h
EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_FIRST_CURVE
@ EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_FIRST_CURVE
Definition
ExportPointsSelectionFunctions.h:14
Logger.h
Point.h
CallbackGatherXThetasAbstractBase::transformation
const Transformation & transformation() const
Get method for transformation.
Definition
CallbackGatherXThetasAbstractBase.cpp:70
CallbackGatherXThetasAbstractBase::updateMinMax
void updateMinMax(const QString &curveName, const Point &point)
Update the tracked min and max values for each curve.
Definition
CallbackGatherXThetasAbstractBase.cpp:75
CallbackGatherXThetasAbstractBase::curvesIncludedHash
CurvesIncludedHash curvesIncludedHash() const
Get method for included names as hash.
Definition
CallbackGatherXThetasAbstractBase.cpp:65
CallbackGatherXThetasAbstractBase::addGraphX
void addGraphX(double xGraph)
Save one graph x value.
Definition
CallbackGatherXThetasAbstractBase.cpp:45
CallbackGatherXThetasAbstractBase::curvesIncluded
QStringList curvesIncluded() const
Get method for included names.
Definition
CallbackGatherXThetasAbstractBase.cpp:60
CallbackGatherXThetasAbstractBase::CallbackGatherXThetasAbstractBase
CallbackGatherXThetasAbstractBase(bool firstCurveOnly, bool extrapolateOutsideEndpoints, const QStringList &curvesIncluded, const Transformation &transformation)
Single constructor.
Definition
CallbackGatherXThetasAbstractBase.cpp:17
CallbackGatherXThetasInCurves::CallbackGatherXThetasInCurves
CallbackGatherXThetasInCurves(const DocumentModelExportFormat &modelExport, const QStringList &curvesIncluded, const Transformation &transformation)
Single constructor.
Definition
CallbackGatherXThetasInCurves.cpp:14
CallbackGatherXThetasInCurves::callback
virtual CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Definition
CallbackGatherXThetasInCurves.cpp:25
DocumentModelExportFormat
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
Definition
DocumentModelExportFormat.h:24
Point
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition
Point.h:26
Point::posScreen
QPointF posScreen() const
Accessor for screen position.
Definition
Point.cpp:404
Point::identifier
QString identifier() const
Unique identifier for a specific Point.
Definition
Point.cpp:268
Transformation
Affine transformation between screen and graph coordinates, based on digitized axis points.
Definition
Transformation.h:32
Transformation::transformScreenToRawGraph
void transformScreenToRawGraph(const QPointF &coordScreen, QPointF &coordGraph) const
Transform from cartesian pixel screen coordinates to cartesian/polar graph coordinates.
Definition
Transformation.cpp:465
Generated on
for Engauge Digitizer by
1.17.0