7 #include "EngaugeAssert.h" 8 #include "FormatCoordsUnitsStrategyNonPolarTheta.h" 9 #include "FormatDateTime.h" 10 #include "FormatDegreesMinutesSecondsNonPolarTheta.h" 13 #include "Transformation.h" 20 const QLocale &locale,
21 CoordUnitsNonPolarTheta coordUnits,
22 CoordUnitsDate coordUnitsDate,
23 CoordUnitsTime coordUnitsTime)
const 25 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::formattedToUnformatted";
30 case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
33 ENGAUGE_ASSERT (format.
parseInput (coordUnitsDate,
36 value) == QValidator::Acceptable);
40 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
41 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
45 value) == QValidator::Acceptable);
49 case COORD_UNITS_NON_POLAR_THETA_NUMBER:
50 value = locale.toDouble (
string);
54 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::formattedToFormatted";
55 ENGAUGE_ASSERT (
false);
63 const QLocale &locale,
64 CoordUnitsNonPolarTheta coordUnits,
65 CoordUnitsDate coordUnitsDate,
66 CoordUnitsTime coordUnitsTime,
69 double valueUnformattedOther)
const 71 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::unformattedToFormatted";
73 const char FORMAT (
'g');
75 QString valueFormatted;
78 case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
87 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
88 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
97 case COORD_UNITS_NON_POLAR_THETA_NUMBER:
98 valueFormatted = locale.toString (valueUnformatted,
101 valueUnformattedOther,
107 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::unformattedToFormatted";
108 ENGAUGE_ASSERT (
false);
112 return valueFormatted;