1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released      *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission.     *
5  ******************************************************************************************************/
6 
7 #include "CoordSymbol.h"
8 #include "CoordUnitsNonPolarTheta.h"
9 #include <QObject>
10 
coordUnitsNonPolarThetaToBriefType(CoordUnitsNonPolarTheta coordUnits)11 QString coordUnitsNonPolarThetaToBriefType (CoordUnitsNonPolarTheta coordUnits)
12 {
13   switch (coordUnits) {
14 
15   case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
16     return QObject::tr ("Date Time");
17 
18   case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
19     return QObject::tr ("Degrees");
20 
21   case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
22     return QObject::tr ("Degrees");
23 
24   case COORD_UNITS_NON_POLAR_THETA_NUMBER:
25     return QObject::tr ("Number");
26 
27   default:
28     return QObject::tr ("Unknown");
29   }
30 }
31 
coordUnitsNonPolarThetaToString(CoordUnitsNonPolarTheta coordUnits)32 QString coordUnitsNonPolarThetaToString (CoordUnitsNonPolarTheta coordUnits)
33 {
34   switch (coordUnits) {
35 
36   case COORD_UNITS_NON_POLAR_THETA_DATE_TIME:
37     return QObject::tr ("Date/Time");
38 
39   case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS:
40     return POLAR_UNITS_DEGREES_MINUTES_SECONDS;
41 
42   case COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW:
43     return POLAR_UNITS_DEGREES_MINUTES_SECONDS_NSEW;
44 
45   case COORD_UNITS_NON_POLAR_THETA_NUMBER:
46     return QObject::tr ("Number");
47 
48   default:
49     return QObject::tr ("Unknown");
50   }
51 }
52