Class: QgsCrsDefinitionWidget¶
A widget for defining a custom coordinate reference system.
Added in version 3.24.
QgsCrsDefinitionWidget¶
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsCrsDefinitionWidget[source]¶
Bases:
QWidget- __init__(parent: QWidget | None = None)
Constructor for QgsCrsDefinitionWidget, with the specified
parentwidget.- Parameters:
parent (Optional[QWidget] = None)
- crs(self) QgsCoordinateReferenceSystem[source]¶
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
- Return type:
- signal crsChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- definitionString(self) str[source]¶
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
- Return type:
str
- format(self) Qgis.CrsDefinitionFormat[source]¶
Returns the selected CRS format.
See also
- Return type:
- setCrs(self, crs: QgsCoordinateReferenceSystem)[source]¶
Sets the current
crsto display in the widget.See also
setCrs(self, crs:
QgsCoordinateReferenceSystem, nativeFormat: Qgis.CrsDefinitionFormat) Sets the currentcrsto display in the widget.The
nativeFormatargument specifies the format (e.g. WKT or PROJ) is natively associated with the custom CRS.See also
- Parameters:
- setDefinitionString(self, definition: str | None)[source]¶
Sets the current
definitionstring.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
- Parameters:
definition (Optional[str])
- setFormat(self, format: Qgis.CrsDefinitionFormat)[source]¶
Sets the CRS
format.See also
- Parameters:
format (Qgis.CrsDefinitionFormat)