QGIS/python/core/auto_generated/annotations/qgsannotationmanager.sip.in

131 lines
3.9 KiB
Plaintext
Raw Normal View History

2017-04-02 21:24:19 +10:00
/************************************************************************
* 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
{
2017-04-02 21:24:19 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Manages storage of a set of QgsAnnotation annotation objects.
2017-04-02 21:24:19 +10:00
2017-12-15 10:36:55 -04:00
QgsAnnotationManager handles the storage, serializing and deserializing
of QgsAnnotations. Usually this class is not constructed directly, but
2017-12-19 11:43:52 -04:00
rather accessed through a QgsProject via :py:func:`QgsProject.annotationManager()`
2017-04-02 21:24:19 +10:00
2017-12-15 10:36:55 -04:00
QgsAnnotationManager retains ownership of all the annotations contained
in the manager.
.. versionadded:: 3.0
2017-04-02 21:24:19 +10:00
%End
%TypeHeaderCode
2017-04-02 21:24:19 +10:00
#include "qgsannotationmanager.h"
%End
public:
2017-04-02 21:24:19 +10:00
explicit QgsAnnotationManager( QgsProject *project /TransferThis/ = 0 );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsAnnotationManager. The project will become the parent object for this
manager.
2017-04-02 21:24:19 +10:00
%End
~QgsAnnotationManager();
2017-04-02 21:24:19 +10:00
bool addAnnotation( QgsAnnotation *annotation /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Adds an annotation to the manager. Ownership of the annotation is transferred to the manager.
2019-02-26 19:54:09 +10:00
Returns ``True`` if the addition was successful, or ``False`` if the annotation could not be added.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`removeAnnotation`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`annotationAdded`
2017-04-02 21:24:19 +10:00
%End
bool removeAnnotation( QgsAnnotation *annotation );
%Docstring
2017-12-15 10:36:55 -04:00
Removes an annotation from the manager. The annotation is deleted.
2019-02-26 19:54:09 +10:00
Returns ``True`` if the removal was successful, or ``False`` if the removal failed (eg as a result
2017-12-15 10:36:55 -04:00
of removing an annotation which is not contained in the manager).
.. seealso:: :py:func:`addAnnotation`
2017-12-15 10:36:55 -04:00
2018-05-25 09:00:58 +10:00
.. seealso:: :py:func:`annotationRemoved`
2017-12-15 10:36:55 -04:00
2018-05-25 09:00:58 +10:00
.. seealso:: :py:func:`annotationAboutToBeRemoved`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`clear`
2017-04-02 21:24:19 +10:00
%End
void clear();
2017-04-02 21:24:19 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Removes and deletes all annotations from the manager.
.. seealso:: :py:func:`removeAnnotation`
2017-04-02 21:24:19 +10:00
%End
QList< QgsAnnotation * > annotations() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns a list of all annotations contained in the manager.
.. seealso:: :py:func:`cloneAnnotations`
2017-04-20 13:39:36 +10:00
%End
QList< QgsAnnotation * > cloneAnnotations() const /Factory/;
%Docstring
2017-12-15 10:36:55 -04:00
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`
2017-04-02 21:24:19 +10:00
%End
bool readXml( const QDomElement &element, const QgsReadWriteContext &context );
2017-04-02 21:24:19 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Reads the manager's state from a DOM element, restoring all annotations
present in the XML document.
.. seealso:: :py:func:`writeXml`
2017-04-02 21:24:19 +10:00
%End
QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
2017-04-02 21:24:19 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a DOM element representing the state of the manager.
.. seealso:: :py:func:`readXml`
2017-04-02 21:24:19 +10:00
%End
signals:
2017-04-02 21:24:19 +10:00
void annotationAdded( QgsAnnotation *annotation );
%Docstring
Emitted when a annotation has been added to the manager
%End
void annotationRemoved();
2017-04-02 21:24:19 +10:00
%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
};
2017-04-02 21:24:19 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/annotations/qgsannotationmanager.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/