QGIS API Documentation  2.99.0-Master (0a63d1f)
Public Slots | Public Member Functions | List of all members
QgsGenericProjectionSelector Class Reference

A generic dialog to prompt the user for a Coordinate Reference System. More...

#include <qgsgenericprojectionselector.h>

Inheritance diagram for QgsGenericProjectionSelector:
Inheritance graph

Public Slots

void on_mButtonBox_helpRequested ()
QString selectedAuthId ()
long selectedCrsId ()
void setMessage (QString theMessage=QStringLiteral(""))
 If no parameter is passed, the message will be a generic 'define the CRS for this layer'. More...
void setOgcWmsCrsFilter (const QSet< QString > &crsFilter)
 filters this dialog by the given CRSs More...
void setSelectedAuthId (const QString &authId)
void setSelectedCrsId (long theID)
void setSelectedCrsName (const QString &theName)

Public Member Functions

 QgsGenericProjectionSelector (QWidget *parent=nullptr, Qt::WindowFlags fl=QgisGui::ModalDialogFlags)
 Constructor. More...
 ~QgsGenericProjectionSelector ()

Detailed Description

A generic dialog to prompt the user for a Coordinate Reference System.

Typically you will use this when you want to prompt the user for a coordinate system identifier e.g. from a plugin you might do this to get an epsg code:

QgsGenericProjectionSelector mySelector( mQGisIface->mainWindow() );
mySelector.setSelectedEpsg( mEpsgId );
if ( mySelector.exec() )
mEpsgId = mySelector.selectedEpsg();

If you wish to embed the projection selector into an existing dialog the you probably want to look at QgsProjectionSelector rather.

Definition at line 48 of file qgsgenericprojectionselector.h.

Constructor & Destructor Documentation

◆ QgsGenericProjectionSelector()

QgsGenericProjectionSelector::QgsGenericProjectionSelector ( QWidget *  parent = nullptr,
Qt::WindowFlags  fl = QgisGui::ModalDialogFlags 


Definition at line 28 of file qgsgenericprojectionselector.cpp.

◆ ~QgsGenericProjectionSelector()

QgsGenericProjectionSelector::~QgsGenericProjectionSelector ( )

Definition at line 65 of file qgsgenericprojectionselector.cpp.

Member Function Documentation

◆ on_mButtonBox_helpRequested

void QgsGenericProjectionSelector::on_mButtonBox_helpRequested ( )

Definition at line 75 of file qgsgenericprojectionselector.h.

◆ selectedAuthId

QString QgsGenericProjectionSelector::selectedAuthId ( )

Definition at line 92 of file qgsgenericprojectionselector.cpp.

◆ selectedCrsId

long QgsGenericProjectionSelector::selectedCrsId ( )

Definition at line 86 of file qgsgenericprojectionselector.cpp.

◆ setMessage

void QgsGenericProjectionSelector::setMessage ( QString  theMessage = QStringLiteral( "" ))

If no parameter is passed, the message will be a generic 'define the CRS for this layer'.

Definition at line 44 of file qgsgenericprojectionselector.cpp.

◆ setOgcWmsCrsFilter

void QgsGenericProjectionSelector::setOgcWmsCrsFilter ( const QSet< QString > &  crsFilter)

filters this dialog by the given CRSs

Sets this dialog to filter the available projections to those listed by the given Coordinate Reference Systems.

crsFiltera list of OGC Coordinate Reference Systems to filter the list of projections by. This is useful in (e.g.) WMS situations where you just want to offer what the WMS server can support.
This function's behavior is undefined if it is called after the dialog is shown.

Definition at line 97 of file qgsgenericprojectionselector.cpp.

◆ setSelectedAuthId

void QgsGenericProjectionSelector::setSelectedAuthId ( const QString &  authId)

Definition at line 81 of file qgsgenericprojectionselector.cpp.

◆ setSelectedCrsId

void QgsGenericProjectionSelector::setSelectedCrsId ( long  theID)

Definition at line 76 of file qgsgenericprojectionselector.cpp.

◆ setSelectedCrsName

void QgsGenericProjectionSelector::setSelectedCrsName ( const QString &  theName)

Definition at line 71 of file qgsgenericprojectionselector.cpp.

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