QGIS/python/core/auto_generated/proj/qgscelestialbody.sip.in
2024-08-13 20:28:55 +10:00

72 lines
2.0 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/proj/qgscelestialbody.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsCelestialBody
{
%Docstring(signature="appended")
Contains information about a celestial body.
.. note::
Only used in builds based on on PROJ 8.1 or later
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgscelestialbody.h"
%End
public:
bool isValid() const;
%Docstring
Returns ``True`` if the body is a valid object, or ``False`` if it is a null/invalid
object.
%End
QString name() const;
%Docstring
Name of celestial body.
%End
QString authority() const;
%Docstring
Authority name, e.g. EPSG.
%End
SIP_PYOBJECT __repr__();
%MethodCode
QString str;
if ( !sipCpp->isValid() )
{
str = QStringLiteral( "<QgsCelestialBody: invalid>" );
}
else
{
QString id;
if ( !sipCpp->authority().isEmpty() )
id = QStringLiteral( "%1 (%2)" ).arg( sipCpp->name(), sipCpp->authority() );
else
id = sipCpp->name();
str = QStringLiteral( "<QgsCelestialBody: %1>" ).arg( id );
}
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/proj/qgscelestialbody.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/