Class: QgsRecentCoordinateReferenceSystemsProxyModel

A sort/filter proxy model for recent coordinate reference systems.

Added in version 3.36.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsRecentCoordinateReferenceSystemsProxyModel

Base classes

QSortFilterProxyModel

QAbstractProxyModel

QAbstractItemModel

QObject

class qgis.gui.QgsRecentCoordinateReferenceSystemsProxyModel[source]

Bases: QSortFilterProxyModel

__init__(parent: QObject | None = None)

Constructor for QgsRecentCoordinateReferenceSystemsProxyModel, with the given parent object.

Parameters:

parent (Optional[QObject] = None)

crs(self, index: QModelIndex) QgsCoordinateReferenceSystem[source]

Returns the CRS for the corresponding index.

Returns an invalid CRS if the index is not valid.

Parameters:

index (QModelIndex)

Return type:

QgsCoordinateReferenceSystem

filters(self) QgsCoordinateReferenceSystemProxyModel.Filters[source]

Returns any filters that affect how CRS are filtered.

See also

setFilters()

Return type:

QgsCoordinateReferenceSystemProxyModel.Filters

recentCoordinateReferenceSystemsModel(self) QgsRecentCoordinateReferenceSystemsModel | None[source]

Returns the underlying source model.

Return type:

Optional[QgsRecentCoordinateReferenceSystemsModel]

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.

Parameters:

filter (Optional[str])

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

Set filters that affect how CRS are filtered.

Parameters:

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