QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 
58  QgsRenderedItemResults &operator=( const QgsRenderedItemResults &rh ) = delete;
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
qgsrectangle.h
QgsRenderContext
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:59
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:41
QgsRenderedItemDetails
Base class for detailed information about a rendered item.
Definition: qgsrendereditemdetails.h:36
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsRenderedAnnotationItemDetails
Contains information about a rendered annotation item.
Definition: qgsrenderedannotationitemdetails.h:29
QgsRenderedItemResults
Stores collated details of rendered items during a map rendering operation.
Definition: qgsrendereditemresults.h:42