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

203 lines
4.4 KiB
Plaintext
Raw Normal View History

2017-06-07 16:16:21 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsmaptoolcapture.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsMapToolCapture : QgsMapToolAdvancedDigitizing
{
2017-06-07 16:16:21 +02:00
%TypeHeaderCode
#include "qgsmaptoolcapture.h"
%End
public:
enum CaptureMode
{
CaptureNone,
CapturePoint,
CaptureLine,
CapturePolygon
};
QgsMapToolCapture( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, CaptureMode mode );
2017-06-07 16:16:21 +02:00
%Docstring
constructor
%End
~QgsMapToolCapture();
virtual void activate();
virtual void deactivate();
CaptureMode mode() const;
%Docstring
2017-12-15 10:36:55 -04:00
The capture mode
:return: Capture mode
%End
int addCurve( QgsCurve *c );
2017-06-07 16:16:21 +02:00
%Docstring
Adds a whole curve (e.g. circularstring) to the captured geometry. Curve must be in map CRS
%End
2017-07-31 12:14:24 +02:00
void clearCurve( );
%Docstring
2017-12-15 10:36:55 -04:00
Clear capture curve.
2017-07-31 12:14:24 +02:00
.. versionadded:: 3.0
%End
const QgsCompoundCurve *captureCurve() const;
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Get the capture curve
:return: Capture curve
2017-06-07 16:16:21 +02:00
%End
QList<QgsPointLocator::Match> snappingMatches() const;
%Docstring
Returns a list of matches for each point on the captureCurve.
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
virtual void cadCanvasMoveEvent( QgsMapMouseEvent *e );
virtual void keyPressEvent( QKeyEvent *e );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Intercept key events like Esc or Del to delete the last point
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param e: key event
2017-06-07 16:16:21 +02:00
%End
2017-06-07 16:16:21 +02:00
void deleteTempRubberBand();
%Docstring
2017-12-15 10:36:55 -04:00
Clean a temporary rubberband
2017-06-07 16:16:21 +02:00
%End
2017-10-16 22:13:47 +02:00
virtual void clean();
2017-10-16 22:13:47 +02:00
%Docstring
convenient method to clean members
%End
protected:
int nextPoint( const QgsPoint &mapPoint, QgsPoint &layerPoint );
int nextPoint( QPoint p, QgsPoint &layerPoint, QgsPoint &mapPoint );
int fetchLayerPoint( const QgsPointLocator::Match &match, QgsPoint &layerPoint );
2018-02-16 10:03:07 +00:00
QgsPoint mapPoint( const QgsMapMouseEvent &e ) const;
%Docstring
2018-01-15 13:41:35 +00:00
Creates a QgsPoint with ZM support if necessary (according to the
2018-02-16 10:03:07 +00:00
WkbType of the current layer). If the point is snapped, then the Z
value is took from the snapped point.
2018-02-16 10:03:07 +00:00
:param e: A mouse event
2018-01-15 13:41:35 +00:00
2018-02-16 10:03:07 +00:00
:return: a point with ZM support if necessary
.. versionadded:: 3.0
%End
QgsPoint mapPoint( const QgsPointXY &point ) const;
%Docstring
Creates a QgsPoint with ZM support if necessary (according to the
WkbType of the current layer).
:param point: A point in 2D
:return: a point with ZM support if necessary
.. versionadded:: 3.0
%End
int addVertex( const QgsPointXY &point );
int addVertex( const QgsPointXY &mapPoint, const QgsPointLocator::Match &match );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Variant to supply more information in the case of snapping
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param mapPoint: The vertex to add in map coordinates
:param match: Data about the snapping match. Can be an invalid match, if point not snapped.
2017-06-07 16:16:21 +02:00
.. versionadded:: 2.14
%End
void undo();
2017-06-07 16:16:21 +02:00
%Docstring
Removes the last vertex from mRubberBand and mCaptureList
%End
void startCapturing();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Start capturing
2017-06-07 16:16:21 +02:00
%End
2016-02-14 03:50:23 +01:00
bool isCapturing() const;
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Are we currently capturing?
:return: Is the tool in capture mode?
2017-06-07 16:16:21 +02:00
%End
2016-02-14 03:50:23 +01:00
int size();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Number of points digitized
:return: Number of points
2017-06-07 16:16:21 +02:00
%End
2016-02-14 03:50:23 +01:00
2017-12-01 11:09:38 +00:00
QVector<QgsPointXY> points() const;
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
List of digitized points
:return: List of points
2017-06-07 16:16:21 +02:00
%End
2016-02-14 03:50:23 +01:00
void setPoints( const QVector<QgsPointXY> &pointList );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set the points on which to work
2017-06-07 16:16:21 +02:00
2017-12-15 10:36:55 -04:00
:param pointList: A list of points
2017-06-07 16:16:21 +02:00
%End
2016-02-14 03:50:23 +01:00
void closePolygon();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Close an open polygon
2017-06-07 16:16:21 +02:00
%End
protected slots:
void stopCapturing();
%Docstring
2017-12-15 10:36:55 -04:00
Stop capturing
%End
};
2017-06-07 16:16:21 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsmaptoolcapture.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/