Skip to content

Commit

Permalink
Fix layout spacing and update sip files
Browse files Browse the repository at this point in the history
  • Loading branch information
benwirf committed Feb 21, 2024
1 parent f66d901 commit 88f9426
Show file tree
Hide file tree
Showing 3 changed files with 219 additions and 1 deletion.
109 changes: 109 additions & 0 deletions python/PyQt6/gui/auto_generated/qgsmaptooldigitizefeature.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsmaptooldigitizefeature.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsMapToolDigitizeFeature : QgsMapToolCaptureLayerGeometry
{
%Docstring(signature="appended")
This tool digitizes geometry of new point/line/polygon features on already existing vector layers
Once the map tool is enabled, user can digitize the feature geometry.
A signal will then be emitted.

.. versionadded:: 3.10
%End

%TypeHeaderCode
#include "qgsmaptooldigitizefeature.h"
%End
public:

QgsMapToolDigitizeFeature( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, CaptureMode mode = QgsMapToolCapture::CaptureNone );
%Docstring
QgsMapToolDigitizeFeature is a map tool to digitize a feature geometry

:param canvas: the map canvas
:param cadDockWidget: widget to setup advanced digitizing parameters
:param mode: type of geometry to capture (point/line/polygon), :py:class:`QgsMapToolCapture`.CaptureNone to autodetect geometry
%End

virtual QgsMapToolCapture::Capabilities capabilities() const;

virtual bool supportsTechnique( Qgis::CaptureTechnique technique ) const;


virtual void cadCanvasReleaseEvent( QgsMapMouseEvent *e );


void setLayer( QgsMapLayer *vl );
%Docstring
Change the layer edited by the map tool

:param vl: the layer to be edited by the map tool
%End

virtual void activate();

virtual void reactivate();

virtual void deactivate();


virtual void keyPressEvent( QKeyEvent *e );


signals:

void digitizingCompleted( const QgsFeature &feature );
%Docstring
Emitted whenever the digitizing has been successfully completed

:param feature: the new digitized feature
%End

void digitizingFinished();
%Docstring
Emitted whenever the digitizing has been ended without digitizing
any feature
%End

void digitizingCanceled();
%Docstring
Emitted when the digitizing process was interrupted by the user.

.. versionadded:: 3.28
%End

protected:

bool checkGeometryType() const;
%Docstring
Check if CaptureMode matches layer type. Default is ``True``.
%End

void setCheckGeometryType( bool checkGeometryType );
%Docstring
Check if CaptureMode matches layer type. Default is ``True``.
%End

private:
virtual void featureDigitized( const QgsFeature &feature );
%Docstring
Called when the feature has been digitized

.. versionadded:: 3.26
%End
};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsmaptooldigitizefeature.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
109 changes: 109 additions & 0 deletions python/gui/auto_generated/qgsmaptooldigitizefeature.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsmaptooldigitizefeature.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsMapToolDigitizeFeature : QgsMapToolCaptureLayerGeometry
{
%Docstring(signature="appended")
This tool digitizes geometry of new point/line/polygon features on already existing vector layers
Once the map tool is enabled, user can digitize the feature geometry.
A signal will then be emitted.

.. versionadded:: 3.10
%End

%TypeHeaderCode
#include "qgsmaptooldigitizefeature.h"
%End
public:

QgsMapToolDigitizeFeature( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, CaptureMode mode = QgsMapToolCapture::CaptureNone );
%Docstring
QgsMapToolDigitizeFeature is a map tool to digitize a feature geometry

:param canvas: the map canvas
:param cadDockWidget: widget to setup advanced digitizing parameters
:param mode: type of geometry to capture (point/line/polygon), :py:class:`QgsMapToolCapture`.CaptureNone to autodetect geometry
%End

virtual QgsMapToolCapture::Capabilities capabilities() const;

virtual bool supportsTechnique( Qgis::CaptureTechnique technique ) const;


virtual void cadCanvasReleaseEvent( QgsMapMouseEvent *e );


void setLayer( QgsMapLayer *vl );
%Docstring
Change the layer edited by the map tool

:param vl: the layer to be edited by the map tool
%End

virtual void activate();

virtual void reactivate();

virtual void deactivate();


virtual void keyPressEvent( QKeyEvent *e );


signals:

void digitizingCompleted( const QgsFeature &feature );
%Docstring
Emitted whenever the digitizing has been successfully completed

:param feature: the new digitized feature
%End

void digitizingFinished();
%Docstring
Emitted whenever the digitizing has been ended without digitizing
any feature
%End

void digitizingCanceled();
%Docstring
Emitted when the digitizing process was interrupted by the user.

.. versionadded:: 3.28
%End

protected:

bool checkGeometryType() const;
%Docstring
Check if CaptureMode matches layer type. Default is ``True``.
%End

void setCheckGeometryType( bool checkGeometryType );
%Docstring
Check if CaptureMode matches layer type. Default is ``True``.
%End

private:
virtual void featureDigitized( const QgsFeature &feature );
%Docstring
Called when the feature has been digitized

.. versionadded:: 3.26
%End
};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsmaptooldigitizefeature.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2 changes: 1 addition & 1 deletion src/gui/qgsmaptoolcapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ void QgsMapToolCapture::cadCanvasMoveEvent( QgsMapMouseEvent *e )

const QgsPointXY point = e->mapPoint();

if ( canvas()->currentLayer() && canvas()->currentLayer()->isSpatial())
if ( canvas()->currentLayer() && canvas()->currentLayer()->isSpatial() )
mSnapIndicator->setMatch( e->mapPointMatch() );

if ( mCurrentCaptureTechnique == Qgis::CaptureTechnique::Shape )
Expand Down

0 comments on commit 88f9426

Please sign in to comment.