2017-06-08 11:26:03 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsprojectionselectiontreewidget.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-16 10:40:05 +10:00
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
class QgsProjectionSelectionTreeWidget : QWidget
|
|
|
|
{
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A widget for selecting a coordinate reference system from a tree.
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
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.
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:class:`QgsProjectionSelectionDialog`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:class:`QgsProjectionSelectionWidget`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 3.0
|
2017-02-27 16:58:04 +10:00
|
|
|
%End
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsprojectionselectiontreewidget.h"
|
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
public:
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsProjectionSelectionTreeWidget( QWidget *parent /TransferThis/ = 0 );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsProjectionSelectionTreeWidget.
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
|
|
|
|
~QgsProjectionSelectionTreeWidget();
|
|
|
|
|
|
|
|
QgsCoordinateReferenceSystem crs() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the CRS currently selected in the widget.
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 3.0
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCrs`
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
|
2017-03-01 10:14:37 +10:00
|
|
|
void setShowNoProjection( bool show );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether a "no/invalid" projection option should be shown. If this
|
2017-12-19 11:43:52 -04:00
|
|
|
option is selected, calling crs() will return an invalid :py:class:`QgsCoordinateReferenceSystem`.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`showNoProjection`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 3.0
|
2017-10-16 10:40:05 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setShowBoundsMap( bool show );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether to show the bounnds preview map.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`showBoundsMap`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-10-16 10:40:05 +10:00
|
|
|
.. versionadded:: 3.0
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-03-01 10:14:37 +10:00
|
|
|
|
|
|
|
bool showNoProjection() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns whether the "no/invalid" projection option is shown. If this
|
2017-12-19 11:43:52 -04:00
|
|
|
option is selected, calling crs() will return an invalid :py:class:`QgsCoordinateReferenceSystem`.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 3.0
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setShowNoProjection`
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-03-01 10:14:37 +10:00
|
|
|
|
2017-10-16 10:40:05 +10:00
|
|
|
bool showBoundsMap() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns whether the bounds preview map is shown.
|
|
|
|
|
2017-10-16 10:40:05 +10:00
|
|
|
.. versionadded:: 3.0
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setShowBoundsMap`
|
2017-10-16 10:40:05 +10:00
|
|
|
%End
|
|
|
|
|
2017-03-01 10:14:37 +10:00
|
|
|
bool hasValidSelection() const;
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
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"
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-03-01 10:14:37 +10:00
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
public slots:
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setCrs( const QgsCoordinateReferenceSystem &crs );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the initial ``crs`` to show within the dialog.
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 3.0
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`crs`
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
|
|
|
|
2017-10-16 10:40:05 +10:00
|
|
|
void setPreviewRect( const QgsRectangle &rect );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the initial "preview" rectangle for the bounds overview map.
|
|
|
|
|
2017-10-16 10:40:05 +10:00
|
|
|
.. versionadded:: 3.0
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`previewRect`
|
2017-10-16 10:40:05 +10:00
|
|
|
%End
|
|
|
|
|
2017-10-16 10:59:14 +10:00
|
|
|
QgsRectangle previewRect() const;
|
2017-10-16 10:40:05 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
The initial "preview" rectangle for the bounds overview map.
|
|
|
|
|
2017-10-16 10:40:05 +10:00
|
|
|
.. versionadded:: 3.0
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`previewRect`
|
2017-10-16 10:40:05 +10:00
|
|
|
%End
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
|
|
|
filters this widget by the given CRSs
|
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets this widget to filter the available projections to those listed
|
|
|
|
by the given Coordinate Reference Systems.
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
: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.
|
2017-06-08 11:26:03 +02:00
|
|
|
|
2017-12-23 14:30:08 +10:00
|
|
|
.. warning::
|
|
|
|
|
|
|
|
This function's behavior is undefined if it is called after the widget is shown.
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
void pushProjectionToFront();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Marks the current selected projection for push to front of recent projections list.
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void crsSelected();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Emitted when a projection is selected in the widget.
|
2017-06-08 11:26:03 +02:00
|
|
|
%End
|
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
void initialized();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Notifies others that the widget is now fully initialized, including deferred selection of projection.
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 2.4
|
|
|
|
%End
|
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
void projectionDoubleClicked();
|
2017-06-08 11:26:03 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Emitted when a projection is double clicked in the list.
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
.. versionadded:: 2.14
|
|
|
|
%End
|
2017-02-27 16:58:04 +10:00
|
|
|
|
|
|
|
protected:
|
2017-06-08 11:26:03 +02:00
|
|
|
virtual void showEvent( QShowEvent *event );
|
|
|
|
|
|
|
|
|
|
|
|
virtual void resizeEvent( QResizeEvent *event );
|
|
|
|
|
2017-02-27 16:58:04 +10:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-06-08 11:26:03 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsprojectionselectiontreewidget.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|