1 #include "EngaugeAssert.h"
2 #include "FormatCoordsUnitsStrategyPolarTheta.h"
3 #include "FormatDegreesMinutesSecondsPolarTheta.h"
11 CoordUnitsPolarTheta coordUnits)
const
13 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::formattedToUnformatted";
18 case COORD_UNITS_POLAR_THETA_DEGREES:
19 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES:
20 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS:
21 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
25 value) == QValidator::Acceptable);
29 case COORD_UNITS_POLAR_THETA_GRADIANS:
30 case COORD_UNITS_POLAR_THETA_RADIANS:
31 case COORD_UNITS_POLAR_THETA_TURNS:
32 value =
string.toDouble();
36 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormattedStrategyPolarTheta";
37 ENGAUGE_ASSERT (
false);
45 CoordUnitsPolarTheta coordUnits,
47 double valueUnformattedOther)
const
49 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormatted";
51 const char FORMAT (
'g');
52 const bool IS_X_THETA =
true;
54 QString valueFormatted;
57 case COORD_UNITS_POLAR_THETA_DEGREES:
58 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES:
59 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS:
60 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
69 case COORD_UNITS_POLAR_THETA_GRADIANS:
70 case COORD_UNITS_POLAR_THETA_RADIANS:
71 case COORD_UNITS_POLAR_THETA_TURNS:
72 valueFormatted = QString::number (valueUnformatted,
75 valueUnformattedOther,
81 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormattedStrategyPolarTheta";
82 ENGAUGE_ASSERT (
false);
86 return valueFormatted;