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

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]

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.

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]

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.

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]

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.

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]

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.

coordinateType(self) Qgis.CoordinateDisplayType[source]

Returns default coordinate type for the project.

Added in version 3.28.

Return type:

Qgis.CoordinateDisplayType

signal coordinateTypeChanged[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.

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]

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.

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