Skip to content

Commit

Permalink
sipify
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jan 28, 2022
1 parent 7c90509 commit e37e985
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 62 deletions.
96 changes: 80 additions & 16 deletions python/gui/auto_generated/qgisinterface.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -672,69 +672,133 @@ Returns the Hide Deselected Layers action.
virtual QAction *actionCheckQgisVersion() = 0;
virtual QAction *actionAbout() = 0;

virtual QAction *actionCircle2Points() = 0;

virtual QAction *actionCircle2Points() /Deprecated/;
%Docstring
Returns the native add circle from 2 points action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionCircle3Points() = 0;

virtual QAction *actionCircle3Points() /Deprecated/;
%Docstring
Returns the native add circle from 3 points action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionCircle3Tangents() = 0;

virtual QAction *actionCircle3Tangents() /Deprecated/;
%Docstring
Returns the native add circle from 3 tangents action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionCircle2TangentsPoint() = 0;

virtual QAction *actionCircle2TangentsPoint() /Deprecated/;
%Docstring
Returns the native add circle from 2 tangents and a point action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionCircleCenterPoint() = 0;

virtual QAction *actionCircleCenterPoint() /Deprecated/;
%Docstring
Returns the native add circle from center action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionEllipseCenter2Points() = 0;

virtual QAction *actionEllipseCenter2Points() /Deprecated/;
%Docstring
Returns the native add ellipse from center and 2 points action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionEllipseCenterPoint() = 0;

virtual QAction *actionEllipseCenterPoint() /Deprecated/;
%Docstring
Returns the native add ellipse from center and a point action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionEllipseExtent() = 0;

virtual QAction *actionEllipseExtent() /Deprecated/;
%Docstring
Returns the native add ellipse from an extent action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionEllipseFoci() = 0;

virtual QAction *actionEllipseFoci() /Deprecated/;
%Docstring
Returns the native add ellipse from foci action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionRectangleCenterPoint() = 0;

virtual QAction *actionRectangleCenterPoint() /Deprecated/;
%Docstring
Returns the native add rectangle from center and a point action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionRectangleExtent() = 0;

virtual QAction *actionRectangleExtent() /Deprecated/;
%Docstring
Returns the native add rectangle from extent action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionRectangle3PointsDistance() = 0;

virtual QAction *actionRectangle3PointsDistance() /Deprecated/;
%Docstring
Returns the native add rectangle from 3 points (distance from 2nd and 3rd points) action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionRectangle3PointsProjected() = 0;

virtual QAction *actionRectangle3PointsProjected() /Deprecated/;
%Docstring
Returns the native add rectangle from 3 points (distance from projected 3rd point on segment p1 and p2) action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionRegularPolygon2Points() = 0;

virtual QAction *actionRegularPolygon2Points() /Deprecated/;
%Docstring
Returns the native add regular polygon from 2 points action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionRegularPolygonCenterPoint() = 0;

virtual QAction *actionRegularPolygonCenterPoint() /Deprecated/;
%Docstring
Returns the native add regular polygon from center and a point action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End
virtual QAction *actionRegularPolygonCenterCorner() = 0;

virtual QAction *actionRegularPolygonCenterCorner() /Deprecated/;
%Docstring
Returns the native add regular polygon from center and a corner action. Call :py:func:`~QgisInterface.trigger` on it to set the map tool.

.. deprecated:: QGIS 3.24
shape digitizing is now part of the add feature tool
%End

virtual QgsVectorLayerTools *vectorLayerTools() = 0;
Expand Down
10 changes: 5 additions & 5 deletions python/gui/auto_generated/qgsmaptool.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ The default implementation does nothing and returns false.
is present in :py:func:`~QgsMapTool.flags`.

.. versionadded:: 3.18
%End

QgsPointXY toMapCoordinates( QPoint point );
%Docstring
Transforms a ``point`` from screen coordinates to map coordinates.
%End

signals:
Expand Down Expand Up @@ -289,11 +294,6 @@ signal emitted once the map tool is deactivated
QgsMapTool( QgsMapCanvas *canvas /TransferThis/ );
%Docstring
Constructor takes a map canvas as a parameter.
%End

QgsPointXY toMapCoordinates( QPoint point );
%Docstring
Transforms a ``point`` from screen coordinates to map coordinates.
%End

QgsPoint toLayerCoordinates( const QgsMapLayer *layer, const QgsPoint &point ) /PyName=toLayerCoordinatesV2/;
Expand Down
77 changes: 38 additions & 39 deletions python/gui/auto_generated/qgsmaptoolcapture.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@




class QgsMapToolCapture : QgsMapToolAdvancedDigitizing
{
%Docstring(signature="appended")
Expand Down Expand Up @@ -71,6 +70,14 @@ Returns ``True`` if the tool supports the specified capture ``technique``.
.. versionadded:: 3.20
%End

void setCurrentCaptureTechnique( CaptureTechnique technique );
%Docstring
Sets the current capture if it is supported by the map tool

.. versionadded:: 3.24
%End


virtual void activate();

virtual void deactivate();
Expand Down Expand Up @@ -111,6 +118,8 @@ Returns a list of matches for each point on the captureCurve.

virtual void cadCanvasMoveEvent( QgsMapMouseEvent *e );

virtual void cadCanvasReleaseEvent( QgsMapMouseEvent *e );


virtual void keyPressEvent( QKeyEvent *e );

Expand Down Expand Up @@ -139,6 +148,34 @@ transfers ownership to the caller.
.. versionadded:: 3.8
%End

QgsPoint mapPoint( const QgsMapMouseEvent &e ) const;
%Docstring
Creates a :py:class:`QgsPoint` with ZM support if necessary (according to the
WkbType of the current layer). If the point is snapped, then the Z
value is took from the snapped point.

:param e: A mouse event

:return: a point with ZM support if necessary


.. versionadded:: 3.0
%End

QgsPoint mapPoint( const QgsPointXY &point ) const;
%Docstring
Creates a :py:class:`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


public slots:

void setCircularDigitizingEnabled( bool enable ) /Deprecated/;
Expand All @@ -159,13 +196,6 @@ Toggles the stream digitizing mode.
use :py:func:`~QgsMapToolCapture.setCurrentCaptureTechnique` instead
%End

void setCurrentCaptureTechnique( CaptureTechnique technique );
%Docstring
Sets the current capture if it is supported by the map tool

.. versionadded:: 3.24
%End

protected:


Expand Down Expand Up @@ -208,34 +238,6 @@ CRS as the current layer.
.. versionadded:: 2.14
%End

QgsPoint mapPoint( const QgsMapMouseEvent &e ) const;
%Docstring
Creates a :py:class:`QgsPoint` with ZM support if necessary (according to the
WkbType of the current layer). If the point is snapped, then the Z
value is took from the snapped point.

:param e: A mouse event

:return: a point with ZM support if necessary


.. versionadded:: 3.0
%End

QgsPoint mapPoint( const QgsPointXY &point ) const;
%Docstring
Creates a :py:class:`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 );
%Docstring
Adds a point to the rubber band (in map coordinates) and to the capture list (in layer coordinates)
Expand Down Expand Up @@ -360,9 +362,6 @@ geometryCaptured is called just before

.. versionadded:: 3.24
%End
public:
virtual void cadCanvasReleaseEvent( QgsMapMouseEvent *e );

};

QFlags<QgsMapToolCapture::Capability> operator|(QgsMapToolCapture::Capability f1, QFlags<QgsMapToolCapture::Capability> f2);
Expand Down
12 changes: 10 additions & 2 deletions python/gui/auto_generated/qgsmaptooledit.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ Returns default M value.
Used for setting M coordinate to new vertex.

.. versionadded:: 3.20
%End

QgsGeometryRubberBand *createGeometryRubberBand( QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry, bool alternativeBand = false ) const /Factory/;
%Docstring
Creates a geometry rubber band with the color/line width from
the QGIS settings. The caller takes ownership of the
returned object

:param geometryType:
:param alternativeBand: if ``True``, rubber band will be set with more transparency and a dash pattern. default is ``False``.
%End

protected:
Expand Down Expand Up @@ -62,8 +72,6 @@ returned object
:param alternativeBand: if ``True``, rubber band will be set with more transparency and a dash pattern. default is ``False``.
%End

QgsGeometryRubberBand *createGeometryRubberBand( QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::LineGeometry, bool alternativeBand = false ) const /Factory/;

QgsVectorLayer *currentVectorLayer();
%Docstring
Returns the current vector layer of the map canvas or 0
Expand Down

0 comments on commit e37e985

Please sign in to comment.