00001 /****************************************************************************************************** 00002 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released * 00003 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file * 00004 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. * 00005 ******************************************************************************************************/ 00006 00007 #include "CallbackRemovePointsInCurvesGraphs.h" 00008 #include "CoordSystem.h" 00009 00010 extern const QString AXIS_CURVE_NAME; 00011 00012 CallbackRemovePointsInCurvesGraphs::CallbackRemovePointsInCurvesGraphs(CoordSystem &coordSystem) : 00013 m_coordSystem (coordSystem) 00014 { 00015 } 00016 00017 CallbackSearchReturn CallbackRemovePointsInCurvesGraphs::callback (const QString &curveName, 00018 const Point &point) 00019 { 00020 if (curveName == AXIS_CURVE_NAME) { 00021 m_coordSystem.removePointAxis (point.identifier()); 00022 } else { 00023 m_coordSystem.removePointGraph (point.identifier()); 00024 } 00025 00026 return CALLBACK_SEARCH_RETURN_CONTINUE; 00027 }