1 #include "EngaugeAssert.h"
2 #include "FormatCoordsUnitsStrategyNonPolarTheta.h"
3 #include "FormatDateTime.h"
4 #include "FormatDegreesMinutesSecondsNonPolarTheta.h"
7 #include "Transformation.h"
14 const QLocale &locale,
15 CoordUnitsNonPolarTheta coordUnits,
16 CoordUnitsDate coordUnitsDate,
17 CoordUnitsTime coordUnitsTime)
const
19 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::formattedToUnformatted";
24 case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
27 ENGAUGE_ASSERT (format.
parseInput (coordUnitsDate,
30 value) == QValidator::Acceptable);
34 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
35 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
39 value) == QValidator::Acceptable);
43 case COORD_UNITS_NON_POLAR_THETA_NUMBER:
44 value = locale.toDouble (
string);
48 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::formattedToFormatted";
49 ENGAUGE_ASSERT (
false);
57 const QLocale &locale,
58 CoordUnitsNonPolarTheta coordUnits,
59 CoordUnitsDate coordUnitsDate,
60 CoordUnitsTime coordUnitsTime,
63 double valueUnformattedOther)
const
65 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::unformattedToFormatted";
67 const char FORMAT (
'g');
69 QString valueFormatted;
72 case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
81 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
82 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
91 case COORD_UNITS_NON_POLAR_THETA_NUMBER:
92 valueFormatted = locale.toString (valueUnformatted,
95 valueUnformattedOther,
101 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::unformattedToFormatted";
102 ENGAUGE_ASSERT (
false);
106 return valueFormatted;