Engauge Digitizer 2
Loading...
Searching...
No Matches
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
8#include "CoordSystem.h"
9
10extern const QString AXIS_CURVE_NAME;
11
13 m_coordSystem (coordSystem)
14{
15}
16
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
36}
const QString AXIS_CURVE_NAME
CallbackSearchReturn
Return values for search callback methods.
@ CALLBACK_SEARCH_RETURN_CONTINUE
Continue normal execution of the search.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
CallbackAddPointsInCurvesGraphs(CoordSystem &coordSystem)
Single constructor.
Storage of data belonging to one coordinate system.
Definition CoordSystem.h:44
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition Point.h:26
QPointF posGraph(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Accessor for graph position. Skip check if copying one instance to another.
Definition Point.cpp:395
QPointF posScreen() const
Accessor for screen position.
Definition Point.cpp:404
QString identifier() const
Unique identifier for a specific Point.
Definition Point.cpp:268
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.
Definition Point.cpp:386
bool isXOnly() const
In DOCUMENT_AXES_POINTS_REQUIRED_4 modes, this is true/false if y/x coordinate is undefined.
Definition Point.cpp:286