|
1 |
| -class QgsProjectionSelectionDialog : QDialog //, private Ui::QgsGenericProjectionSelectorBase |
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/gui/qgsprojectionselectiondialog.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +class QgsProjectionSelectionDialog : QDialog |
2 | 14 | {
|
3 |
| -%TypeHeaderCode |
4 |
| -#include <qgsprojectionselectiondialog.h> |
| 15 | +%Docstring |
| 16 | + A generic dialog to prompt the user for a Coordinate Reference System. |
| 17 | + |
| 18 | + Typically you will use this when you want to prompt the user for |
| 19 | + a coordinate system identifier e.g. from a plugin you might do this |
| 20 | + to get an epsg code: |
| 21 | + \code |
| 22 | + QgsProjectionSelectionDialog mySelector( mQGisIface->mainWindow() ); |
| 23 | + mySelector.setCrs( crs ); |
| 24 | + if ( mySelector.exec() ) |
| 25 | + { |
| 26 | + mCrs = mySelector.crs(); |
| 27 | + } |
| 28 | + \endcode |
| 29 | + |
| 30 | + If you wish to embed the projection selector into an existing dialog |
| 31 | + the you probably want to look at QgsProjectionSelectionWidget instead. |
| 32 | +.. versionadded:: 3.0 |
5 | 33 | %End
|
6 | 34 |
|
| 35 | +%TypeHeaderCode |
| 36 | +#include "qgsprojectionselectiondialog.h" |
| 37 | +%End |
7 | 38 | public:
|
8 |
| - /** |
9 |
| - * Constructor |
10 |
| - */ |
| 39 | + |
11 | 40 | QgsProjectionSelectionDialog( QWidget *parent /TransferThis/ = 0,
|
12 |
| - const Qt::WindowFlags &fl = QgsGuiUtils::ModalDialogFlags ); |
| 41 | + Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ); |
| 42 | +%Docstring |
| 43 | + Constructor for QgsProjectionSelectionDialog. |
| 44 | +%End |
| 45 | + |
13 | 46 |
|
14 |
| - //! Destructor |
15 | 47 | ~QgsProjectionSelectionDialog();
|
16 | 48 |
|
17 | 49 | QgsCoordinateReferenceSystem crs() const;
|
| 50 | +%Docstring |
| 51 | + Returns the CRS currently selected in the widget. |
| 52 | +.. versionadded:: 3.0 |
| 53 | +.. seealso:: setCrs() |
| 54 | + :rtype: QgsCoordinateReferenceSystem |
| 55 | +%End |
18 | 56 |
|
19 | 57 | void setMessage( const QString &message );
|
| 58 | +%Docstring |
| 59 | + Sets a ``message`` to show in the dialog. If an empty string is |
| 60 | + passed, the message will be a generic |
| 61 | + 'define the CRS for this layer'. |
| 62 | +%End |
20 | 63 |
|
21 | 64 | void setShowNoProjection( bool show );
|
| 65 | +%Docstring |
| 66 | + Sets whether a "no/invalid" projection option should be shown. If this |
| 67 | + option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem. |
| 68 | +.. seealso:: showNoProjection() |
| 69 | +.. versionadded:: 3.0 |
| 70 | +%End |
22 | 71 |
|
23 | 72 | bool showNoProjection() const;
|
| 73 | +%Docstring |
| 74 | + Returns whether the "no/invalid" projection option is shown. If this |
| 75 | + option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem. |
| 76 | +.. versionadded:: 3.0 |
| 77 | +.. seealso:: setShowNoProjection() |
| 78 | + :rtype: bool |
| 79 | +%End |
24 | 80 |
|
25 | 81 | public slots:
|
26 | 82 |
|
27 |
| - |
28 | 83 | void setCrs( const QgsCoordinateReferenceSystem &crs );
|
| 84 | +%Docstring |
| 85 | + Sets the initial ``crs`` to show within the dialog. |
| 86 | +.. versionadded:: 3.0 |
| 87 | +.. seealso:: crs() |
| 88 | +%End |
29 | 89 |
|
30 |
| - /** |
31 |
| - * \brief filters this dialog by the given CRSs |
32 |
| - * |
33 |
| - * Sets this dialog to filter the available projections to those listed |
34 |
| - * by the given Coordinate Reference Systems. |
35 |
| - * |
36 |
| - * \param crsFilter a list of OGC Coordinate Reference Systems to filter the |
37 |
| - * list of projections by. This is useful in (e.g.) WMS situations |
38 |
| - * where you just want to offer what the WMS server can support. |
39 |
| - * |
40 |
| - * \warning This function's behavior is undefined if it is called after the dialog is shown. |
41 |
| - */ |
42 | 90 | void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
|
| 91 | +%Docstring |
| 92 | + filters this dialog by the given CRSs |
| 93 | + |
| 94 | + Sets this dialog to filter the available projections to those listed |
| 95 | + by the given Coordinate Reference Systems. |
| 96 | + |
| 97 | + \param crsFilter a list of OGC Coordinate Reference Systems to filter the |
| 98 | + list of projections by. This is useful in (e.g.) WMS situations |
| 99 | + where you just want to offer what the WMS server can support. |
| 100 | + |
| 101 | + \warning This function's behavior is undefined if it is called after the dialog is shown. |
| 102 | +%End |
| 103 | + |
43 | 104 | };
|
| 105 | + |
| 106 | +/************************************************************************ |
| 107 | + * This file has been generated automatically from * |
| 108 | + * * |
| 109 | + * src/gui/qgsprojectionselectiondialog.h * |
| 110 | + * * |
| 111 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 112 | + ************************************************************************/ |
0 commit comments