Engauge Digitizer
2
Format
FormatDegreesMinutesSecondsNonPolarTheta.cpp
Go to the documentation of this file.
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 "
EngaugeAssert.h
"
9
#include "
FormatDegreesMinutesSecondsNonPolarTheta.h
"
10
#include "
Logger.h
"
11
#include <qmath.h>
12
#include <QRegExp>
13
#include <QStringList>
14
15
FormatDegreesMinutesSecondsNonPolarTheta::FormatDegreesMinutesSecondsNonPolarTheta
()
16
{
17
}
18
19
QString
FormatDegreesMinutesSecondsNonPolarTheta::formatOutput
(
CoordUnitsNonPolarTheta
coordUnits,
20
double
value,
21
bool
isNsHemisphere)
const
22
{
23
//LOG4CPP_INFO_S ((*mainCat)) << "FormatDegreesMinutesSecondsNonPolarTheta::formatOutput";
24
25
// See if similar method with hemisphere argument should have been called
26
ENGAUGE_ASSERT
(coordUnits !=
COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW
);
27
28
switch
(coordUnits) {
29
case
COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS
:
30
return
formatOutputDegreesMinutesSeconds
(value);
31
32
case
COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW
:
33
return
formatOutputDegreesMinutesSecondsNsew
(value,
34
isNsHemisphere);
35
36
default
:
37
break
;
38
}
39
40
LOG4CPP_ERROR_S
((*
mainCat
)) <<
"FormatDegreesMinutesSecondsNonPolarTheta::formatOutput"
;
41
ENGAUGE_ASSERT
(
false
);
42
return
""
;
43
}
44
COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW
Definition:
CoordUnitsNonPolarTheta.h:17
LOG4CPP_ERROR_S
#define LOG4CPP_ERROR_S(logger)
Definition:
convenience.h:12
CoordSymbol.h
FormatDegreesMinutesSecondsNonPolarTheta.h
FormatDegreesMinutesSecondsNonPolarTheta::FormatDegreesMinutesSecondsNonPolarTheta
FormatDegreesMinutesSecondsNonPolarTheta()
Single constructor.
Definition:
FormatDegreesMinutesSecondsNonPolarTheta.cpp:15
EngaugeAssert.h
FormatDegreesMinutesSecondsBase::formatOutputDegreesMinutesSecondsNsew
QString formatOutputDegreesMinutesSecondsNsew(double value, bool isNsHemisphere) const
Format as degrees, minutes and seconds with hemisphere.
Definition:
FormatDegreesMinutesSecondsBase.cpp:54
Logger.h
mainCat
log4cpp::Category * mainCat
Definition:
Logger.cpp:14
CoordUnitsNonPolarTheta
CoordUnitsNonPolarTheta
Definition:
CoordUnitsNonPolarTheta.h:14
COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS
Definition:
CoordUnitsNonPolarTheta.h:16
FormatDegreesMinutesSecondsBase::formatOutputDegreesMinutesSeconds
QString formatOutputDegreesMinutesSeconds(double value) const
Format as degrees, minutes and seconds without hemisphere.
Definition:
FormatDegreesMinutesSecondsBase.cpp:30
FormatDegreesMinutesSecondsNonPolarTheta::formatOutput
QString formatOutput(CoordUnitsNonPolarTheta coordUnits, double value, bool isXTheta) const
Format the degrees/minutes/seconds value. Distinguishing x/theta versus y/radius is required for N/S/...
Definition:
FormatDegreesMinutesSecondsNonPolarTheta.cpp:19
ENGAUGE_ASSERT
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...
Definition:
EngaugeAssert.h:20
Generated on Wed Aug 3 2022 12:00:00 for Engauge Digitizer by
1.8.14