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 *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-04 15:47:09 +01:00
|
|
|
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
|
|
|
|
|
2014-03-04 15:47:09 +01:00
|
|
|
%TypeHeaderCode
|
2017-05-23 14:44:34 +02:00
|
|
|
#include "qgsextentgroupbox.h"
|
2014-03-04 15:47:09 +01:00
|
|
|
%End
|
|
|
|
public:
|
2017-05-01 16:42:33 +02:00
|
|
|
explicit QgsExtentGroupBox( QWidget *parent /TransferThis/ = 0 );
|
2014-03-04 15:47:09 +01:00
|
|
|
|
|
|
|
enum ExtentState
|
|
|
|
{
|
2017-05-23 14:44:34 +02:00
|
|
|
OriginalExtent,
|
|
|
|
CurrentExtent,
|
|
|
|
UserExtent,
|
2014-03-04 15:47:09 +01:00
|
|
|
};
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
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
|
2014-03-04 15:47:09 +01:00
|
|
|
|
|
|
|
QgsRectangle originalExtent() const;
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsRectangle
|
|
|
|
%End
|
2017-05-01 16:42:33 +02:00
|
|
|
const QgsCoordinateReferenceSystem &originalCrs() const;
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsCoordinateReferenceSystem
|
|
|
|
%End
|
2014-03-04 15:47:09 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setCurrentExtent( const QgsRectangle ¤tExtent, const QgsCoordinateReferenceSystem ¤tCrs );
|
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
|
2014-03-04 15:47:09 +01:00
|
|
|
|
|
|
|
QgsRectangle currentExtent() const;
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsRectangle
|
|
|
|
%End
|
2017-05-01 16:42:33 +02:00
|
|
|
const QgsCoordinateReferenceSystem ¤tCrs() const;
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsCoordinateReferenceSystem
|
|
|
|
%End
|
2014-03-04 15:47:09 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
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
|
2014-03-04 15:47:09 +01:00
|
|
|
|
|
|
|
QgsRectangle outputExtent() const;
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
Get the resulting extent - in output CRS coordinates
|
|
|
|
:rtype: QgsRectangle
|
|
|
|
%End
|
2014-03-04 15:47:09 +01:00
|
|
|
|
|
|
|
QgsExtentGroupBox::ExtentState extentState() const;
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsExtentGroupBox.ExtentState
|
|
|
|
%End
|
2014-03-04 15:47:09 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setTitleBase( const QString &title );
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
.. versionadded:: 2.12
|
|
|
|
%End
|
2015-06-25 13:24:47 +08:00
|
|
|
QString titleBase() const;
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
.. versionadded:: 2.12
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2015-06-25 13:24:47 +08:00
|
|
|
|
2014-03-04 15:47:09 +01:00
|
|
|
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
|
2014-03-04 15:47:09 +01:00
|
|
|
|
|
|
|
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
|
2014-03-04 15:47:09 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
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
|
2014-03-04 15:47:09 +01:00
|
|
|
|
|
|
|
signals:
|
2017-05-01 16:42:33 +02:00
|
|
|
void extentChanged( const QgsRectangle &r );
|
2017-05-23 14:44:34 +02:00
|
|
|
%Docstring
|
|
|
|
emitted when extent is changed
|
|
|
|
%End
|
2014-03-04 15:47:09 +01:00
|
|
|
|
|
|
|
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 & );
|
|
|
|
|
2015-06-25 13:24:47 +08:00
|
|
|
void groupBoxClicked();
|
|
|
|
|
2014-03-04 15:47:09 +01:00
|
|
|
protected:
|
2017-05-01 16:42:33 +02:00
|
|
|
void setOutputExtent( const QgsRectangle &r, const QgsCoordinateReferenceSystem &srcCrs, QgsExtentGroupBox::ExtentState state );
|
2014-03-04 15:47:09 +01:00
|
|
|
void setOutputExtentFromLineEdit();
|
|
|
|
void updateTitle();
|
2017-05-23 14:44:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-04 15:47:09 +01: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 *
|
|
|
|
************************************************************************/
|