7 #include "DocumentModelGeneral.h" 8 #include "EngaugeAssert.h" 9 #include "FormatCoordsUnitsStrategyNonPolarTheta.h" 10 #include "FormatDateTime.h" 11 #include "FormatDegreesMinutesSecondsNonPolarTheta.h" 14 #include "Transformation.h" 21 const QLocale &locale,
22 CoordUnitsNonPolarTheta coordUnits,
23 CoordUnitsDate coordUnitsDate,
24 CoordUnitsTime coordUnitsTime)
const 26 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::formattedToUnformatted";
31 case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
34 ENGAUGE_ASSERT (format.
parseInput (coordUnitsDate,
37 value) == QValidator::Acceptable);
41 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
42 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
46 value) == QValidator::Acceptable);
50 case COORD_UNITS_NON_POLAR_THETA_NUMBER:
51 value = locale.toDouble (
string);
55 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::formattedToFormatted";
56 ENGAUGE_ASSERT (
false);
64 const QLocale &locale,
65 CoordUnitsNonPolarTheta coordUnits,
66 CoordUnitsDate coordUnitsDate,
67 CoordUnitsTime coordUnitsTime,
71 double valueUnformattedOther)
const 73 LOG4CPP_DEBUG_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::unformattedToFormatted";
75 const char FORMAT (
'g');
77 QString valueFormatted;
80 case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
89 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
90 case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
99 case COORD_UNITS_NON_POLAR_THETA_NUMBER:
100 valueFormatted = locale.toString (valueUnformatted,
103 valueUnformattedOther,
110 LOG4CPP_ERROR_S ((*mainCat)) <<
"FormatCoordsUnitsStrategyNonPolarTheta::unformattedToFormatted";
111 ENGAUGE_ASSERT (
false);
115 return valueFormatted;
Model for DlgSettingsGeneral and CmdSettingsGeneral.