Engauge Digitizer  2
CallbackRemovePointsInCurvesGraphs.cpp
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 "CallbackRemovePointsInCurvesGraphs.h"
8 #include "CoordSystem.h"
9 
10 extern const QString AXIS_CURVE_NAME;
11 
13  m_coordSystem (coordSystem)
14 {
15 }
16 
17 CallbackSearchReturn CallbackRemovePointsInCurvesGraphs::callback (const QString &curveName,
18  const Point &point)
19 {
20  if (curveName == AXIS_CURVE_NAME) {
21  m_coordSystem.removePointAxis (point.identifier());
22  } else {
23  m_coordSystem.removePointGraph (point.identifier());
24  }
25 
26  return CALLBACK_SEARCH_RETURN_CONTINUE;
27 }
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
CallbackRemovePointsInCurvesGraphs(CoordSystem &coordSystem)
Single constructor.
Storage of data belonging to one coordinate system.
Definition: CoordSystem.h:42
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition: Point.h:23
QString identifier() const
Unique identifier for a specific Point.
Definition: Point.cpp:256
virtual void removePointGraph(const QString &identifier)
Perform the opposite of addPointGraph.
virtual void removePointAxis(const QString &identifier)
Perform the opposite of addPointAxis.