7 #include "DocumentModelGeneral.h" 8 #include "EngaugeAssert.h" 9 #include "FormatCoordsUnitsStrategyPolarTheta.h" 10 #include "FormatDegreesMinutesSecondsPolarTheta.h" 19 const QLocale &locale,
20 CoordUnitsPolarTheta coordUnits)
const 22 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::formattedToUnformatted";
27 case COORD_UNITS_POLAR_THETA_DEGREES:
28 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES:
29 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS:
30 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
34 value) == QValidator::Acceptable);
38 case COORD_UNITS_POLAR_THETA_GRADIANS:
39 case COORD_UNITS_POLAR_THETA_RADIANS:
40 case COORD_UNITS_POLAR_THETA_TURNS:
41 value = locale.toDouble (
string);
45 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormattedStrategyPolarTheta";
46 ENGAUGE_ASSERT (
false);
54 const QLocale &locale,
55 CoordUnitsPolarTheta coordUnits,
58 double valueUnformattedOther)
const 60 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormatted";
62 const char FORMAT (
'g');
63 const bool IS_X_THETA =
true;
65 QString valueFormatted;
68 case COORD_UNITS_POLAR_THETA_DEGREES:
69 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES:
70 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS:
71 case COORD_UNITS_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
80 case COORD_UNITS_POLAR_THETA_GRADIANS:
81 case COORD_UNITS_POLAR_THETA_RADIANS:
82 case COORD_UNITS_POLAR_THETA_TURNS:
83 valueFormatted = locale.toString (valueUnformatted,
86 valueUnformattedOther,
93 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyPolarTheta::unformattedToFormattedStrategyPolarTheta";
94 ENGAUGE_ASSERT (
false);
98 return valueFormatted;
Model for DlgSettingsGeneral and CmdSettingsGeneral.