QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsAnnotationItemAbstractGuiMetadata Class Reference

Stores GUI metadata about one annotation item class. More...

#include <qgsannotationitemguiregistry.h>

Inheritance diagram for QgsAnnotationItemAbstractGuiMetadata:
Inheritance graph
[legend]

Public Member Functions

 QgsAnnotationItemAbstractGuiMetadata (const QString &type, const QString &visibleName, const QString &groupId=QString(), Qgis::AnnotationItemGuiFlags flags=Qgis::AnnotationItemGuiFlags())
 Constructor for QgsAnnotationItemAbstractGuiMetadata with the specified class type.
 
virtual ~QgsAnnotationItemAbstractGuiMetadata ()=default
 
virtual QgsAnnotationItemcreateItem ()
 Creates an instance of the corresponding item type.
 
virtual QgsAnnotationItemBaseWidgetcreateItemWidget (QgsAnnotationItem *item)
 Creates a configuration widget for an item of this type.
 
virtual QgsCreateAnnotationItemMapToolInterfacecreateMapTool (QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget)
 Creates a map tool for a creating a new item of this type.
 
virtual QIcon creationIcon () const
 Returns an icon representing creation of the annotation item type.
 
Qgis::AnnotationItemGuiFlags flags () const
 Returns item flags.
 
QString groupId () const
 Returns the item group ID, if set.
 
virtual void newItemAddedToLayer (QgsAnnotationItem *item, QgsAnnotationLayer *layer)
 Called when a newly created item of the associated type has been added to a layer.
 
QString type () const
 Returns the unique item type code for the annotation item class.
 
QString visibleName () const
 Returns a translated, user visible name identifying the corresponding annotation item.
 

Detailed Description

Stores GUI metadata about one annotation item class.

This is a companion to QgsAnnotationItemAbstractMetadata, storing only the components related to the GUI behavior of an annotation item.

Note
In C++ you can use QgsAnnotationItemGuiMetadata convenience class.
Since
QGIS 3.22

Definition at line 45 of file qgsannotationitemguiregistry.h.

Constructor & Destructor Documentation

◆ QgsAnnotationItemAbstractGuiMetadata()

QgsAnnotationItemAbstractGuiMetadata::QgsAnnotationItemAbstractGuiMetadata ( const QString &  type,
const QString &  visibleName,
const QString &  groupId = QString(),
Qgis::AnnotationItemGuiFlags  flags = Qgis::AnnotationItemGuiFlags() 
)
inline

Constructor for QgsAnnotationItemAbstractGuiMetadata with the specified class type.

visibleName should be set to a translated, user visible name identifying the corresponding annotation item.

An optional groupId can be set, which allows grouping of related annotation item classes. See QgsAnnotationItemGuiMetadata for details.

Definition at line 56 of file qgsannotationitemguiregistry.h.

◆ ~QgsAnnotationItemAbstractGuiMetadata()

virtual QgsAnnotationItemAbstractGuiMetadata::~QgsAnnotationItemAbstractGuiMetadata ( )
virtualdefault

Member Function Documentation

◆ createItem()

QgsAnnotationItem * QgsAnnotationItemAbstractGuiMetadata::createItem ( )
virtual

Creates an instance of the corresponding item type.

Reimplemented in QgsAnnotationItemGuiMetadata.

Definition at line 45 of file qgsannotationitemguiregistry.cpp.

◆ createItemWidget()

QgsAnnotationItemBaseWidget * QgsAnnotationItemAbstractGuiMetadata::createItemWidget ( QgsAnnotationItem item)
virtual

Creates a configuration widget for an item of this type.

Can return nullptr if no configuration GUI is required.

Reimplemented in QgsAnnotationItemGuiMetadata.

Definition at line 35 of file qgsannotationitemguiregistry.cpp.

◆ createMapTool()

QgsCreateAnnotationItemMapToolInterface * QgsAnnotationItemAbstractGuiMetadata::createMapTool ( QgsMapCanvas canvas,
QgsAdvancedDigitizingDockWidget cadDockWidget 
)
virtual

Creates a map tool for a creating a new item of this type.

May return nullptr if no map tool is available for creating the item.

Reimplemented in QgsAnnotationItemGuiMetadata.

Definition at line 40 of file qgsannotationitemguiregistry.cpp.

◆ creationIcon()

QIcon QgsAnnotationItemAbstractGuiMetadata::creationIcon ( ) const
virtual

Returns an icon representing creation of the annotation item type.

Reimplemented in QgsAnnotationItemGuiMetadata.

Definition at line 30 of file qgsannotationitemguiregistry.cpp.

◆ flags()

Qgis::AnnotationItemGuiFlags QgsAnnotationItemAbstractGuiMetadata::flags ( ) const
inline

Returns item flags.

Definition at line 73 of file qgsannotationitemguiregistry.h.

◆ groupId()

QString QgsAnnotationItemAbstractGuiMetadata::groupId ( ) const
inline

Returns the item group ID, if set.

Definition at line 78 of file qgsannotationitemguiregistry.h.

◆ newItemAddedToLayer()

void QgsAnnotationItemAbstractGuiMetadata::newItemAddedToLayer ( QgsAnnotationItem item,
QgsAnnotationLayer layer 
)
virtual

Called when a newly created item of the associated type has been added to a layer.

This is only called for additions which result from GUI operations - i.e. it is not called for items added programmatically.

Reimplemented in QgsAnnotationItemGuiMetadata.

Definition at line 50 of file qgsannotationitemguiregistry.cpp.

◆ type()

QString QgsAnnotationItemAbstractGuiMetadata::type ( ) const
inline

Returns the unique item type code for the annotation item class.

Definition at line 68 of file qgsannotationitemguiregistry.h.

◆ visibleName()

QString QgsAnnotationItemAbstractGuiMetadata::visibleName ( ) const
inline

Returns a translated, user visible name identifying the corresponding annotation item.

Definition at line 83 of file qgsannotationitemguiregistry.h.


The documentation for this class was generated from the following files: