Class: QgsProjectDisplaySettings

Contains settings and properties relating to how a QgsProject should display values such as map coordinates and bearings.

Added in version 3.12.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProjectDisplaySettings

Base classes

QObject

Methods

bearingFormat

Returns the project bearing's format, which controls how bearings associated with the project are displayed.

coordinateAxisOrder

Returns default coordinate axis order to use when displaying coordinates for the project.

coordinateCrs

Returns the coordinate display CRS used derived from the coordinate type.

coordinateCustomCrs

Returns the coordinate custom CRS used when the project coordinate type is set to Qgis.CoordinateDisplayType.CustomCrs.

coordinateType

Returns default coordinate type for the project.

geographicCoordinateFormat

Returns the project's geographic coordinate format, which controls how geographic coordinates associated with the project are displayed.

readXml

Reads the settings's state from a DOM element.

reset

Resets the settings to a default state.

setBearingFormat

Sets the project bearing format, which controls how bearings associated with the project are displayed.

setCoordinateAxisOrder

Sets the default coordinate axis order to use when displaying coordinates for the project.

setCoordinateCustomCrs

Sets the coordinate custom CRS used when the project coordinate type is set to Qgis.CoordinateDisplayType.CustomCrs.

setCoordinateType

Sets the default coordinate type for the project.

setGeographicCoordinateFormat

Sets the project geographic coordinate format, which controls how geographic coordinates associated with the project are displayed.

writeXml

Returns a DOM element representing the settings.

Signals

bearingFormatChanged

Emitted when the bearing format changes.

coordinateAxisOrderChanged

Emitted when the default coordinate axis order changes.

coordinateCrsChanged

Emitted when the coordinate CRS changes.

coordinateCustomCrsChanged

Emitted when the coordinate custom CRS changes.

coordinateTypeChanged

Emitted when the default coordinate format changes.

geographicCoordinateFormatChanged

Emitted when the geographic coordinate format changes.

class qgis.core.QgsProjectDisplaySettings[source]

Bases: QObject

__init__(parent: QObject | None = None)

Constructor for QgsProjectDisplaySettings with the specified parent object.

Parameters:

parent (Optional[QObject] = None)

bearingFormat(self) QgsBearingNumericFormat | None[source]

Returns the project bearing’s format, which controls how bearings associated with the project are displayed.

Return type:

Optional[QgsBearingNumericFormat]

signal bearingFormatChanged[source]

Emitted when the bearing format changes.

See also

bearingFormat()

coordinateAxisOrder(self) Qgis.CoordinateOrder[source]

Returns default coordinate axis order to use when displaying coordinates for the project.

Added in version 3.28.

Return type:

Qgis.CoordinateOrder

signal coordinateAxisOrderChanged[source]

Emitted when the default coordinate axis order changes.

Added in version 3.28.

coordinateCrs(self) QgsCoordinateReferenceSystem[source]

Returns the coordinate display CRS used derived from the coordinate type.

See also

coordinateType()

Note

if not parented to a project object, an invalid CRS will be returned.

Added in version 3.28.

Return type:

QgsCoordinateReferenceSystem

signal coordinateCrsChanged[source]

Emitted when the coordinate CRS changes.

See also

coordinateCrs()

See also

coordinateType()

Added in version 3.28.

coordinateCustomCrs(self) QgsCoordinateReferenceSystem[source]

Returns the coordinate custom CRS used when the project coordinate type is set to Qgis.CoordinateDisplayType.CustomCrs.

Added in version 3.28.

Return type:

QgsCoordinateReferenceSystem

signal coordinateCustomCrsChanged[source]

Emitted when the coordinate custom CRS changes.

Added in version 3.28.

coordinateType(self) Qgis.CoordinateDisplayType[source]

Returns default coordinate type for the project.

Added in version 3.28.

Return type:

Qgis.CoordinateDisplayType

signal coordinateTypeChanged[source]

Emitted when the default coordinate format changes.

See also

coordinateType()

Added in version 3.28.

geographicCoordinateFormat(self) QgsGeographicCoordinateNumericFormat | None[source]

Returns the project’s geographic coordinate format, which controls how geographic coordinates associated with the project are displayed.

Return type:

Optional[QgsGeographicCoordinateNumericFormat]

signal geographicCoordinateFormatChanged[source]

Emitted when the geographic coordinate format changes.

readXml(self, element: QDomElement, context: QgsReadWriteContext) bool[source]

Reads the settings’s state from a DOM element.

See also

writeXml()

Parameters:
Return type:

bool

reset(self)[source]

Resets the settings to a default state.

setBearingFormat(self, format: QgsBearingNumericFormat | None)[source]

Sets the project bearing format, which controls how bearings associated with the project are displayed.

Ownership of format is transferred to the settings.

See also

bearingFormat()

Parameters:

format (Optional[QgsBearingNumericFormat])

setCoordinateAxisOrder(self, order: Qgis.CoordinateOrder)[source]

Sets the default coordinate axis order to use when displaying coordinates for the project.

Added in version 3.28.

Parameters:

order (Qgis.CoordinateOrder)

setCoordinateCustomCrs(self, crs: QgsCoordinateReferenceSystem)[source]

Sets the coordinate custom CRS used when the project coordinate type is set to Qgis.CoordinateDisplayType.CustomCrs.

Added in version 3.28.

Parameters:

crs (QgsCoordinateReferenceSystem)

setCoordinateType(self, type: Qgis.CoordinateDisplayType)[source]

Sets the default coordinate type for the project.

See also

coordinateType()

Added in version 3.28.

Parameters:

type (Qgis.CoordinateDisplayType)

setGeographicCoordinateFormat(self, format: QgsGeographicCoordinateNumericFormat | None)[source]

Sets the project geographic coordinate format, which controls how geographic coordinates associated with the project are displayed.

Ownership of format is transferred to the settings.

Added in version 3.26.

Parameters:

format (Optional[QgsGeographicCoordinateNumericFormat])

writeXml(self, doc: QDomDocument, context: QgsReadWriteContext) QDomElement[source]

Returns a DOM element representing the settings.

See also

readXml()

Parameters:
Return type:

QDomElement