QGIS API Documentation
3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
src
core
proj
qgscelestialbody.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscelestialbody.h
3
------------------------
4
begin : May 2021
5
copyright : (C) 2021 Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
#ifndef QGSCELESTIALBODY_H
18
#define QGSCELESTIALBODY_H
19
20
#include "qgis_core.h"
21
#include "
qgis_sip.h
"
22
#include <QString>
23
31
class
CORE_EXPORT
QgsCelestialBody
32
{
33
public
:
34
39
bool
isValid
()
const
{
return
mValid; }
40
44
QString
name
()
const
{
return
mName; }
45
49
QString
authority
()
const
{
return
mAuthority; }
50
51
#ifdef SIP_RUN
52
SIP_PYOBJECT __repr__();
53
% MethodCode
54
QString
str
;
55
if
( !sipCpp->isValid() )
56
{
57
str
= QStringLiteral(
"<QgsCelestialBody: invalid>"
);
58
}
59
else
60
{
61
QString id;
62
if
( !sipCpp->authority().isEmpty() )
63
id
= QStringLiteral(
"%1 (%2)"
).arg( sipCpp->name(), sipCpp->authority() );
64
else
65
id
= sipCpp->name();
66
str
= QStringLiteral(
"<QgsCelestialBody: %1>"
).arg(
id
);
67
}
68
sipRes = PyUnicode_FromString(
str
.toUtf8().constData() );
69
% End
70
#endif
71
72
private
:
73
74
bool
mValid =
false
;
75
QString mName;
76
QString mAuthority;
77
78
friend
class
QgsCoordinateReferenceSystemRegistry
;
79
};
80
81
#endif
// QGSCELESTIALBODY_H
QgsCelestialBody
Contains information about a celestial body.
Definition
qgscelestialbody.h:32
QgsCelestialBody::isValid
bool isValid() const
Returns true if the body is a valid object, or false if it is a null/invalid object.
Definition
qgscelestialbody.h:39
QgsCelestialBody::authority
QString authority() const
Authority name, e.g.
Definition
qgscelestialbody.h:49
QgsCelestialBody::name
QString name() const
Name of celestial body.
Definition
qgscelestialbody.h:44
QgsCoordinateReferenceSystemRegistry
A registry for known coordinate reference system (CRS) definitions, including any user-defined CRSes.
Definition
qgscoordinatereferencesystemregistry.h:65
str
#define str(x)
Definition
qgis.cpp:38
qgis_sip.h
Generated on Mon Oct 30 2023 18:42:25 for QGIS API Documentation by
1.9.8