16#ifndef QGSANNOTATIONITEMGUIREGISTRY_H
17#define QGSANNOTATIONITEMGUIREGISTRY_H
56 QgsAnnotationItemAbstractGuiMetadata(
const QString &type,
const QString &visibleName,
const QString &groupId = QString(), Qgis::AnnotationItemGuiFlags flags = Qgis::AnnotationItemGuiFlags() )
59 , mName( visibleName )
68 QString
type()
const {
return mType; }
73 Qgis::AnnotationItemGuiFlags
flags()
const {
return mFlags; }
78 QString
groupId()
const {
return mGroupId; }
88 virtual QIcon creationIcon()
const;
135 Qgis::AnnotationItemGuiFlags mFlags;
171 const QString &groupId = QString(),
172 Qgis::AnnotationItemGuiFlags flags = Qgis::AnnotationItemGuiFlags(),
176 , mIcon( creationIcon )
177 , mWidgetFunc( pfWidget )
178 , mCreateFunc( pfCreateFunc )
179 , mCreateMapToolFunc( pfCreateMapToolFunc )
230 QIcon creationIcon()
const override;
339 int metadataIdForItemType(
const QString &type )
const;
414 QList< int > itemMetadataIds()
const;
419 void addDefaultItems();
434 QMap< int, QgsAnnotationItemAbstractGuiMetadata *> mMetadata;
436 QMap< QString, QgsAnnotationItemGuiGroup > mItemGroups;
The Qgis class provides global constants for use throughout the application.
Stores GUI metadata about a group of annotation item classes.
QgsAnnotationItemGuiGroup(const QString &id=QString(), const QString &name=QString(), const QIcon &icon=QIcon())
Constructor for QgsAnnotationItemGuiGroup.
QString name
Translated group name.
QString id
Unique (untranslated) group ID string.
QIcon icon
Icon for group.
Registry of available annotation item GUI behavior.
QgsAnnotationItemGuiRegistry(const QgsAnnotationItemGuiRegistry &rh)=delete
QgsAnnotationItemGuiRegistry cannot be copied.
void typeAdded(int metadataId)
Emitted whenever a new item type is added to the registry, with the specified metadataId.
QgsAnnotationItemGuiRegistry & operator=(const QgsAnnotationItemGuiRegistry &rh)=delete
QgsAnnotationItemGuiRegistry cannot be copied.
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
Represents a map layer containing a set of georeferenced annotations, e.g.
Map canvas is a class for displaying all GIS data types on a canvas.
std::function< QgsCreateAnnotationItemMapToolInterface *(QgsMapCanvas *, QgsAdvancedDigitizingDockWidget *)> QgsCreateAnnotationItemMapToolFunc
Create annotation map tool creation function.
std::function< void(QgsAnnotationItem *, QgsAnnotationLayer *layer)> QgsAnnotationItemAddedToLayerFunc
Annotation item added to layer callback.
std::function< QgsAnnotationItemBaseWidget *(QgsAnnotationItem *)> QgsAnnotationItemWidgetFunc
Annotation item configuration widget creation function.
std::function< QgsAnnotationItem *()> QgsAnnotationItemCreateFunc
Annotation item creation function.