Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
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 <QRegularExpression>
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
//qCInfo(ENGAUGE_LOG) << "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
qCCritical(ENGAUGE_LOG) <<
"FormatDegreesMinutesSecondsNonPolarTheta::formatOutput"
;
41
ENGAUGE_ASSERT
(
false
);
42
return
""
;
43
}
44
CoordSymbol.h
CoordUnitsNonPolarTheta
CoordUnitsNonPolarTheta
Definition
CoordUnitsNonPolarTheta.h:14
COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS
@ COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS
Definition
CoordUnitsNonPolarTheta.h:16
COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW
@ COORD_UNITS_NON_POLAR_THETA_DEGREES_MINUTES_SECONDS_NSEW
Definition
CoordUnitsNonPolarTheta.h:17
EngaugeAssert.h
ENGAUGE_ASSERT
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT.
Definition
EngaugeAssert.h:17
FormatDegreesMinutesSecondsNonPolarTheta.h
Logger.h
FormatDegreesMinutesSecondsBase::formatOutputDegreesMinutesSeconds
QString formatOutputDegreesMinutesSeconds(double value) const
Format as degrees, minutes and seconds without hemisphere.
Definition
FormatDegreesMinutesSecondsBase.cpp:31
FormatDegreesMinutesSecondsBase::formatOutputDegreesMinutesSecondsNsew
QString formatOutputDegreesMinutesSecondsNsew(double value, bool isNsHemisphere) const
Format as degrees, minutes and seconds with hemisphere.
Definition
FormatDegreesMinutesSecondsBase.cpp:55
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
FormatDegreesMinutesSecondsNonPolarTheta::FormatDegreesMinutesSecondsNonPolarTheta
FormatDegreesMinutesSecondsNonPolarTheta()
Single constructor.
Definition
FormatDegreesMinutesSecondsNonPolarTheta.cpp:15
Generated on
for Engauge Digitizer by
1.17.0