17#include "moc_qgsannotationitemwidget.cpp"
85 if ( layerId.isEmpty() )
89 if ( !renderedItemResults )
94 const QList<QgsRenderedItemDetails *> items = renderedItemResults->
renderedItems();
95 const QString annotationId =
mItemId;
96 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,...
QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.