Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Callback
CallbackAddPointsInCurvesGraphs.cpp
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2014 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 "
CallbackAddPointsInCurvesGraphs.h
"
8
#include "
CoordSystem.h
"
9
10
extern
const
QString
AXIS_CURVE_NAME
;
11
12
CallbackAddPointsInCurvesGraphs::CallbackAddPointsInCurvesGraphs
(
CoordSystem
&coordSystem) :
13
m_coordSystem (coordSystem)
14
{
15
}
16
17
CallbackSearchReturn
CallbackAddPointsInCurvesGraphs::callback
(
const
QString &curveName,
18
const
Point
&point)
19
{
20
const
QString identifier = point.
identifier
();
21
22
if
(curveName ==
AXIS_CURVE_NAME
) {
23
m_coordSystem.addPointAxisWithSpecifiedIdentifier (point.
posScreen
(),
24
point.
posGraph
(),
25
identifier,
26
point.
ordinal
(),
27
point.
isXOnly
());
28
}
else
{
29
m_coordSystem.addPointGraphWithSpecifiedIdentifier (curveName,
30
point.
posScreen
(),
31
identifier,
32
point.
ordinal
());
33
}
34
35
return
CALLBACK_SEARCH_RETURN_CONTINUE
;
36
}
AXIS_CURVE_NAME
const QString AXIS_CURVE_NAME
CallbackAddPointsInCurvesGraphs.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
CoordSystem.h
CallbackAddPointsInCurvesGraphs::callback
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Definition
CallbackAddPointsInCurvesGraphs.cpp:17
CallbackAddPointsInCurvesGraphs::CallbackAddPointsInCurvesGraphs
CallbackAddPointsInCurvesGraphs(CoordSystem &coordSystem)
Single constructor.
Definition
CallbackAddPointsInCurvesGraphs.cpp:12
CoordSystem
Storage of data belonging to one coordinate system.
Definition
CoordSystem.h:44
Point
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition
Point.h:26
Point::posGraph
QPointF posGraph(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Accessor for graph position. Skip check if copying one instance to another.
Definition
Point.cpp:395
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
Point::ordinal
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.
Definition
Point.cpp:386
Point::isXOnly
bool isXOnly() const
In DOCUMENT_AXES_POINTS_REQUIRED_4 modes, this is true/false if y/x coordinate is undefined.
Definition
Point.cpp:286
Generated on
for Engauge Digitizer by
1.17.0