7 #include "EngaugeAssert.h" 8 #include "FormatCoordsUnitsStrategyPolarTheta.h" 9 #include "FormatDegreesMinutesSecondsPolarTheta.h" 18 const QLocale &locale,
19 CoordUnitsPolarTheta coordUnits)
const 21 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::formattedToUnformatted";
26 case COORD_UNITS_POLAR_THETA_DEGREES:
27 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES:
28 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS:
29 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
33 value) == QValidator::Acceptable);
37 case COORD_UNITS_POLAR_THETA_GRADIANS:
38 case COORD_UNITS_POLAR_THETA_RADIANS:
39 case COORD_UNITS_POLAR_THETA_TURNS:
40 value = locale.toDouble (
string);
44 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormattedStrategyPolarTheta";
45 ENGAUGE_ASSERT (
false);
53 const QLocale &locale,
54 CoordUnitsPolarTheta coordUnits,
56 double valueUnformattedOther)
const 58 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormatted";
60 const char FORMAT (
'g');
61 const bool IS_X_THETA =
true;
63 QString valueFormatted;
66 case COORD_UNITS_POLAR_THETA_DEGREES:
67 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES:
68 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS:
69 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
78 case COORD_UNITS_POLAR_THETA_GRADIANS:
79 case COORD_UNITS_POLAR_THETA_RADIANS:
80 case COORD_UNITS_POLAR_THETA_TURNS:
81 valueFormatted = locale.toString (valueUnformatted,
84 valueUnformattedOther,
90 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormattedStrategyPolarTheta";
91 ENGAUGE_ASSERT (
false);
95 return valueFormatted;