1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/annotations/qgscreateannotationitemmaptool.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsCreateAnnotationItemMapToolHandler : QObject
{
%Docstring(signature="appended")
A handler object for map tools which create annotation items.
This object is designed to be used by map tools which implement the
:py:class:`QgsCreateAnnotationItemMapToolInterface`, following the
composition pattern.
Clients should connect to the handler's :py:func:`~itemCreated` signal,
and call the :py:func:`~takeCreatedItem` implementation to take
ownership of the newly created item whenever this signal is emitted.
.. versionadded:: 3.22
%End
%TypeHeaderCode
#include "qgscreateannotationitemmaptool.h"
%End
public:
QgsCreateAnnotationItemMapToolHandler( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, QObject *parent = 0 );
%Docstring
Constructor for QgsCreateAnnotationItemMapToolHandler, with the
specified ``parent`` object.
%End
~QgsCreateAnnotationItemMapToolHandler();
QgsAnnotationItem *takeCreatedItem() /TransferBack/;
%Docstring
Takes the newly created item from the tool, transferring ownership to
the caller.
%End
QgsAnnotationLayer *targetLayer();
%Docstring
Returns the target layer for newly created items.
%End
void pushCreatedItem( QgsAnnotationItem *item /Transfer/ );
%Docstring
Pushes a created ``item`` to the handler.
Ownership of ``item`` is transferred to the handler.
Calling this method causes the object to emit the
:py:func:`~QgsCreateAnnotationItemMapToolHandler.itemCreated` signal,
and queue the item ready for collection via a call to
:py:func:`~QgsCreateAnnotationItemMapToolHandler.takeCreatedItem`.
%End
signals:
void itemCreated();
%Docstring
Emitted by the tool when a new annotation item has been created.
Clients should connect to this signal and call
:py:func:`~QgsCreateAnnotationItemMapToolHandler.takeCreatedItem` to
take the newly created item from the map tool.
%End
};
class QgsCreateAnnotationItemMapToolInterface
{
%Docstring(signature="appended")
An interface for map tools which create annotation items.
Clients should connect to the map tool's :py:func:`~itemCreated` signal,
and call the :py:func:`~takeCreatedItem` implementation to take
ownership of the newly created item whenever this signal is emitted.
.. versionadded:: 3.22
%End
%TypeHeaderCode
#include "qgscreateannotationitemmaptool.h"
%End
public:
virtual ~QgsCreateAnnotationItemMapToolInterface();
virtual QgsCreateAnnotationItemMapToolHandler *handler() const = 0;
%Docstring
Returns the handler object for the map tool.
%End
virtual QgsMapTool *mapTool() = 0;
%Docstring
Returns a reference to the associated map tool.
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/annotations/qgscreateannotationitemmaptool.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|