22#include "moc_qgscreateannotationitemmaptool.cpp"
26 , mMapCanvas( canvas )
28 Q_UNUSED( cadDockWidget )
33 return mCreatedItem.release();
40 if (
QgsAnnotationLayer *res = qobject_cast<QgsAnnotationLayer *>( mMapCanvas->currentLayer() ) )
48 mCreatedItem.
reset( item );
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
Represents a map layer containing a set of georeferenced annotations, e.g.
void reset()
Resets the annotation layer to a default state, and clears all items from it.
Map canvas is a class for displaying all GIS data types on a canvas.
static QgsProject * instance()
Returns the QgsProject singleton instance.
QgsAnnotationLayer * mainAnnotationLayer()
Returns the main annotation layer associated with the project.