QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Types | Public Member Functions | List of all members
QgsCoordinateReferenceSystemProxyModel Class Reference

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

#include <qgscoordinatereferencesystemmodel.h>

Inheritance diagram for QgsCoordinateReferenceSystemProxyModel:
Inheritance graph
[legend]

Public Types

enum  Filter { FilterHorizontal = 1 << 1 , FilterVertical = 1 << 2 , FilterCompound = 1 << 3 }
 Available filter flags for filtering the model. More...
 
typedef QFlags< FilterFilters
 

Public Member Functions

 QgsCoordinateReferenceSystemProxyModel (QObject *parent=nullptr)
 Constructor for QgsCoordinateReferenceSystemProxyModel, with the given parent object. More...
 
QgsCoordinateReferenceSystemModelcoordinateReferenceSystemModel ()
 Returns the underlying source model. More...
 
const QgsCoordinateReferenceSystemModelcoordinateReferenceSystemModel () const
 Returns the underlying source model. More...
 
bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
 
QSet< QString > filterAuthIds () const
 Returns the current filter list of auth ID strings, if set. More...
 
bool filterDeprecated () const
 Returns whether deprecated CRS will be filtered from the results. More...
 
Filters filters () const
 Returns any filters that affect how CRS are filtered. More...
 
QString filterString () const
 Returns the current filter string, if set. More...
 
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override
 
void setFilterAuthIds (const QSet< QString > &filter)
 Sets a filter list of CRS auth ID strings, such that only coordinate reference systems matching the specified auth IDs will be shown. More...
 
void setFilterDeprecated (bool filter)
 Sets whether deprecated CRS should be filtered from the results. More...
 
void setFilters (QgsCoordinateReferenceSystemProxyModel::Filters filters)
 Set filters that affect how CRS are filtered. More...
 
void setFilterString (const QString &filter)
 Sets a filter string, such that only coordinate reference systems matching the specified string will be shown. More...
 

Detailed Description

A sort/filter proxy model for coordinate reference systems.

Since
QGIS 3.34

Definition at line 309 of file qgscoordinatereferencesystemmodel.h.

Member Typedef Documentation

◆ Filters

Definition at line 322 of file qgscoordinatereferencesystemmodel.h.

Member Enumeration Documentation

◆ Filter

Available filter flags for filtering the model.

Enumerator
FilterHorizontal 

Include horizontal CRS (excludes compound CRS containing a horizontal component)

FilterVertical 

Include vertical CRS (excludes compound CRS containing a vertical component)

FilterCompound 

Include compound CRS.

Definition at line 316 of file qgscoordinatereferencesystemmodel.h.

Constructor & Destructor Documentation

◆ QgsCoordinateReferenceSystemProxyModel()

QgsCoordinateReferenceSystemProxyModel::QgsCoordinateReferenceSystemProxyModel ( QObject *  parent = nullptr)
explicit

Constructor for QgsCoordinateReferenceSystemProxyModel, with the given parent object.

Definition at line 588 of file qgscoordinatereferencesystemmodel.cpp.

Member Function Documentation

◆ coordinateReferenceSystemModel() [1/2]

QgsCoordinateReferenceSystemModel * QgsCoordinateReferenceSystemProxyModel::coordinateReferenceSystemModel ( )

Returns the underlying source model.

Definition at line 600 of file qgscoordinatereferencesystemmodel.cpp.

◆ coordinateReferenceSystemModel() [2/2]

const QgsCoordinateReferenceSystemModel * QgsCoordinateReferenceSystemProxyModel::coordinateReferenceSystemModel ( ) const

Returns the underlying source model.

Note
Not available in Python bindings

Definition at line 605 of file qgscoordinatereferencesystemmodel.cpp.

◆ filterAcceptsRow()

bool QgsCoordinateReferenceSystemProxyModel::filterAcceptsRow ( int  sourceRow,
const QModelIndex &  sourceParent 
) const
override

Definition at line 648 of file qgscoordinatereferencesystemmodel.cpp.

◆ filterAuthIds()

QSet< QString > QgsCoordinateReferenceSystemProxyModel::filterAuthIds ( ) const
inline

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

See also
setFilterString()

Definition at line 381 of file qgscoordinatereferencesystemmodel.h.

◆ filterDeprecated()

bool QgsCoordinateReferenceSystemProxyModel::filterDeprecated ( ) const
inline

Returns whether deprecated CRS will be filtered from the results.

See also
setFilterDeprecated()

Definition at line 395 of file qgscoordinatereferencesystemmodel.h.

◆ filters()

Filters QgsCoordinateReferenceSystemProxyModel::filters ( ) const
inline

Returns any filters that affect how CRS are filtered.

See also
setFilters()

Definition at line 351 of file qgscoordinatereferencesystemmodel.h.

◆ filterString()

QString QgsCoordinateReferenceSystemProxyModel::filterString ( ) const
inline

Returns the current filter string, if set.

See also
setFilterString()

Definition at line 366 of file qgscoordinatereferencesystemmodel.h.

◆ lessThan()

bool QgsCoordinateReferenceSystemProxyModel::lessThan ( const QModelIndex &  left,
const QModelIndex &  right 
) const
override

Definition at line 718 of file qgscoordinatereferencesystemmodel.cpp.

◆ setFilterAuthIds()

void QgsCoordinateReferenceSystemProxyModel::setFilterAuthIds ( const QSet< QString > &  filter)

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()

Definition at line 625 of file qgscoordinatereferencesystemmodel.cpp.

◆ setFilterDeprecated()

void QgsCoordinateReferenceSystemProxyModel::setFilterDeprecated ( bool  filter)

Sets whether deprecated CRS should be filtered from the results.

See also
filterDeprecated()

Definition at line 639 of file qgscoordinatereferencesystemmodel.cpp.

◆ setFilters()

void QgsCoordinateReferenceSystemProxyModel::setFilters ( QgsCoordinateReferenceSystemProxyModel::Filters  filters)

Set filters that affect how CRS are filtered.

See also
filters()

Definition at line 610 of file qgscoordinatereferencesystemmodel.cpp.

◆ setFilterString()

void QgsCoordinateReferenceSystemProxyModel::setFilterString ( const QString &  filter)

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

See also
filterString()

Definition at line 619 of file qgscoordinatereferencesystemmodel.cpp.


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