Skip to content
Permalink
Browse files
[api] Add initial framework for QgsMapToolModifyAnnotation
This is the start of a map tool for interactive editing of items
in annotation layers. Currently it supports selecting items, and
pre-highlighting their nodes as the cursor is moved over the items.

(Not exposed in QGIS gui yet)
  • Loading branch information
nyalldawson committed Sep 7, 2021
1 parent 20f28a9 commit 758b33ed2e9d800364348cce92b7683770bf5245
@@ -91,6 +91,7 @@ if(WITH_APIDOC)
${CMAKE_SOURCE_DIR}/src/core/vector
${CMAKE_SOURCE_DIR}/src/core/vectortile
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/annotations
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_SOURCE_DIR}/src/gui/attributetable
${CMAKE_SOURCE_DIR}/src/gui/callouts
@@ -0,0 +1,55 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/annotations/qgsmaptoolmodifyannotation.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsMapToolModifyAnnotation : QgsMapToolAdvancedDigitizing
{
%Docstring(signature="appended")
A map tool for modifying annotations in a :py:class:`QgsAnnotationLayer`

.. versionadded:: 3.22
%End

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

explicit QgsMapToolModifyAnnotation( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget );
%Docstring
Constructor for QgsMapToolModifyAnnotation
%End

~QgsMapToolModifyAnnotation();

virtual void deactivate();

virtual void cadCanvasMoveEvent( QgsMapMouseEvent *event );

virtual void cadCanvasPressEvent( QgsMapMouseEvent *event );


signals:

void itemSelected( QgsAnnotationLayer *layer, const QString &itemId );
%Docstring
Emitted when the selected item is changed.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/annotations/qgsmaptoolmodifyannotation.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -224,6 +224,7 @@
%Include auto_generated/qgsvertexmarker.sip
%Include auto_generated/qgsvscrollarea.sip
%Include auto_generated/qgswindowmanagerinterface.sip
%Include auto_generated/annotations/qgsmaptoolmodifyannotation.sip
%Include auto_generated/attributetable/qgsattributetabledelegate.sip
%Include auto_generated/attributetable/qgsattributetablefiltermodel.sip
%Include auto_generated/attributetable/qgsattributetablemodel.sip
@@ -94,6 +94,8 @@ set(QGIS_GUI_SRCS
attributetable/qgsorganizetablecolumnsdialog.cpp
attributetable/qgsfeaturefilterwidget.cpp

annotations/qgsmaptoolmodifyannotation.cpp

auth/qgsauthauthoritieseditor.cpp
auth/qgsauthcertificateinfo.cpp
auth/qgsauthcertificatemanager.cpp
@@ -878,6 +880,8 @@ set(QGIS_GUI_HDRS
qgsvscrollarea.h
qgswindowmanagerinterface.h

annotations/qgsmaptoolmodifyannotation.h

attributeformconfig/qgsattributeformcontaineredit.h
attributeformconfig/qgsattributetypedialog.h
attributeformconfig/qgsattributewidgetedit.h
@@ -1417,6 +1421,7 @@ endif()

target_include_directories(qgis_gui PUBLIC
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/annotations
${CMAKE_SOURCE_DIR}/src/gui/attributeformconfig
${CMAKE_SOURCE_DIR}/src/gui/symbology
${CMAKE_SOURCE_DIR}/src/gui/attributetable

0 comments on commit 758b33e

Please sign in to comment.