mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			230 lines
		
	
	
		
			5.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			230 lines
		
	
	
		
			5.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/gui/proj/qgsprojectionselectionwidget.h                          *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsProjectionSelectionWidget : QWidget
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| A widget for selecting a projection.
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsprojectionselectionwidget.h"
 | |
| %End
 | |
|   public:
 | |
| 
 | |
|     enum CrsOption /BaseType=IntEnum/
 | |
|     {
 | |
|       Invalid,
 | |
|       LayerCrs,
 | |
|       ProjectCrs,
 | |
|       CurrentCrs,
 | |
|       DefaultCrs,
 | |
|       RecentCrs,
 | |
|       CrsNotSet,
 | |
|     };
 | |
| 
 | |
| 
 | |
|     explicit QgsProjectionSelectionWidget( QWidget *parent /TransferThis/ = 0,
 | |
|                                            QgsCoordinateReferenceSystemProxyModel::Filters filters = QgsCoordinateReferenceSystemProxyModel::FilterHorizontal | QgsCoordinateReferenceSystemProxyModel::FilterCompound );
 | |
| %Docstring
 | |
| Constructor for QgsProjectionSelectionWidget, with the specified ``parent`` widget.
 | |
| 
 | |
| Since QGIS 3.36, the optional ``filter`` argument can be used to specify filters on the systems
 | |
| shown in the widget. The default is to show all horizontal and compound CRS in order to match
 | |
| the behavior of older QGIS releases. The ``filter`` can be altered to also include vertical CRS if desired.
 | |
| %End
 | |
| 
 | |
|     QgsCoordinateReferenceSystem crs() const;
 | |
| %Docstring
 | |
| Returns the currently selected CRS for the widget
 | |
| 
 | |
| :return: current CRS
 | |
| %End
 | |
| 
 | |
|     void setOptionVisible( CrsOption option, bool visible );
 | |
| %Docstring
 | |
| Sets whether a predefined CRS option should be shown in the widget.
 | |
| 
 | |
| :param option: CRS option to show/hide
 | |
| :param visible: whether the option should be shown
 | |
| 
 | |
| .. seealso:: :py:func:`optionVisible`
 | |
| %End
 | |
| 
 | |
|     bool optionVisible( CrsOption option ) const;
 | |
| %Docstring
 | |
| Returns whether the specified CRS option is visible in the widget.
 | |
| 
 | |
| .. seealso:: :py:func:`setOptionVisible`
 | |
| %End
 | |
| 
 | |
|     void setNotSetText( const QString &text );
 | |
| %Docstring
 | |
| Sets the text to show for the not set option. Note that this option is not shown
 | |
| by default and must be set visible by calling :py:func:`~QgsProjectionSelectionWidget.setOptionVisible`.
 | |
| %End
 | |
| 
 | |
|     void setMessage( const QString &text );
 | |
| %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
 | |
| 
 | |
| 
 | |
|     bool showAccuracyWarnings() const;
 | |
| %Docstring
 | |
| Returns ``True`` if the widget will show a warning to users when they select a CRS which has
 | |
| low accuracy.
 | |
| 
 | |
| .. seealso:: :py:func:`setShowAccuracyWarnings`
 | |
| 
 | |
| .. versionadded:: 3.20
 | |
| %End
 | |
| 
 | |
|     void setShowAccuracyWarnings( bool show );
 | |
| %Docstring
 | |
| Sets whether the widget will ``show`` warnings to users when they select a CRS which has
 | |
| low accuracy.
 | |
| 
 | |
| .. seealso:: :py:func:`showAccuracyWarnings`
 | |
| 
 | |
| .. versionadded:: 3.20
 | |
| %End
 | |
| 
 | |
|     void setSourceEnsemble( const QString &ensemble );
 | |
| %Docstring
 | |
| Sets the original source ``ensemble`` datum name.
 | |
| 
 | |
| If set, CRS accuracy warnings will not be shown when the selected CRS in the widget has a matching
 | |
| ensemble datum, regardless of the ensemble's accuracy.
 | |
| 
 | |
| .. seealso:: :py:func:`sourceEnsemble`
 | |
| 
 | |
| .. versionadded:: 3.20
 | |
| %End
 | |
| 
 | |
|     QString sourceEnsemble() const;
 | |
| %Docstring
 | |
| Returns the original source ensemble datum name.
 | |
| 
 | |
| If set, CRS accuracy warnings will not be shown when the selected CRS in the widget has a matching
 | |
| ensemble datum, regardless of the ensemble's accuracy.
 | |
| 
 | |
| .. seealso:: :py:func:`setSourceEnsemble`
 | |
| 
 | |
| .. versionadded:: 3.20
 | |
| %End
 | |
| 
 | |
|     void setDialogTitle( const QString &title );
 | |
| %Docstring
 | |
| Sets the ``title`` for the CRS selector dialog window.
 | |
| 
 | |
| .. seealso:: :py:func:`dialogTitle`
 | |
| 
 | |
| .. versionadded:: 3.24
 | |
| %End
 | |
| 
 | |
|     QString dialogTitle() const;
 | |
| %Docstring
 | |
| Returns the title for the CRS selector dialog window.
 | |
| 
 | |
| .. seealso:: :py:func:`setDialogTitle`
 | |
| 
 | |
| .. versionadded:: 3.24
 | |
| %End
 | |
| 
 | |
|     void setFilter( const QList< QgsCoordinateReferenceSystem > &crses );
 | |
| %Docstring
 | |
| Sets a filtered list of CRSes to show in the widget.
 | |
| 
 | |
| .. versionadded:: 3.28
 | |
| %End
 | |
| 
 | |
|     QgsCoordinateReferenceSystemProxyModel::Filters filters() const;
 | |
| %Docstring
 | |
| Returns the filters set on the available CRS.
 | |
| 
 | |
| .. seealso:: :py:func:`setFilters`
 | |
| 
 | |
| .. versionadded:: 3.36
 | |
| %End
 | |
| 
 | |
|     void setFilters( QgsCoordinateReferenceSystemProxyModel::Filters filters );
 | |
| %Docstring
 | |
| Sets ``filters`` for the available CRS.
 | |
| 
 | |
| .. seealso:: :py:func:`filters`
 | |
| 
 | |
| .. versionadded:: 3.36
 | |
| %End
 | |
| 
 | |
|   signals:
 | |
| 
 | |
|     void crsChanged( const QgsCoordinateReferenceSystem & );
 | |
| %Docstring
 | |
| Emitted when the selected CRS is changed
 | |
| %End
 | |
| 
 | |
|     void cleared();
 | |
| %Docstring
 | |
| Emitted when the not set option is selected.
 | |
| %End
 | |
| 
 | |
|   public slots:
 | |
| 
 | |
|     void setCrs( const QgsCoordinateReferenceSystem &crs );
 | |
| %Docstring
 | |
| Sets the current CRS for the widget
 | |
| 
 | |
| :param crs: new CRS
 | |
| %End
 | |
| 
 | |
|     void setLayerCrs( const QgsCoordinateReferenceSystem &crs );
 | |
| %Docstring
 | |
| Sets the layer CRS for the widget. If set, this will be added as an option
 | |
| to the preset CRSes shown in the widget.
 | |
| 
 | |
| :param crs: layer CRS
 | |
| %End
 | |
| 
 | |
|     void selectCrs();
 | |
| %Docstring
 | |
| Opens the dialog for selecting a new CRS
 | |
| %End
 | |
| 
 | |
|   protected:
 | |
| 
 | |
|     virtual void dragEnterEvent( QDragEnterEvent *event );
 | |
| 
 | |
|     virtual void dragLeaveEvent( QDragLeaveEvent *event );
 | |
| 
 | |
|     virtual void dropEvent( QDropEvent *event );
 | |
| 
 | |
| 
 | |
| };
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/gui/proj/qgsprojectionselectionwidget.h                          *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | |
|  ************************************************************************/
 |