24#include "moc_qgsannotationitemwidget.cpp"
84 layerId =
layer->id();
86 if ( layerId.isEmpty() )
90 if ( !renderedItemResults )
95 const QList<QgsRenderedItemDetails *> items = renderedItemResults->
renderedItems();
96 const QString annotationId =
mItemId;
97 auto it = std::find_if( items.begin(), items.end(), [layerId, annotationId](
const QgsRenderedItemDetails *item ) {
98 if ( const QgsRenderedAnnotationItemDetails *annotationItem = dynamic_cast<const QgsRenderedAnnotationItemDetails *>( item ) )
100 if ( annotationItem->itemId() == annotationId && annotationItem->layerId() == layerId )
105 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,...