mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-25 00:05:24 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			190 lines
		
	
	
		
			5.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			190 lines
		
	
	
		
			5.4 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(signature="appended")
 | |
| 
 | |
| Represents a map layer containing a set of georeferenced annotations, e.g. markers, lines, polygons or
 | |
| text items.
 | |
| 
 | |
| Annotation layers store a set of :py:class:`QgsAnnotationItem` items, which are rendered according to the item's
 | |
| z-order.
 | |
| 
 | |
| .. versionadded:: 3.16
 | |
| %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();
 | |
| 
 | |
|     SIP_PYOBJECT __repr__();
 | |
| %MethodCode
 | |
|     QString str = QStringLiteral( "<QgsAnnotationLayer: '%1'>" ).arg( sipCpp->name() );
 | |
|     sipRes = PyUnicode_FromString( str.toUtf8().constData() );
 | |
| %End
 | |
| 
 | |
|     void reset();
 | |
| %Docstring
 | |
| Resets the annotation layer to a default state, and clears all items from it.
 | |
| %End
 | |
| 
 | |
|     QString addItem( QgsAnnotationItem *item /Transfer/ );
 | |
| %Docstring
 | |
| Adds an ``item`` to the layer.
 | |
| 
 | |
| Ownership of ``item`` is transferred to the layer.
 | |
| 
 | |
| Returns the unique ID assigned to the item.
 | |
| %End
 | |
| 
 | |
|     void replaceItem( const QString &id, QgsAnnotationItem *item /Transfer/ );
 | |
| %Docstring
 | |
| Replaces the existing item with matching ``id`` with a new ``item``.
 | |
| 
 | |
| Ownership of ``item`` is transferred to the layer.
 | |
| 
 | |
| .. versionadded:: 3.22
 | |
| %End
 | |
| 
 | |
|     bool removeItem( const QString &id );
 | |
| %Docstring
 | |
| Removes (and deletes) the item with matching ``id``.
 | |
| %End
 | |
| 
 | |
|     void clear();
 | |
| %Docstring
 | |
| Removes all items from the layer.
 | |
| %End
 | |
| 
 | |
|     bool isEmpty() const;
 | |
| %Docstring
 | |
| Returns ``True`` if the annotation layer is empty and contains no annotations.
 | |
| %End
 | |
| 
 | |
|     QMap<QString, QgsAnnotationItem *> items() const;
 | |
| %Docstring
 | |
| Returns a map of items contained in the layer, by unique item ID.
 | |
| 
 | |
| This map contains references to items owned by the layer, and ownership of these remains
 | |
| with the layer.
 | |
| %End
 | |
| 
 | |
|     QgsAnnotationItem *item( const QString &id );
 | |
| %Docstring
 | |
| Returns the item with the specified ``id``, or ``None`` if no matching item was found.
 | |
| 
 | |
| .. versionadded:: 3.22
 | |
| %End
 | |
| 
 | |
|     QStringList itemsInBounds( const QgsRectangle &bounds, QgsRenderContext &context, QgsFeedback *feedback = 0 ) const;
 | |
| %Docstring
 | |
| Returns a list of the IDs of all annotation items within the specified ``bounds`` (in layer CRS), when
 | |
| rendered using the given render ``context``.
 | |
| 
 | |
| The optional ``feedback`` argument can be used to cancel the search early.
 | |
| 
 | |
| .. versionadded:: 3.22
 | |
| %End
 | |
| 
 | |
|     Qgis::AnnotationItemEditOperationResult applyEdit( QgsAbstractAnnotationItemEditOperation *operation );
 | |
| %Docstring
 | |
| Applies an edit ``operation`` to the layer.
 | |
| 
 | |
| Returns ``True`` if the operation was successfully applied.
 | |
| 
 | |
| .. versionadded:: 3.22
 | |
| %End
 | |
| 
 | |
|     virtual Qgis::MapLayerProperties properties() const;
 | |
| 
 | |
|     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 bool isEditable() const;
 | |
| 
 | |
|     virtual bool supportsEditing() const;
 | |
| 
 | |
|     virtual QgsDataProvider *dataProvider();
 | |
| 
 | |
|     virtual QString htmlMetadata() const;
 | |
| 
 | |
| 
 | |
|     QgsPaintEffect *paintEffect() const;
 | |
| %Docstring
 | |
| Returns the current paint effect for the layer.
 | |
| 
 | |
| .. seealso:: :py:func:`setPaintEffect`
 | |
| 
 | |
| .. versionadded:: 3.22
 | |
| %End
 | |
| 
 | |
|     void setPaintEffect( QgsPaintEffect *effect /Transfer/ );
 | |
| %Docstring
 | |
| Sets the current paint ``effect`` for the layer.
 | |
| 
 | |
| Ownership is transferred to the renderer.
 | |
| 
 | |
| .. seealso:: :py:func:`paintEffect`
 | |
| 
 | |
| .. versionadded:: 3.22
 | |
| %End
 | |
| 
 | |
| };
 | |
| 
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/annotations/qgsannotationlayer.h                            *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 |