QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgsreferencedgeometry.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsreferencedgeometry.h
3  ----------------------
4  begin : June 2017
5  copyright : (C) 2017 by 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 
18 #ifndef QGSREFERENCEDGEOMETRY_H
19 #define QGSREFERENCEDGEOMETRY_H
20 
21 #include "qgis.h"
22 #include "qgis_sip.h"
23 #include "qgis_core.h"
25 #include "qgsrectangle.h"
26 
39 class CORE_EXPORT QgsReferencedGeometryBase
40 {
41  public:
42 
47 
53  QgsCoordinateReferenceSystem crs() const { return mCrs; }
54 
60  void setCrs( const QgsCoordinateReferenceSystem &crs ) { mCrs = crs; }
61 
62  private:
63 
65 
66 };
67 
74 {
75  public:
76 
82 
86  QgsReferencedRectangle() = default;
87 
89  operator QVariant() const
90  {
91  return QVariant::fromValue( *this );
92  }
93 
94 };
95 
97 
98 
104 {
105  public:
106 
112 
116  QgsReferencedPointXY() = default;
117 
119  operator QVariant() const
120  {
121  return QVariant::fromValue( *this );
122  }
123 
124 };
125 
127 
128 #endif // QGSREFERENCEDGEOMETRY_H
QgsCoordinateReferenceSystem crs() const
Returns the associated coordinate reference system, or an invalid CRS if no reference system is set...
A rectangle specified with double values.
Definition: qgsrectangle.h:40
A class to represent a 2D point.
Definition: qgspointxy.h:43
A QgsPointXY with associated coordinate reference system.
const QgsCoordinateReferenceSystem & crs
Q_DECLARE_METATYPE(QModelIndex)
void setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the associated crs.
A QgsRectangle with associated coordinate reference system.
This class represents a coordinate reference system (CRS).
A base class for geometry primitives which are stored with an associated reference system...