QGIS/python/gui/qgsextentgroupbox.sip

142 lines
4.1 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
Collapsible group box for configuration of extent, typically for a save operation.
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.
When using the widget, make sure to call setOriginalExtent(), setCurrentExtent() and setOutputCrs() during initialization.
.. versionadded:: 2.4
%End
%TypeHeaderCode
2017-05-23 14:44:34 +02:00
#include "qgsextentgroupbox.h"
%End
public:
explicit QgsExtentGroupBox( QWidget *parent /TransferThis/ = 0 );
enum ExtentState
{
2017-05-23 14:44:34 +02:00
OriginalExtent,
CurrentExtent,
UserExtent,
};
void setOriginalExtent( const QgsRectangle &originalExtent, const QgsCoordinateReferenceSystem &originalCrs );
2017-05-23 14:44:34 +02:00
%Docstring
Setup original extent - should be called as part of initialization
%End
QgsRectangle originalExtent() const;
2017-05-23 14:44:34 +02:00
%Docstring
:rtype: QgsRectangle
%End
const QgsCoordinateReferenceSystem &originalCrs() const;
2017-05-23 14:44:34 +02:00
%Docstring
:rtype: QgsCoordinateReferenceSystem
%End
void setCurrentExtent( const QgsRectangle &currentExtent, const QgsCoordinateReferenceSystem &currentCrs );
2017-05-23 14:44:34 +02:00
%Docstring
Setup current extent - should be called as part of initialization (or whenever current extent changes)
%End
QgsRectangle currentExtent() const;
2017-05-23 14:44:34 +02:00
%Docstring
:rtype: QgsRectangle
%End
const QgsCoordinateReferenceSystem &currentCrs() const;
2017-05-23 14:44:34 +02:00
%Docstring
:rtype: QgsCoordinateReferenceSystem
%End
void setOutputCrs( const QgsCoordinateReferenceSystem &outputCrs );
2017-05-23 14:44:34 +02:00
%Docstring
Should be called as part of initialization and whenever the the output CRS is changed
%End
QgsRectangle outputExtent() const;
2017-05-23 14:44:34 +02:00
%Docstring
Get the resulting extent - in output CRS coordinates
:rtype: QgsRectangle
%End
QgsExtentGroupBox::ExtentState extentState() const;
2017-05-23 14:44:34 +02:00
%Docstring
:rtype: QgsExtentGroupBox.ExtentState
%End
void setTitleBase( const QString &title );
2017-05-23 14:44:34 +02:00
%Docstring
.. versionadded:: 2.12
%End
QString titleBase() const;
2017-05-23 14:44:34 +02:00
%Docstring
.. versionadded:: 2.12
:rtype: str
%End
public slots:
void setOutputExtentFromOriginal();
2017-05-23 14:44:34 +02:00
%Docstring
set output extent to be the same as original extent (may be transformed to output CRS)
%End
void setOutputExtentFromCurrent();
2017-05-23 14:44:34 +02:00
%Docstring
set output extent to be the same as current extent (may be transformed to output CRS)
%End
void setOutputExtentFromUser( const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs );
2017-05-23 14:44:34 +02:00
%Docstring
set output extent to custom extent (may be transformed to output CRS)
%End
signals:
void extentChanged( const QgsRectangle &r );
2017-05-23 14:44:34 +02:00
%Docstring
emitted when extent is changed
%End
protected slots:
void on_mXMinLineEdit_textEdited( const QString & );
void on_mXMaxLineEdit_textEdited( const QString & );
void on_mYMinLineEdit_textEdited( const QString & );
void on_mYMaxLineEdit_textEdited( const QString & );
void groupBoxClicked();
protected:
void setOutputExtent( const QgsRectangle &r, const QgsCoordinateReferenceSystem &srcCrs, QgsExtentGroupBox::ExtentState state );
void setOutputExtentFromLineEdit();
void updateTitle();
2017-05-23 14:44:34 +02:00
};
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 *
************************************************************************/