2017-07-18 18:13:52 +07:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmaptoolextent.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsMapToolExtent : QgsMapTool
|
|
|
|
{
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A map tool that emits an extent from a rectangle drawn onto the map canvas.
|
|
|
|
|
2017-07-18 18:13:52 +07:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmaptoolextent.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
QgsMapToolExtent( QgsMapCanvas *canvas );
|
|
|
|
%Docstring
|
|
|
|
constructor
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual Flags flags() const;
|
|
|
|
virtual void canvasMoveEvent( QgsMapMouseEvent *e );
|
|
|
|
virtual void canvasPressEvent( QgsMapMouseEvent *e );
|
|
|
|
virtual void canvasReleaseEvent( QgsMapMouseEvent *e );
|
|
|
|
virtual void activate();
|
|
|
|
virtual void deactivate();
|
|
|
|
|
|
|
|
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.
|
|
|
|
:param ratio: aspect ratio's width and height
|
|
|
|
*
|
2017-07-18 18:13:52 +07:00
|
|
|
%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.
|
|
|
|
*
|
|
|
|
|
|
|
|
:rtype: QSize
|
2017-07-18 18:13:52 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsRectangle extent() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the current extent drawn onto the canvas.
|
|
|
|
|
|
|
|
:rtype: QgsRectangle
|
2017-07-18 18:13:52 +07:00
|
|
|
%End
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void extentChanged( const QgsRectangle &extent );
|
|
|
|
%Docstring
|
|
|
|
signal emitted on extent change
|
|
|
|
%End
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmaptoolextent.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|