16#ifndef QGSANNOTATIONITEMREGISTRY_H
17#define QGSANNOTATIONITEMREGISTRY_H
26#include <QGraphicsItem>
64 QString
type()
const {
return mType; }
86 QString mVisibleNamePlural;
190 QMap< QString, QString>
itemTypes()
const;
198 void typeAdded(
const QString &type,
const QString &name );
205 QMap<QString, QgsAnnotationItemAbstractMetadata *> mMetadata;
QgsAnnotationItem * createItem(const QString &type) const
Creates a new instance of a annotation item given the item type.
QgsAnnotationItemAbstractMetadata * itemMetadata(const QString &type) const
Returns the metadata for the specified item type.
void typeAdded(const QString &type, const QString &name)
Emitted whenever a new item type is added to the registry, with the specified type and visible name.
bool populate()
Populates the registry with standard item types.
QgsAnnotationItemRegistry(QObject *parent=nullptr)
Creates a new empty item registry.
QMap< QString, QString > itemTypes() const
Returns a map of available item types to translated name.
bool addItemType(QgsAnnotationItemAbstractMetadata *metadata)
Registers a new annotation item type.
QgsAnnotationItemRegistry(const QgsAnnotationItemRegistry &rh)=delete
QgsAnnotationItemRegistry & operator=(const QgsAnnotationItemRegistry &rh)=delete
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
A container for the context for various read/write operations on objects.
std::function< QgsAnnotationItem *()> QgsAnnotationItemCreateFunc
Annotation item creation function.