-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
2,278 additions
and
1,049 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,112 @@ | ||
class QgsProjectionSelectionDialog : QDialog //, private Ui::QgsGenericProjectionSelectorBase | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsprojectionselectiondialog.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsProjectionSelectionDialog : QDialog | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsprojectionselectiondialog.h> | ||
%Docstring | ||
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: | ||
\code | ||
QgsProjectionSelectionDialog mySelector( mQGisIface->mainWindow() ); | ||
mySelector.setCrs( crs ); | ||
if ( mySelector.exec() ) | ||
{ | ||
mCrs = mySelector.crs(); | ||
} | ||
\endcode | ||
|
||
If you wish to embed the projection selector into an existing dialog | ||
the you probably want to look at QgsProjectionSelectionWidget instead. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsprojectionselectiondialog.h" | ||
%End | ||
public: | ||
/** | ||
* Constructor | ||
*/ | ||
|
||
QgsProjectionSelectionDialog( QWidget *parent /TransferThis/ = 0, | ||
const Qt::WindowFlags &fl = QgsGuiUtils::ModalDialogFlags ); | ||
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ); | ||
%Docstring | ||
Constructor for QgsProjectionSelectionDialog. | ||
%End | ||
|
||
|
||
//! Destructor | ||
~QgsProjectionSelectionDialog(); | ||
|
||
QgsCoordinateReferenceSystem crs() const; | ||
%Docstring | ||
Returns the CRS currently selected in the widget. | ||
.. versionadded:: 3.0 | ||
.. seealso:: setCrs() | ||
:rtype: QgsCoordinateReferenceSystem | ||
%End | ||
|
||
void setMessage( const QString &message ); | ||
%Docstring | ||
Sets a ``message`` to show in the dialog. If an empty string is | ||
passed, the message will be a generic | ||
'define the CRS for this layer'. | ||
%End | ||
|
||
void setShowNoProjection( bool show ); | ||
%Docstring | ||
Sets whether a "no/invalid" projection option should be shown. If this | ||
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem. | ||
.. seealso:: showNoProjection() | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
bool showNoProjection() const; | ||
%Docstring | ||
Returns whether the "no/invalid" projection option is shown. If this | ||
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem. | ||
.. versionadded:: 3.0 | ||
.. seealso:: setShowNoProjection() | ||
:rtype: bool | ||
%End | ||
|
||
public slots: | ||
|
||
|
||
void setCrs( const QgsCoordinateReferenceSystem &crs ); | ||
%Docstring | ||
Sets the initial ``crs`` to show within the dialog. | ||
.. versionadded:: 3.0 | ||
.. seealso:: crs() | ||
%End | ||
|
||
/** | ||
* \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. | ||
* | ||
* \warning This function's behavior is undefined if it is called after the dialog is shown. | ||
*/ | ||
void setOgcWmsCrsFilter( const QSet<QString> &crsFilter ); | ||
%Docstring | ||
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. | ||
|
||
\warning This function's behavior is undefined if it is called after the dialog is shown. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsprojectionselectiondialog.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,136 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsprojectionselectiontreewidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsProjectionSelectionTreeWidget : QWidget | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsprojectionselectiontreewidget.h> | ||
%Docstring | ||
A widget for selecting a coordinate reference system from a tree. | ||
|
||
This widget implements a tree view of projections, as seen in the | ||
QgsProjectionSelectionDialog dialog. In most cases it is more | ||
suitable to use the compact QgsProjectionSelectionWidget widget. | ||
|
||
.. seealso:: QgsProjectionSelectionDialog. | ||
.. seealso:: QgsProjectionSelectionWidget | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsprojectionselectiontreewidget.h" | ||
%End | ||
public: | ||
|
||
QgsProjectionSelectionTreeWidget( QWidget *parent /TransferThis/ = 0 ); | ||
%Docstring | ||
Constructor for QgsProjectionSelectionTreeWidget. | ||
%End | ||
|
||
~QgsProjectionSelectionTreeWidget(); | ||
|
||
QgsCoordinateReferenceSystem crs() const; | ||
%Docstring | ||
Returns the CRS currently selected in the widget. | ||
.. versionadded:: 3.0 | ||
.. seealso:: setCrs() | ||
:rtype: QgsCoordinateReferenceSystem | ||
%End | ||
|
||
void setShowNoProjection( bool show ); | ||
%Docstring | ||
Sets whether a "no/invalid" projection option should be shown. If this | ||
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem. | ||
.. seealso:: showNoProjection() | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
bool showNoProjection() const; | ||
%Docstring | ||
Returns whether the "no/invalid" projection option is shown. If this | ||
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem. | ||
.. versionadded:: 3.0 | ||
.. seealso:: setShowNoProjection() | ||
:rtype: bool | ||
%End | ||
|
||
bool hasValidSelection() const; | ||
%Docstring | ||
Returns true if the current selection in the widget is a valid choice. Valid | ||
selections include any projection and also the "no/invalid projection" option | ||
(if setShowNoProjection() was called). Invalid selections are the group | ||
headers (such as "Geographic Coordinate Systems" | ||
:rtype: bool | ||
%End | ||
|
||
public slots: | ||
|
||
void setCrs( const QgsCoordinateReferenceSystem &crs ); | ||
%Docstring | ||
Sets the initial ``crs`` to show within the dialog. | ||
.. versionadded:: 3.0 | ||
.. seealso:: crs() | ||
%End | ||
|
||
void setOgcWmsCrsFilter( const QSet<QString> &crsFilter ); | ||
%Docstring | ||
filters this widget by the given CRSs | ||
|
||
Sets this widget 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. | ||
|
||
\warning This function's behavior is undefined if it is called after the widget is shown. | ||
%End | ||
|
||
void pushProjectionToFront(); | ||
%Docstring | ||
Marks the current selected projection for push to front of recent projections list. | ||
%End | ||
|
||
signals: | ||
|
||
void crsSelected(); | ||
%Docstring | ||
Emitted when a projection is selected in the widget. | ||
%End | ||
|
||
void initialized(); | ||
%Docstring | ||
Notifies others that the widget is now fully initialized, including deferred selection of projection. | ||
.. versionadded:: 2.4 | ||
%End | ||
|
||
void projectionDoubleClicked(); | ||
%Docstring | ||
Emitted when a projection is double clicked in the list. | ||
.. versionadded:: 2.14 | ||
%End | ||
|
||
protected: | ||
void showEvent( QShowEvent *event ); | ||
virtual void showEvent( QShowEvent *event ); | ||
|
||
|
||
virtual void resizeEvent( QResizeEvent *event ); | ||
|
||
|
||
void resizeEvent( QResizeEvent *event ); | ||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/qgsprojectionselectiontreewidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.