QGIS API Documentation  3.21.0-Master (5b68dc587e)
qgsrendereditemresults.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrendereditemresults.h
3  -------------------
4  begin : August 2021
5  copyright : (C) Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSRENDEREDITEMRESULTS_H
19 #define QGSRENDEREDITEMRESULTS_H
20 
21 #include "qgis_core.h"
22 #include "qgis_sip.h"
23 #include "qgsrectangle.h"
24 #include <memory>
25 #include <QList>
26 #include <vector>
27 #include <unordered_map>
28 
30 class QgsRenderContext;
32 
34 class QgsRenderedItemResultsSpatialIndex;
36 
42 class CORE_EXPORT QgsRenderedItemResults
43 {
44  public:
45 
54 
59 
63  QList< QgsRenderedItemDetails * > renderedItems() const;
64 
70  QList<const QgsRenderedAnnotationItemDetails *> renderedAnnotationItemsInBounds( const QgsRectangle &bounds ) const;
71 
80  void appendResults( const QList< QgsRenderedItemDetails * > &results SIP_TRANSFER, const QgsRenderContext &context );
81 
90  void transferResults( QgsRenderedItemResults *other, const QStringList &layerIds );
91 
99  void transferResults( QgsRenderedItemResults *other );
100 
104  void eraseResultsFromLayers( const QStringList &layerIds );
105 
106  private:
107 #ifdef SIP_RUN
109 #endif
110 
111  QgsRectangle mExtent;
112 
113  std::unordered_map< QString, std::vector< std::unique_ptr< QgsRenderedItemDetails > > > mDetails;
114  std::unique_ptr< QgsRenderedItemResultsSpatialIndex > mAnnotationItemsIndex;
115 
116 };
117 
118 #endif // QGSRENDEREDITEMRESULTS_H
A rectangle specified with double values.
Definition: qgsrectangle.h:42
Contains information about the context of a rendering operation.
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.
QgsRenderedItemResults(const QgsRenderedItemResults &)=delete
QgsRenderedItemResults cannot be copied.
QgsRenderedItemResults & operator=(const QgsRenderedItemResults &rh)=delete
QgsRenderedItemResults cannot be copied.
#define SIP_TRANSFER
Definition: qgis_sip.h:36