QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgscrsdefinitionwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscrsdefinitionwidget.h
3  ---------------------
4  begin : December 2021
5  copyright : (C) 2021 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGSCRSDEFINITIONWIDGET_H
16 #define QGSCRSDEFINITIONWIDGET_H
17 
18 #include "ui_qgscrsdefinitionwidgetbase.h"
20 
21 #include "qgis_gui.h"
22 #include "qgis_sip.h"
23 
25 
31 class GUI_EXPORT QgsCrsDefinitionWidget : public QWidget, private Ui::QgsCrsDefinitionWidgetBase
32 {
33  Q_OBJECT
34  public:
35 
39  QgsCrsDefinitionWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
40 
49 
55  void setCrs( const QgsCoordinateReferenceSystem &crs );
56 
65  void setCrs( const QgsCoordinateReferenceSystem &crs, Qgis::CrsDefinitionFormat nativeFormat );
66 
72  Qgis::CrsDefinitionFormat format() const;
73 
79  void setFormat( Qgis::CrsDefinitionFormat format );
80 
89  QString definitionString() const;
90 
99  void setDefinitionString( const QString &definition );
100 
101  signals:
102 
106  void crsChanged();
107 
108  private slots:
109  void pbnCalculate_clicked();
110  void pbnCopyCRS_clicked();
111  void validateCurrent();
112  void formatChanged();
113 
114  private:
115 
116  QString multiLineWktToSingleLine( const QString &wkt );
117 
118 };
119 
120 #endif // QGSCRSDEFINITIONWIDGET_H
Qgis::CrsDefinitionFormat
CrsDefinitionFormat
CRS definition formats.
Definition: qgis.h:1687
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:105
QgsCrsDefinitionWidget
A widget for definition a custom coordinate reference system.
Definition: qgscrsdefinitionwidget.h:31
qgis_sip.h
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:211
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
qgscoordinatereferencesystem.h