mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-27 00:07:16 -05:00
129 lines
3.7 KiB
Plaintext
129 lines
3.7 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/annotations/qgsannotationitem.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
class QgsAnnotationItem
|
|
{
|
|
%Docstring
|
|
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsannotationitem.h"
|
|
%End
|
|
%ConvertToSubClassCode
|
|
if ( sipCpp->type() == QLatin1String( "marker" ) )
|
|
{
|
|
sipType = sipType_QgsAnnotationMarkerItem;
|
|
}
|
|
else if ( sipCpp->type() == QLatin1String( "linestring" ) )
|
|
{
|
|
sipType = sipType_QgsAnnotationLineStringItem;
|
|
}
|
|
else if ( sipCpp->type() == QLatin1String( "polygon" ) )
|
|
{
|
|
sipType = sipType_QgsAnnotationPolygonItem;
|
|
}
|
|
else
|
|
{
|
|
sipType = 0;
|
|
}
|
|
%End
|
|
public:
|
|
|
|
QgsAnnotationItem( const QgsCoordinateReferenceSystem &crs );
|
|
%Docstring
|
|
Constructor for an annotation item, with the specified ``crs`` for storing
|
|
its geographic location.
|
|
%End
|
|
|
|
|
|
virtual ~QgsAnnotationItem();
|
|
|
|
virtual QgsAnnotationItem *clone() = 0 /Factory/;
|
|
%Docstring
|
|
Returns a clone of the item. Ownership is transferred to the caller.
|
|
%End
|
|
|
|
virtual QString type() const = 0;
|
|
%Docstring
|
|
Returns a unique (untranslated) string identifying the type of item.
|
|
%End
|
|
|
|
virtual QgsRectangle boundingBox() const = 0;
|
|
%Docstring
|
|
Returns the bounding box of the item's geographic location.
|
|
|
|
The coordinate reference system for the bounding box is retrieved via :py:func:`~QgsAnnotationItem.crs`.
|
|
%End
|
|
|
|
QgsCoordinateReferenceSystem crs() const;
|
|
%Docstring
|
|
Returns the CRS used for storing the location of the item.
|
|
|
|
.. seealso:: :py:func:`setCrs`
|
|
%End
|
|
|
|
void setCrs( const QgsCoordinateReferenceSystem &crs );
|
|
%Docstring
|
|
Sets the ``crs`` used for storing the location of the item.
|
|
|
|
.. seealso:: :py:func:`crs`
|
|
%End
|
|
|
|
virtual void render( QgsRenderContext &context, QgsFeedback *feedback ) = 0;
|
|
%Docstring
|
|
Renders the item to the specified render ``context``.
|
|
|
|
The ``feedback`` argument can be used to detect render cancelations during expensive
|
|
render operations.
|
|
%End
|
|
|
|
virtual bool writeXml( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const = 0;
|
|
%Docstring
|
|
Writes the item's state into an XML ``element``.
|
|
%End
|
|
|
|
virtual bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) = 0;
|
|
%Docstring
|
|
Reads the item's state from the given DOM ``element``.
|
|
%End
|
|
|
|
int zIndex() const;
|
|
%Docstring
|
|
Returns the item's z index, which controls the order in which annotation items
|
|
are rendered in the layer.
|
|
|
|
.. seealso:: :py:func:`setZIndex`
|
|
%End
|
|
|
|
void setZIndex( int index );
|
|
%Docstring
|
|
Sets the item's z ``index``, which controls the order in which annotation items
|
|
are rendered in the layer.
|
|
|
|
.. seealso:: :py:func:`zIndex`
|
|
%End
|
|
|
|
private:
|
|
QgsAnnotationItem( const QgsAnnotationItem &other );
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/annotations/qgsannotationitem.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|