QGIS/python/gui/auto_generated/qgsextentgroupbox.sip.in

226 lines
6.3 KiB
Plaintext
Raw Normal View History

2017-05-23 14:44:34 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsextentgroupbox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsExtentGroupBox : QgsCollapsibleGroupBox
{
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Collapsible group box for configuration of extent, typically for a save operation.
2017-05-23 14:44:34 +02:00
2017-12-15 10:36:55 -04:00
Besides allowing the user to enter the extent manually, it comes with options to use
original extent or extent defined by the current view in map canvas.
2017-05-23 14:44:34 +02:00
When using the group box, make sure to call setOriginalExtent(), setCurrentExtent() and setOutputCrs() during initialization.
.. seealso:: :py:class:`QgsExtentWidget`
2017-05-23 14:44:34 +02:00
.. versionadded:: 2.4
%End
%TypeHeaderCode
2017-05-23 14:44:34 +02:00
#include "qgsextentgroupbox.h"
%End
public:
enum ExtentState
{
2017-05-23 14:44:34 +02:00
OriginalExtent,
CurrentExtent,
UserExtent,
ProjectLayerExtent,
DrawOnCanvas,
};
explicit QgsExtentGroupBox( QWidget *parent /TransferThis/ = 0 );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsExtentGroupBox.
%End
void setOriginalExtent( const QgsRectangle &originalExtent, const QgsCoordinateReferenceSystem &originalCrs );
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the original extent and coordinate reference system for the widget. This should be called as part of initialization.
.. seealso:: :py:func:`originalExtent`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`originalCrs`
2017-05-23 14:44:34 +02:00
%End
QgsRectangle originalExtent() const;
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the original extent set for the widget.
.. seealso:: :py:func:`setOriginalExtent`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`originalCrs`
2017-05-23 14:44:34 +02:00
%End
QgsCoordinateReferenceSystem originalCrs() const;
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the original coordinate reference system set for the widget.
.. seealso:: :py:func:`originalExtent`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setOriginalExtent`
2017-05-23 14:44:34 +02:00
%End
void setCurrentExtent( const QgsRectangle &currentExtent, const QgsCoordinateReferenceSystem &currentCrs );
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the current extent to show in the widget - should be called as part of initialization (or whenever current extent changes).
The current extent is usually set to match the current map canvas extent.
.. seealso:: :py:func:`currentExtent`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`currentCrs`
2017-05-23 14:44:34 +02:00
%End
QgsRectangle currentExtent() const;
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current extent set for the widget. The current extent is usually set to match the
current map canvas extent.
.. seealso:: :py:func:`setCurrentExtent`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`currentCrs`
2017-05-23 14:44:34 +02:00
%End
QgsCoordinateReferenceSystem currentCrs() const;
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the coordinate reference system for the current extent set for the widget. The current
extent and CRS usually reflects the map canvas extent and CRS.
.. seealso:: :py:func:`setCurrentExtent`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`currentExtent`
2017-05-23 14:44:34 +02:00
%End
void setOutputCrs( const QgsCoordinateReferenceSystem &outputCrs );
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the output CRS - may need to be used for transformation from original/current extent.
Should be called as part of initialization and whenever the the output CRS is changed.
The current extent will be reprojected into the new output CRS.
2017-05-23 14:44:34 +02:00
%End
QgsRectangle outputExtent() const;
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the extent shown in the widget - in output CRS coordinates.
.. seealso:: :py:func:`outputCrs`
2017-05-23 14:44:34 +02:00
%End
QgsCoordinateReferenceSystem outputCrs() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current output CRS, used in the display.
.. seealso:: :py:func:`outputExtent`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
QgsExtentGroupBox::ExtentState extentState() const;
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the currently selected state for the widget's extent.
2017-05-23 14:44:34 +02:00
%End
void setTitleBase( const QString &title );
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the base part of ``title`` of the group box (will be appended with extent state)
.. seealso:: :py:func:`titleBase`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.12
2017-05-23 14:44:34 +02:00
%End
QString titleBase() const;
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the base part of title of the group box (will be appended with extent state).
.. seealso:: :py:func:`setTitleBase`
2018-05-28 11:31:08 -04:00
.. versionadded:: 2.12
2017-05-23 14:44:34 +02:00
%End
void setMapCanvas( QgsMapCanvas *canvas );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the map canvas to enable dragging of extent on a canvas.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param canvas: the map canvas
.. versionadded:: 3.0
%End
QSize ratio() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current fixed aspect ratio to be used when dragging extent onto the canvas.
If the aspect ratio isn't fixed, the width and height will be set to zero.
.. versionadded:: 3.0
%End
public slots:
void setOutputExtentFromOriginal();
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the output extent to be the same as original extent (may be transformed to output CRS).
2017-05-23 14:44:34 +02:00
%End
void setOutputExtentFromCurrent();
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the output extent to be the same as current extent (may be transformed to output CRS).
2017-05-23 14:44:34 +02:00
%End
void setOutputExtentFromUser( const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs );
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the output extent to a custom extent (may be transformed to output CRS).
2017-05-23 14:44:34 +02:00
%End
void setOutputExtentFromLayer( const QgsMapLayer *layer );
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the output extent to match a ``layer``'s extent (may be transformed to output CRS).
.. versionadded:: 3.0
%End
void setOutputExtentFromDrawOnCanvas();
%Docstring
2017-12-15 10:36:55 -04:00
Sets the output extent by dragging on the canvas.
.. versionadded:: 3.0
2017-05-23 14:44:34 +02:00
%End
void setRatio( QSize ratio );
%Docstring
2017-12-15 10:36:55 -04:00
Sets a fixed aspect ratio to be used when dragging extent onto the canvas.
To unset a fixed aspect ratio, set the width and height to zero.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param ratio: aspect ratio's width and height
.. versionadded:: 3.0
%End
signals:
2017-05-23 14:44:34 +02:00
void extentChanged( const QgsRectangle &r );
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when the widget's extent is changed.
%End
};
2017-05-23 14:44:34 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsextentgroupbox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/