QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsprojoperation.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprojoperation.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 QGSPROJOPERATION_H
18#define QGSPROJOPERATION_H
19
20#include "qgis_core.h"
21#include "qgis_sip.h"
22
23#include <QString>
24
31class CORE_EXPORT QgsProjOperation
32{
33 public:
34
39 bool isValid() const { return mValid; }
40
44 QString id() const { return mId; }
45
49 QString description() const { return mDescription; }
50
54 QString details() const { return mDetails; }
55
56#ifdef SIP_RUN
57 SIP_PYOBJECT __repr__();
58 % MethodCode
59 QString str;
60 if ( !sipCpp->isValid() )
61 {
62 str = QStringLiteral( "<QgsProjOperation: invalid>" );
63 }
64 else
65 {
66 str = QStringLiteral( "<QgsProjOperation: %1>" ).arg( sipCpp->id() );
67 }
68 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
69 % End
70#endif
71
72 private:
73
74 bool mValid = false;
75 QString mId;
76 QString mDescription;
77 QString mDetails;
78
81};
82
83#endif // QGSCELESTIALBODY_H
Contains information about a PROJ operation.
QString id() const
ID of operation.
QString description() const
Description.
friend class QgsCoordinateReferenceSystem
QString details() const
Additional details.
friend class QgsCoordinateReferenceSystemRegistry
bool isValid() const
Returns true if the body is a valid object, or false if it is a null/invalid object.