Engauge Digitizer  2
FormatCoordsUnits.h
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 #ifndef FORMAT_COORDS_UNITS_H
8 #define FORMAT_COORDS_UNITS_H
9 
12 class MainWindowModel;
13 class QString;
14 class Transformation;
15 
17 class FormatCoordsUnits {
18  public:
21 
23  void formattedToUnformatted (const QString &xThetaFormatted,
24  const QString &yRadiusFormatted,
25  const DocumentModelCoords &modelCoords,
26  const MainWindowModel &mainWindowModel,
27  double &xThetaUnformatted,
28  double &yRadiusUnformatted) const;
29 
31  void unformattedToFormatted (double xThetaUnformatted,
32  double yRadiusUnformatted,
33  const DocumentModelCoords &modelCoords,
34  const DocumentModelGeneral &modelGeneral,
35  const MainWindowModel &mainWindowModel,
36  QString &xThetaFormatted,
37  QString &yRadiusFormatted,
38  const Transformation &transformation) const;
39 };
40 
41 #endif // FORMAT_COORDS_UNITS_H
FormatCoordsUnits::formattedToUnformatted
void formattedToUnformatted(const QString &xThetaFormatted, const QString &yRadiusFormatted, const DocumentModelCoords &modelCoords, const MainWindowModel &mainWindowModel, double &xThetaUnformatted, double &yRadiusUnformatted) const
Convert formatted string to unformatted numeric value.
Definition: FormatCoordsUnits.cpp:24
FormatCoordsUnits::FormatCoordsUnits
FormatCoordsUnits()
Single constructor.
Definition: FormatCoordsUnits.cpp:19
Transformation
Affine transformation between screen and graph coordinates, based on digitized axis points.
Definition: Transformation.h:30
MainWindowModel
Model for DlgSettingsMainWindow.
Definition: MainWindowModel.h:29
DocumentModelGeneral
Model for DlgSettingsGeneral and CmdSettingsGeneral.
Definition: DocumentModelGeneral.h:15
FormatCoordsUnits::unformattedToFormatted
void unformattedToFormatted(double xThetaUnformatted, double yRadiusUnformatted, const DocumentModelCoords &modelCoords, const DocumentModelGeneral &modelGeneral, const MainWindowModel &mainWindowModel, QString &xThetaFormatted, QString &yRadiusFormatted, const Transformation &transformation) const
Convert unformatted numeric value to formatted string. Transformation is used to determine best resol...
Definition: FormatCoordsUnits.cpp:63
FormatCoordsUnits
Highest-level wrapper around other Formats classes.
Definition: FormatCoordsUnits.h:16
DocumentModelCoords
Model for DlgSettingsCoords and CmdSettingsCoords.
Definition: DocumentModelCoords.h:19