Class: QgsCoordinateReferenceSystemProxyModel

A sort/filter proxy model for coordinate reference systems.

Added in version 3.34.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsCoordinateReferenceSystemProxyModel

Base classes

QSortFilterProxyModel

QAbstractProxyModel

QAbstractItemModel

QObject

Methods

coordinateReferenceSystemModel

Returns the underlying source model.

filterAuthIds

Returns the current filter list of auth ID strings, if set.

filterDeprecated

Returns whether deprecated CRS will be filtered from the results.

filterString

Returns the current filter string, if set.

filters

Returns any filters that affect how CRS are filtered.

setFilterAuthIds

Sets a filter list of CRS auth ID strings, such that only coordinate reference systems matching the specified auth IDs will be shown.

setFilterDeprecated

Sets whether deprecated CRS should be filtered from the results.

setFilterString

Sets a filter string, such that only coordinate reference systems matching the specified string will be shown.

setFilters

Set filters that affect how CRS are filtered.

Attributes

FilterCompound

FilterHorizontal

FilterVertical

class qgis.gui.QgsCoordinateReferenceSystemProxyModel[source]

Bases: QSortFilterProxyModel

__init__(parent: QObject | None = None)

Constructor for QgsCoordinateReferenceSystemProxyModel, with the given parent object.

Parameters:

parent (Optional[QObject] = None)

class Filter

Bases: int

FilterCompound = 8
FilterHorizontal = 2
FilterVertical = 4
class Filters
class Filters(f: QgsCoordinateReferenceSystemProxyModel.Filters | QgsCoordinateReferenceSystemProxyModel.Filter)
class Filters(a0: QgsCoordinateReferenceSystemProxyModel.Filters)

Bases: object

coordinateReferenceSystemModel(self) QgsCoordinateReferenceSystemModel | None[source]

Returns the underlying source model.

Return type:

Optional[QgsCoordinateReferenceSystemModel]

filterAuthIds(self) Set[str]

Returns the current filter list of auth ID strings, if set.

Return type:

Set[str]

filterDeprecated(self) bool[source]

Returns whether deprecated CRS will be filtered from the results.

Return type:

bool

filterString(self) str[source]

Returns the current filter string, if set.

Return type:

str

filters(self) QgsCoordinateReferenceSystemProxyModel.Filters[source]

Returns any filters that affect how CRS are filtered.

See also

setFilters()

Return type:

QgsCoordinateReferenceSystemProxyModel.Filters

setFilterAuthIds(self, filter: Iterable[str | None])[source]

Sets a filter list of CRS auth ID strings, such that only coordinate reference systems matching the specified auth IDs will be shown.

See also

filterAuthIds()

Parameters:

filter (Iterable[Optional[str]])

setFilterDeprecated(self, filter: bool)[source]

Sets whether deprecated CRS should be filtered from the results.

Parameters:

filter (bool)

setFilterString(self, filter: str | None)[source]

Sets a filter string, such that only coordinate reference systems matching the specified string will be shown.

See also

filterString()

Parameters:

filter (Optional[str])

setFilters(self, filters: QgsCoordinateReferenceSystemProxyModel.Filters | QgsCoordinateReferenceSystemProxyModel.Filter)[source]

Set filters that affect how CRS are filtered.

See also

filters()

Parameters:

filters (Union[QgsCoordinateReferenceSystemProxyModel.Filters, QgsCoordinateReferenceSystemProxyModel.Filter])