Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't expose QgsMapToolModifyAnnotation to python
We want to leave this private for now, to give flexibility to change
api if/when needed
  • Loading branch information
nyalldawson committed Sep 10, 2021
1 parent c1260f2 commit 8cf4903
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 83 deletions.

This file was deleted.

7 changes: 0 additions & 7 deletions python/gui/auto_generated/qgisinterface.sip.in
Expand Up @@ -1569,13 +1569,6 @@ Any existing GPS connection used by the widget will be disconnect and replaced w
is automatically registered within the :py:func:`QgsApplication.gpsConnectionRegistry()`.

.. versionadded:: 3.16
%End

virtual QgsMapToolModifyAnnotation *modifyAnnotationTool() = 0;
%Docstring
Returns the map tool used for modifying annotation layers.

.. versionadded:: 3.22
%End

signals:
Expand Down
1 change: 0 additions & 1 deletion python/gui/gui_auto.sip
Expand Up @@ -228,7 +228,6 @@
%Include auto_generated/annotations/qgsannotationitemguiregistry.sip
%Include auto_generated/annotations/qgsannotationitemwidget.sip
%Include auto_generated/annotations/qgscreateannotationitemmaptool.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
Expand Down
4 changes: 0 additions & 4 deletions src/app/qgisappinterface.cpp
Expand Up @@ -909,7 +909,3 @@ QList<QgsMapDecoration *> QgisAppInterface::activeDecorations()
return qgis->activeDecorations();
}

QgsMapToolModifyAnnotation *QgisAppInterface::modifyAnnotationTool()
{
return qobject_cast< QgsMapToolModifyAnnotation * >( qgis->mMapTools->mapTool( QgsAppMapTools::AnnotationEdit ) );
}
1 change: 0 additions & 1 deletion src/app/qgisappinterface.h
Expand Up @@ -322,7 +322,6 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() override;
void setGpsPanelConnection( QgsGpsConnection *connection ) override;
QList<QgsMapDecoration *> activeDecorations() override;
virtual QgsMapToolModifyAnnotation *modifyAnnotationTool() override;

private slots:

Expand Down
3 changes: 3 additions & 0 deletions src/gui/annotations/qgsmaptoolmodifyannotation.h
Expand Up @@ -30,9 +30,12 @@ class QgsAnnotationItem;
class QgsAnnotationLayer;
class QgsAnnotationItemNodesSpatialIndex;

#define SIP_NO_FILE

/**
* \ingroup gui
* \brief A map tool for modifying annotations in a QgsAnnotationLayer
* \note Not available in Python bindings
* \since QGIS 3.22
*/
class GUI_EXPORT QgsMapToolModifyAnnotation : public QgsMapToolAdvancedDigitizing
Expand Down
8 changes: 0 additions & 8 deletions src/gui/qgisinterface.h
Expand Up @@ -70,7 +70,6 @@ class QgsDevToolWidgetFactory;
class QgsGpsConnection;
class QgsApplicationExitBlockerInterface;
class QgsAbstractMapToolHandler;
class QgsMapToolModifyAnnotation;

/**
* \ingroup gui
Expand Down Expand Up @@ -1312,13 +1311,6 @@ class GUI_EXPORT QgisInterface : public QObject
*/
virtual void setGpsPanelConnection( QgsGpsConnection *connection ) = 0;

/**
* Returns the map tool used for modifying annotation layers.
*
* \since QGIS 3.22
*/
virtual QgsMapToolModifyAnnotation *modifyAnnotationTool() = 0;

signals:

/**
Expand Down

0 comments on commit 8cf4903

Please sign in to comment.