QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>

Public Slots

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

Public Member Functions

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

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.

Constructor & Destructor Documentation

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

Constructor.

QgsGenericProjectionSelector::~QgsGenericProjectionSelector ( )

Destructor.

Member Function Documentation

void QgsGenericProjectionSelector::on_buttonBox_helpRequested ( )
inlineslot
QString QgsGenericProjectionSelector::selectedAuthId ( )
slot
long QgsGenericProjectionSelector::selectedCrsId ( )
slot
void QgsGenericProjectionSelector::setMessage ( QString  theMessage = "")
slot

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

void QgsGenericProjectionSelector::setOgcWmsCrsFilter ( QSet< QString >  crsFilter)
slot

filters this dialog by the given CRSs

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

Parameters
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.
Warning
This function's behaviour is undefined if it is called after the dialog is shown.
void QgsGenericProjectionSelector::setSelectedAuthId ( QString  authId)
slot
void QgsGenericProjectionSelector::setSelectedCrsId ( long  theID)
slot
void QgsGenericProjectionSelector::setSelectedCrsName ( QString  theName)
slot

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