84 if ( layerId.isEmpty() )
88 if ( !renderedItemResults )
93 const QList<QgsRenderedItemDetails *> items = renderedItemResults->
renderedItems();
94 const QString annotationId =
mItemId;
95 auto it = std::find_if( items.begin(), items.end(), [layerId, annotationId](
const QgsRenderedItemDetails * item )
97 if ( const QgsRenderedAnnotationItemDetails *annotationItem = dynamic_cast< const QgsRenderedAnnotationItemDetails *>( item ) )
99 if ( annotationItem->itemId() == annotationId && annotationItem->layerId() == layerId )
104 if ( it != items.end() )
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.
const QgsRenderedItemResults * renderedItemResults(bool allowOutdatedResults=true) const
Gets access to the rendered item results (may be nullptr), which includes the results of rendering an...
Contains information about a rendered annotation item.
Base class for detailed information about a rendered item.
Stores collated details of rendered items during a map rendering operation.
QList< QgsRenderedItemDetails * > renderedItems() const
Returns a list of all rendered items.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.