1 #include "EngaugeAssert.h"
2 #include "FormatCoordsUnitsStrategyNonPolarTheta.h"
3 #include "FormatDateTime.h"
4 #include "FormatDegreesMinutesSecondsNonPolarTheta.h"
6 #include "Transformation.h"
13 CoordUnitsNonPolarTheta coordUnits,
14 CoordUnitsDate coordUnitsDate,
15 CoordUnitsTime coordUnitsTime)
const
17 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::formattedToUnformatted";
22 case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
25 ENGAUGE_ASSERT (format.
parseInput (coordUnitsDate,
28 value) == QValidator::Acceptable);
32 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
33 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
37 value) == QValidator::Acceptable);
41 case COORD_UNITS_NON_POLAR_THETA_NUMBER:
42 value =
string.toDouble ();
46 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::formattedToFormatted";
47 ENGAUGE_ASSERT (
false);
55 CoordUnitsNonPolarTheta coordUnits,
56 CoordUnitsDate coordUnitsDate,
57 CoordUnitsTime coordUnitsTime,
60 double valueUnformattedOther)
const
62 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::unformattedToFormatted";
64 const char FORMAT (
'g');
66 QString valueFormatted;
69 case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
78 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
79 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
88 case COORD_UNITS_NON_POLAR_THETA_NUMBER:
89 valueFormatted = QString::number (valueUnformatted,
92 valueUnformattedOther,
98 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::unformattedToFormatted";
99 ENGAUGE_ASSERT (
false);
103 return valueFormatted;