QGIS/python/core/auto_generated/annotations/qgsannotationmanager.sip.in
Nyall Dawson 4c3a9ef7be Ensure that class \brief comes before \since (#7081)
Otherwise it breaks the Python docstrings, which require
the brief to come first
2018-05-28 04:03:46 -08:00

131 lines
3.9 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/annotations/qgsannotationmanager.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAnnotationManager : QObject
{
%Docstring
Manages storage of a set of QgsAnnotation annotation objects.
QgsAnnotationManager handles the storage, serializing and deserializing
of QgsAnnotations. Usually this class is not constructed directly, but
rather accessed through a QgsProject via :py:func:`QgsProject.annotationManager()`
QgsAnnotationManager retains ownership of all the annotations contained
in the manager.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsannotationmanager.h"
%End
public:
explicit QgsAnnotationManager( QgsProject *project /TransferThis/ = 0 );
%Docstring
Constructor for QgsAnnotationManager. The project will become the parent object for this
manager.
%End
~QgsAnnotationManager();
bool addAnnotation( QgsAnnotation *annotation /Transfer/ );
%Docstring
Adds an annotation to the manager. Ownership of the annotation is transferred to the manager.
Returns true if the addition was successful, or false if the annotation could not be added.
.. seealso:: :py:func:`removeAnnotation`
.. seealso:: :py:func:`annotationAdded`
%End
bool removeAnnotation( QgsAnnotation *annotation );
%Docstring
Removes an annotation from the manager. The annotation is deleted.
Returns true if the removal was successful, or false if the removal failed (eg as a result
of removing an annotation which is not contained in the manager).
.. seealso:: :py:func:`addAnnotation`
.. seealso:: :py:func:`annotationRemoved`
.. seealso:: :py:func:`annotationAboutToBeRemoved`
.. seealso:: :py:func:`clear`
%End
void clear();
%Docstring
Removes and deletes all annotations from the manager.
.. seealso:: :py:func:`removeAnnotation`
%End
QList< QgsAnnotation * > annotations() const;
%Docstring
Returns a list of all annotations contained in the manager.
.. seealso:: :py:func:`cloneAnnotations`
%End
QList< QgsAnnotation * > cloneAnnotations() const /Factory/;
%Docstring
Returns a list containing clones of all annotations contained
in the manager. The caller takes responsibility for deleting
all returned annotations.
.. seealso:: :py:func:`annotations`
%End
bool readXml( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Reads the manager's state from a DOM element, restoring all annotations
present in the XML document.
.. seealso:: :py:func:`writeXml`
%End
QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
%Docstring
Returns a DOM element representing the state of the manager.
.. seealso:: :py:func:`readXml`
%End
signals:
void annotationAdded( QgsAnnotation *annotation );
%Docstring
Emitted when a annotation has been added to the manager
%End
void annotationRemoved();
%Docstring
Emitted when an annotation was removed from the manager
%End
void annotationAboutToBeRemoved( QgsAnnotation *annotation );
%Docstring
Emitted when an annotation is about to be removed from the manager
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/annotations/qgsannotationmanager.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/