QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgslabelingresults.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslabelingresults.h
3  -------------------
4  begin : February 2021
5  copyright : (C) Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSLABELINGRESULTS_H
17 #define QGSLABELINGRESULTS_H
18 
19 #include "qgis_core.h"
20 #include "qgis_sip.h"
21 #include "qgslabelposition.h"
22 #include "qgscalloutposition.h"
23 #include <memory>
24 
25 class QgsLabelSearchTree;
26 
32 class CORE_EXPORT QgsLabelingResults
33 {
34  public:
37 
39  QgsLabelingResults( const QgsLabelingResults & ) = delete;
41  QgsLabelingResults &operator=( const QgsLabelingResults &rh ) = delete;
42 
48  QList< QgsLabelPosition > allLabels() const;
49 
53  QList<QgsLabelPosition> labelsAtPosition( const QgsPointXY &p ) const;
54 
58  QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle &r ) const;
59 
65  QList<QgsLabelPosition> groupedLabelPositions( long long groupId ) const;
66 
74  QList<QgsCalloutPosition> calloutsWithinRectangle( const QgsRectangle &rectangle ) const;
75 
80  void setMapSettings( const QgsMapSettings &settings );
81 
82  private:
83 #ifdef SIP_RUN
85 #endif
86 
87  std::unique_ptr< QgsLabelSearchTree > mLabelSearchTree;
88 
89  friend class QgsPalLabeling;
92 };
93 
94 #endif // QGSLABELINGRESULTS_H
qgslabelposition.h
QgsVectorLayerDiagramProvider
The QgsVectorLayerDiagramProvider class implements support for diagrams within the labeling engine....
Definition: qgsvectorlayerdiagramprovider.h:57
QgsLabelingResults
Class that stores computed placement from labeling engine.
Definition: qgslabelingresults.h:32
QgsVectorLayerLabelProvider
The QgsVectorLayerLabelProvider class implements a label provider for vector layers....
Definition: qgsvectorlayerlabelprovider.h:41
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:41
qgis_sip.h
qgscalloutposition.h
QgsPalLabeling
PAL labeling utilities.
Definition: qgspallabeling.h:1125
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:58
QgsLabelSearchTree
A class to query the labeling structure at a given point (small wrapper around pal RTree class)
Definition: qgslabelsearchtree.h:46
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map. The rendering itself is don...
Definition: qgsmapsettings.h:88