QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsRecentCoordinateReferenceSystemsModel Class Reference

A model for display of recently used coordinate reference systems. More...

#include <qgsrecentcoordinatereferencesystemsmodel.h>

Inheritance diagram for QgsRecentCoordinateReferenceSystemsModel:

Public Types

enum class  CustomRole : int { Crs = Qt::UserRole , AuthId }
 Custom model roles. More...

Public Member Functions

 QgsRecentCoordinateReferenceSystemsModel (QObject *parent=nullptr, int subclassColumnCount=1)
 Constructor for QgsRecentCoordinateReferenceSystemsModel, with the specified parent object.
int columnCount (const QModelIndex &=QModelIndex()) const override
QgsCoordinateReferenceSystem crs (const QModelIndex &index) const
 Returns the CRS for the corresponding index.
QVariant data (const QModelIndex &index, int role) const override
Qt::ItemFlags flags (const QModelIndex &index) const override
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
QModelIndex parent (const QModelIndex &index) const override
int rowCount (const QModelIndex &parent=QModelIndex()) const override

Detailed Description

A model for display of recently used coordinate reference systems.

Since
QGIS 3.36

Definition at line 37 of file qgsrecentcoordinatereferencesystemsmodel.h.

Member Enumeration Documentation

◆ CustomRole

Custom model roles.

Enumerator
Crs 

Coordinate reference system.

AuthId 

CRS authority ID.

Definition at line 47 of file qgsrecentcoordinatereferencesystemsmodel.h.

Constructor & Destructor Documentation

◆ QgsRecentCoordinateReferenceSystemsModel()

QgsRecentCoordinateReferenceSystemsModel::QgsRecentCoordinateReferenceSystemsModel ( QObject * parent = nullptr,
int subclassColumnCount = 1 )

Constructor for QgsRecentCoordinateReferenceSystemsModel, with the specified parent object.

Definition at line 30 of file qgsrecentcoordinatereferencesystemsmodel.cpp.

Member Function Documentation

◆ columnCount()

int QgsRecentCoordinateReferenceSystemsModel::columnCount ( const QModelIndex & = QModelIndex()) const
override

Definition at line 90 of file qgsrecentcoordinatereferencesystemsmodel.cpp.

◆ crs()

QgsCoordinateReferenceSystem QgsRecentCoordinateReferenceSystemsModel::crs ( const QModelIndex & index) const

Returns the CRS for the corresponding index.

Returns an invalid CRS if the index is not valid.

Definition at line 108 of file qgsrecentcoordinatereferencesystemsmodel.cpp.

◆ data()

QVariant QgsRecentCoordinateReferenceSystemsModel::data ( const QModelIndex & index,
int role ) const
override

Definition at line 54 of file qgsrecentcoordinatereferencesystemsmodel.cpp.

◆ flags()

Qt::ItemFlags QgsRecentCoordinateReferenceSystemsModel::flags ( const QModelIndex & index) const
override

Definition at line 44 of file qgsrecentcoordinatereferencesystemsmodel.cpp.

◆ index()

QModelIndex QgsRecentCoordinateReferenceSystemsModel::index ( int row,
int column,
const QModelIndex & parent = QModelIndex() ) const
override

Definition at line 95 of file qgsrecentcoordinatereferencesystemsmodel.cpp.

◆ parent()

QModelIndex QgsRecentCoordinateReferenceSystemsModel::parent ( const QModelIndex & index) const
override

◆ rowCount()

int QgsRecentCoordinateReferenceSystemsModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
override

Definition at line 82 of file qgsrecentcoordinatereferencesystemsmodel.cpp.


The documentation for this class was generated from the following files: