QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
Stores GUI metadata about one annotation item class. More...
#include <qgsannotationitemguiregistry.h>
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 QgsAnnotationItem * | createItem () |
Creates an instance of the corresponding item type. | |
virtual QgsAnnotationItemBaseWidget * | createItemWidget (QgsAnnotationItem *item) |
Creates a configuration widget for an item of this type. | |
virtual QgsCreateAnnotationItemMapToolInterface * | createMapTool (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. | |
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.
Definition at line 45 of file qgsannotationitemguiregistry.h.
|
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.
|
virtualdefault |
|
virtual |
Creates an instance of the corresponding item type.
Reimplemented in QgsAnnotationItemGuiMetadata.
Definition at line 46 of file qgsannotationitemguiregistry.cpp.
|
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 36 of file qgsannotationitemguiregistry.cpp.
|
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 41 of file qgsannotationitemguiregistry.cpp.
|
virtual |
Returns an icon representing creation of the annotation item type.
Reimplemented in QgsAnnotationItemGuiMetadata.
Definition at line 31 of file qgsannotationitemguiregistry.cpp.
|
inline |
Returns item flags.
Definition at line 73 of file qgsannotationitemguiregistry.h.
|
inline |
Returns the item group ID, if set.
Definition at line 78 of file qgsannotationitemguiregistry.h.
|
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 51 of file qgsannotationitemguiregistry.cpp.
|
inline |
Returns the unique item type code for the annotation item class.
Definition at line 68 of file qgsannotationitemguiregistry.h.
|
inline |
Returns a translated, user visible name identifying the corresponding annotation item.
Definition at line 83 of file qgsannotationitemguiregistry.h.