QGIS API Documentation  3.27.0-Master (aef1b1ec20)
Signals | Public Member Functions | List of all members
QgsCrsDefinitionWidget Class Reference

A widget for definition a custom coordinate reference system. More...

#include <qgscrsdefinitionwidget.h>

Inheritance diagram for QgsCrsDefinitionWidget:
Inheritance graph
[legend]

Signals

void crsChanged ()
 Emitted when the CRS defined in the widget is changed. More...
 

Public Member Functions

 QgsCrsDefinitionWidget (QWidget *parent=nullptr)
 Constructor for QgsCrsDefinitionWidget, with the specified parent widget. More...
 
QgsCoordinateReferenceSystem crs () const
 Returns the current CRS as defined in the widget. More...
 
QString definitionString () const
 Returns the current definition string. More...
 
Qgis::CrsDefinitionFormat format () const
 Returns the selected CRS format. More...
 
void setCrs (const QgsCoordinateReferenceSystem &crs)
 Sets the current crs to display in the widget. More...
 
void setCrs (const QgsCoordinateReferenceSystem &crs, Qgis::CrsDefinitionFormat nativeFormat)
 Sets the current crs to display in the widget. More...
 
void setDefinitionString (const QString &definition)
 Sets the current definition string. More...
 
void setFormat (Qgis::CrsDefinitionFormat format)
 Sets the CRS format. More...
 

Detailed Description

A widget for definition a custom coordinate reference system.

Since
QGIS 3.24

Definition at line 31 of file qgscrsdefinitionwidget.h.

Constructor & Destructor Documentation

◆ QgsCrsDefinitionWidget()

QgsCrsDefinitionWidget::QgsCrsDefinitionWidget ( QWidget *  parent = nullptr)

Constructor for QgsCrsDefinitionWidget, with the specified parent widget.

Definition at line 25 of file qgscrsdefinitionwidget.cpp.

Member Function Documentation

◆ crs()

QgsCoordinateReferenceSystem QgsCrsDefinitionWidget::crs ( ) const

Returns the current CRS as defined in the widget.

An invalid CRS may be returned if no CRS is defined in the widget.

See also
setCrs()

Definition at line 42 of file qgscrsdefinitionwidget.cpp.

◆ crsChanged

void QgsCrsDefinitionWidget::crsChanged ( )
signal

Emitted when the CRS defined in the widget is changed.

◆ definitionString()

QString QgsCrsDefinitionWidget::definitionString ( ) const

Returns the current definition string.

This represents the unaltered user-entered definition string, which may represent either a WKT or PROJ string (see format()), and may not represent a valid CRS definition.

See also
setDefinitionString()

Definition at line 91 of file qgscrsdefinitionwidget.cpp.

◆ format()

Qgis::CrsDefinitionFormat QgsCrsDefinitionWidget::format ( ) const

Returns the selected CRS format.

See also
setFormat()

Definition at line 81 of file qgscrsdefinitionwidget.cpp.

◆ setCrs() [1/2]

void QgsCrsDefinitionWidget::setCrs ( const QgsCoordinateReferenceSystem crs)

Sets the current crs to display in the widget.

See also
crs()

Definition at line 60 of file qgscrsdefinitionwidget.cpp.

◆ setCrs() [2/2]

void QgsCrsDefinitionWidget::setCrs ( const QgsCoordinateReferenceSystem crs,
Qgis::CrsDefinitionFormat  nativeFormat 
)

Sets the current crs to display in the widget.

The nativeFormat argument specifies the format (e.g. WKT or PROJ) is natively associated with the custom CRS.

See also
crs()

Definition at line 65 of file qgscrsdefinitionwidget.cpp.

◆ setDefinitionString()

void QgsCrsDefinitionWidget::setDefinitionString ( const QString &  definition)

Sets the current definition string.

This represents the unaltered user-entered definition string, which may represent either a WKT or PROJ string (see format()), and may not represent a valid CRS definition.

See also
definitionString()

Definition at line 96 of file qgscrsdefinitionwidget.cpp.

◆ setFormat()

void QgsCrsDefinitionWidget::setFormat ( Qgis::CrsDefinitionFormat  format)

Sets the CRS format.

See also
format()

Definition at line 86 of file qgscrsdefinitionwidget.cpp.


The documentation for this class was generated from the following files: