QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
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 <memory>
22#include <unordered_map>
23#include <vector>
24
25#include "qgis_core.h"
26#include "qgis_sip.h"
27#include "qgsrectangle.h"
28
29#include <QList>
30
34
36class QgsRenderedItemResultsSpatialIndex;
38
44class CORE_EXPORT QgsRenderedItemResults
45{
46 public:
47
56
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
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.
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.
QgsRenderedItemResults(const QgsRenderedItemResults &)=delete
QgsRenderedItemResults & operator=(const QgsRenderedItemResults &rh)=delete
void transferResults(QgsRenderedItemResults *other, const QStringList &layerIds)
Transfers all results from an other QgsRenderedItemResults object where the items have layer IDs matc...
QList< const QgsRenderedAnnotationItemDetails * > renderedAnnotationItemsInBounds(const QgsRectangle &bounds) const
Returns a list with details of the rendered annotation items within the specified bounds.
QgsRenderedItemResults(const QgsRectangle &extent=QgsRectangle())
Constructor for QgsRenderedItemResults.
QList< QgsRenderedItemDetails * > renderedItems() const
Returns a list of all rendered items.
void eraseResultsFromLayers(const QStringList &layerIds)
Erases results from layers matching those in the specified list of layers IDs.
void appendResults(const QList< QgsRenderedItemDetails * > &results, const QgsRenderContext &context)
Appends rendered item details to the results object.
#define SIP_TRANSFER
Definition qgis_sip.h:36