mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
117 lines
3.5 KiB
Plaintext
117 lines
3.5 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/annotations/qgsannotationlayer.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsAnnotationLayer : QgsMapLayer
|
|
{
|
|
%Docstring
|
|
|
|
Represents a map layer containing a set of georeferenced annotations, e.g. markers, lines, polygons or
|
|
text items.
|
|
|
|
Annotation layers store a set of QgsAnnotationItem items, which are rendered according to the item's
|
|
z-order.
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsannotationlayer.h"
|
|
%End
|
|
public:
|
|
|
|
struct LayerOptions
|
|
{
|
|
|
|
explicit LayerOptions( const QgsCoordinateTransformContext &transformContext );
|
|
%Docstring
|
|
Constructor for LayerOptions.
|
|
%End
|
|
|
|
QgsCoordinateTransformContext transformContext;
|
|
|
|
};
|
|
|
|
|
|
QgsAnnotationLayer( const QString &name, const QgsAnnotationLayer::LayerOptions &options );
|
|
%Docstring
|
|
Constructor for a new QgsAnnotationLayer with the specified layer ``name``.
|
|
|
|
The ``options`` argument specifies load-time layer options.
|
|
%End
|
|
~QgsAnnotationLayer();
|
|
|
|
void addItem( QgsAnnotationItem *item /Transfer/ );
|
|
%Docstring
|
|
Adds an ``item`` to the layer.
|
|
|
|
Ownership of ``item`` is transferred to the layer.
|
|
%End
|
|
|
|
|
|
const QMap<QString, QgsAnnotationItem *> &items() const;
|
|
%Docstring
|
|
Returns a map of items contained in the layer.
|
|
|
|
This map contains references to items owned by the layer, and ownership of these remains
|
|
with the layer.
|
|
%End
|
|
|
|
void setOpacity( double opacity );
|
|
%Docstring
|
|
Sets the ``opacity`` for the annotation layer, where ``opacity`` is a value between 0 (totally transparent)
|
|
and 1.0 (fully opaque).
|
|
|
|
.. seealso:: :py:func:`opacity`
|
|
%End
|
|
|
|
double opacity() const;
|
|
%Docstring
|
|
Returns the opacity for the annotation layer, where opacity is a value between 0 (totally transparent)
|
|
and 1.0 (fully opaque).
|
|
|
|
.. seealso:: :py:func:`setOpacity`
|
|
%End
|
|
|
|
|
|
virtual QgsAnnotationLayer *clone() const /Factory/;
|
|
|
|
virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/;
|
|
|
|
virtual QgsRectangle extent() const;
|
|
|
|
|
|
|
|
virtual void setTransformContext( const QgsCoordinateTransformContext &context );
|
|
|
|
virtual bool readXml( const QDomNode &layerNode, QgsReadWriteContext &context );
|
|
|
|
virtual bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const;
|
|
|
|
virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &, StyleCategories categories = AllStyleCategories ) const;
|
|
|
|
virtual bool readSymbology( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories );
|
|
|
|
virtual QgsDataProvider *dataProvider();
|
|
|
|
|
|
};
|
|
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/annotations/qgsannotationlayer.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|