2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
/**
|
2008-08-07 00:16:37 +00:00
|
|
|
* \class QgsGenericProjectionSelector
|
|
|
|
* \brief A generic dialog to prompt the user for a Coordinate Reference System
|
2007-01-09 02:39:15 +00:00
|
|
|
*/
|
2008-08-07 00:16:37 +00:00
|
|
|
class QgsGenericProjectionSelector : QDialog //, private Ui::QgsGenericProjectionSelectorBase
|
2007-01-09 02:39:15 +00:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
2008-08-07 00:16:37 +00:00
|
|
|
#include <qgsgenericprojectionselector.h>
|
2007-01-09 02:39:15 +00:00
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
2008-08-07 00:16:37 +00:00
|
|
|
QgsGenericProjectionSelector(QWidget *parent = 0,
|
2007-01-09 02:39:15 +00:00
|
|
|
Qt::WFlags fl = QgisGui::ModalDialogFlags);
|
|
|
|
|
|
|
|
//! Destructor
|
2008-08-07 00:16:37 +00:00
|
|
|
~QgsGenericProjectionSelector();
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
public slots:
|
2008-08-07 00:16:37 +00:00
|
|
|
/** If no paramter is passed, the message will be a generic
|
|
|
|
* 'define the CRS for this layer'.
|
|
|
|
*/
|
|
|
|
void setMessage(QString theMessage="");
|
|
|
|
|
2008-08-31 16:56:09 +00:00
|
|
|
QString selectedProj4String();
|
|
|
|
long selectedCrsId();
|
|
|
|
long selectedEpsg();
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2008-08-31 16:56:09 +00:00
|
|
|
void setSelectedCrsName(QString theName);
|
|
|
|
void setSelectedCrsId(long theID);
|
2008-08-07 00:16:37 +00:00
|
|
|
void setSelectedEpsg(long theID);
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief filters this dialog by the given CRSs
|
|
|
|
*
|
|
|
|
* Sets this dialog to filter the available projections to those listed
|
|
|
|
* by the given Coordinate Reference Systems.
|
|
|
|
*
|
|
|
|
* \param crsFilter a 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.
|
|
|
|
*
|
2008-10-16 06:31:25 +00:00
|
|
|
* \note This function only deals with EpsgCrsId labels only at this time.
|
2007-01-09 02:39:15 +00:00
|
|
|
*
|
|
|
|
* \warning This function's behaviour is undefined if it is called after the dialog is shown.
|
|
|
|
*/
|
2008-01-09 23:20:31 +00:00
|
|
|
void setOgcWmsCrsFilter(QSet<QString> crsFilter);
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|