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 #ifndef CALLBACK_GATHER_X_THETA_VALUES_FUNCTIONS_H 00008 #define CALLBACK_GATHER_X_THETA_VALUES_FUNCTIONS_H 00009 00010 #include "CallbackSearchReturn.h" 00011 #include "ExportValuesXOrY.h" 00012 #include <QHash> 00013 #include <QMap> 00014 #include "Transformation.h" 00015 #include "ValuesVectorXOrY.h" 00016 00017 class DocumentModelExportFormat; 00018 class Point; 00019 00020 // Save values into container that preserves order by key (QMap). These are common to all included curves 00021 // QMap is for fast random access 00022 typedef QMap<double, bool> ValuesVectorXOrY; 00023 00024 typedef QHash<QString, bool> CurveNamesIncluded; 00025 00027 class CallbackGatherXThetaValuesFunctions 00028 { 00029 public: 00031 CallbackGatherXThetaValuesFunctions(const DocumentModelExportFormat &modelExport, 00032 const QStringList &curveNamesIncluded, 00033 const Transformation &transformation); 00034 00036 CallbackSearchReturn callback (const QString &curveName, 00037 const Point &point); 00038 00040 ValuesVectorXOrY xThetaValuesRaw () const; 00041 00042 private: 00043 CallbackGatherXThetaValuesFunctions(); 00044 00045 const Transformation m_transformation; 00046 CurveNamesIncluded m_curveNamesIncluded; 00047 ValuesVectorXOrY m_xThetaValues; 00048 }; 00049 00050 #endif // CALLBACK_GATHER_X_THETA_VALUES_FUNCTIONS_H