QGIS/python/core/annotations/qgsannotationmanager.sip

110 lines
3.4 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
.. versionadded:: 3.0
2017-04-02 21:28:20 +10:00
Manages storage of a set of QgsAnnotation annotation objects.
2017-04-02 21:24:19 +10:00
QgsAnnotationManager handles the storage, serializing and deserializing
of QgsAnnotations. Usually this class is not constructed directly, but
rather accessed through a QgsProject via QgsProject.annotationManager().
2017-04-02 21:24:19 +10:00
QgsAnnotationManager retains ownership of all the annotations contained
in the manager.
%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
Constructor for QgsAnnotationManager. The project will become the parent object for this
manager.
%End
~QgsAnnotationManager();
2017-04-02 21:24:19 +10:00
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.
2017-04-03 11:59:45 +10:00
\see removeAnnotation()
\see annotationAdded()
2017-04-02 21:24:19 +10:00
%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).
2017-04-03 11:59:45 +10:00
\see addAnnotation()
\see compositionRemoved()
\see compositionAboutToBeRemoved()
\see clear()
2017-04-02 21:24:19 +10:00
%End
void clear();
2017-04-02 21:24:19 +10:00
%Docstring
Removes and deletes all annotations from the manager.
2017-04-03 11:59:45 +10:00
\see removeAnnotation()
2017-04-02 21:24:19 +10:00
%End
QList< QgsAnnotation * > annotations() const;
%Docstring
Returns a list of all annotations contained in the manager.
%End
bool readXml( const QDomElement &element, const QDomDocument &doc );
%Docstring
Reads the manager's state from a DOM element, restoring all annotations
present in the XML document.
2017-04-03 11:59:45 +10:00
\see writeXml()
2017-04-02 21:24:19 +10:00
%End
QDomElement writeXml( QDomDocument &doc ) const;
%Docstring
Returns a DOM element representing the state of the manager.
2017-04-03 11:59:45 +10:00
\see 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 *
************************************************************************/