QGIS API Documentation 3.99.0-Master (752b475928d)
Loading...
Searching...
No Matches
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"
19
20#include "qgis_gui.h"
21#include "qgis_sip.h"
23
25
31class GUI_EXPORT QgsCrsDefinitionWidget : public QWidget, private Ui::QgsCrsDefinitionWidgetBase
32{
33 Q_OBJECT
34 public:
38 QgsCrsDefinitionWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
39
48
55
65
72
79
88 QString definitionString() const;
89
98 void setDefinitionString( const QString &definition );
99
100 signals:
101
106
107 private slots:
108 void pbnCalculate_clicked();
109 void pbnCopyCRS_clicked();
110 void validateCurrent();
111 void formatChanged();
112
113 private:
114 QString multiLineWktToSingleLine( const QString &wkt );
115};
116
117#endif // QGSCRSDEFINITIONWIDGET_H
CrsDefinitionFormat
CRS definition formats.
Definition qgis.h:3891
Represents a coordinate reference system (CRS).
void setDefinitionString(const QString &definition)
Sets the current definition string.
QString definitionString() const
Returns the current definition string.
void setFormat(Qgis::CrsDefinitionFormat format)
Sets the CRS format.
void crsChanged()
Emitted when the CRS defined in the widget is changed.
QgsCrsDefinitionWidget(QWidget *parent=nullptr)
Constructor for QgsCrsDefinitionWidget, with the specified parent widget.
Qgis::CrsDefinitionFormat format() const
Returns the selected CRS format.
QgsCoordinateReferenceSystem crs() const
Returns the current CRS as defined in the widget.
void setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the current crs to display in the widget.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53