Class: QgsCoordinateReferenceSystemModel

class qgis.gui.QgsCoordinateReferenceSystemModel

Bases: PyQt5.QtCore.QAbstractItemModel

A tree model for display of known coordinate reference systems.

New in version 3.34.

QgsCoordinateReferenceSystemModel(parent: QObject = None) Constructor for QgsCoordinateReferenceSystemModel, with the specified parent object.

Methods

addCustomCrs

Adds a custom crs to the model.

authIdToIndex

Retrieves the model index corresponding to a CRS with the specified authId.

beginInsertColumns

beginInsertRows

beginMoveColumns

beginMoveRows

beginRemoveColumns

beginRemoveRows

beginResetModel

changePersistentIndex

changePersistentIndexList

childEvent

columnCount

rtype:

int

connectNotify

createIndex

customEvent

data

param index:

decodeData

disconnectNotify

encodeData

endInsertColumns

endInsertRows

endMoveColumns

endMoveRows

endRemoveColumns

endRemoveRows

endResetModel

flags

param index:

headerData

param section:

index

param row:

isSignalConnected

parent

param index:

persistentIndexList

receivers

resetInternalData

rowCount

param parent:

sender

senderSignalIndex

timerEvent

Attributes

RoleAuthId

RoleDeprecated

RoleGroupId

RoleName

RoleNodeType

RoleProj

RoleType

RoleWkt

RoleAuthId = 258
RoleDeprecated = 259
RoleGroupId = 261
RoleName = 257
RoleNodeType = 256
RoleProj = 263
RoleType = 260
RoleWkt = 262
class Roles

Bases: int

addCustomCrs(self, crs: QgsCoordinateReferenceSystem) QModelIndex

Adds a custom crs to the model.

This method can be used to add CRS which aren’t present in either the standard PROJ SRS database or the user’s custom CRS database to the model.

Parameters:

crs (QgsCoordinateReferenceSystem) –

Return type:

QModelIndex

authIdToIndex(self, authId: str) QModelIndex

Retrieves the model index corresponding to a CRS with the specified authId.

Returns an invalid index if the CRS was not found.

Parameters:

authId (str) –

Return type:

QModelIndex

beginInsertColumns(self, QModelIndex, int, int)
beginInsertRows(self, QModelIndex, int, int)
beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) bool
beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) bool
beginRemoveColumns(self, QModelIndex, int, int)
beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
childEvent(self, QChildEvent)
columnCount(self, QModelIndex=QModelIndex()) int
Return type:

int

connectNotify(self, QMetaMethod)
createIndex(self, int, int, object: object = 0) QModelIndex
customEvent(self, QEvent)
data(self, index: QModelIndex, role: int) Any
Parameters:
  • index (QModelIndex) –

  • role (int) –

Return type:

Any

decodeData(self, int, int, QModelIndex, QDataStream) bool
disconnectNotify(self, QMetaMethod)
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
flags(self, index: QModelIndex) Qt.ItemFlags
Parameters:

index (QModelIndex) –

Return type:

Qt.ItemFlags

headerData(self, section: int, orientation: Qt.Orientation, role: int) Any
Parameters:
  • section (int) –

  • orientation (Qt.Orientation) –

  • role (int) –

Return type:

Any

index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) QModelIndex
Parameters:
  • row (int) –

  • column (int) –

  • parent (QModelIndex = QModelIndex()) –

Return type:

QModelIndex

isSignalConnected(self, QMetaMethod) bool
parent(self, index: QModelIndex) QModelIndex
Parameters:

index (QModelIndex) –

Return type:

QModelIndex

persistentIndexList(self) List[QModelIndex]
receivers(self, PYQT_SIGNAL) int
resetInternalData(self)
rowCount(self, parent: QModelIndex = QModelIndex()) int
Parameters:

parent (QModelIndex = QModelIndex()) –

Return type:

int

sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)