QGIS API Documentation 4.3.0-Master (389d690bb77)
Loading...
Searching...
No Matches
qgslabelsearchtree.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslabelsearchtree.h
3 Node for raster calculator tree
4 --------------------
5 begin : 2010-11-02
6 copyright : (C) 2010 by Marco Hugentobler
7 email : marco dot hugentobler at sourcepole dot ch
8***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#ifndef QGSLABELSEARCHTREE_H
20#define QGSLABELSEARCHTREE_H
21
22#include "qgis_core.h"
23#include "qgis_sip.h"
24#include "qgscalloutposition.h"
26#include "qgslabelposition.h"
27#include "qgsmapsettings.h"
28
29#include <QList>
30#include <QVector>
31
32class QgsPointXY;
33
34#ifndef SIP_RUN
35namespace pal
36{
37 class LabelPosition;
38}
39#endif
40
41// TODO QGIS 5.0 - this should be private, not exposed to SIP
42
49class CORE_EXPORT QgsLabelSearchTree
50{
51 public:
54
57
62 Q_DECL_DEPRECATED void clear() SIP_DEPRECATED;
63
68 void label( const QgsPointXY &p, QList<QgsLabelPosition *> &posList ) const SIP_SKIP;
69
75 Q_DECL_DEPRECATED QList< QgsLabelPosition > allLabels() const SIP_DEPRECATED;
76
81 void labelsInRect( const QgsRectangle &r, QList<QgsLabelPosition *> &posList ) const SIP_SKIP;
82
92 QList<const QgsCalloutPosition *> calloutsInRectangle( const QgsRectangle &rectangle ) const;
93
98 Q_DECL_DEPRECATED void setMapSettings( const QgsMapSettings &settings ) SIP_DEPRECATED;
99
100 private:
103
104#ifdef SIP_RUN
107#endif
108
109 friend class QgsLabelingResults;
110};
111
112#endif // QGSLABELTREE_H
Represents the calculated placement of a map label callout line.
A generic rtree spatial index based on a libspatialindex backend.
Represents the calculated placement of a map label.
QgsLabelSearchTree & operator=(const QgsLabelSearchTree &rh)=delete
Q_DECL_DEPRECATED void clear()
Removes and deletes all the entries.
void label(const QgsPointXY &p, QList< QgsLabelPosition * > &posList) const
Returns label position(s) at a given point.
QgsLabelSearchTree(const QgsLabelSearchTree &rh)=delete
void labelsInRect(const QgsRectangle &r, QList< QgsLabelPosition * > &posList) const
Returns label position(s) in given rectangle.
QList< const QgsCalloutPosition * > calloutsInRectangle(const QgsRectangle &rectangle) const
Returns the list of callouts with origins or destinations inside the given rectangle.
friend class QgsLabelingResults
Q_DECL_DEPRECATED void setMapSettings(const QgsMapSettings &settings)
Sets the map settings associated with the labeling run.
Q_DECL_DEPRECATED QList< QgsLabelPosition > allLabels() const
Returns a list of all labels generated by the labeling run.
Contains configuration for rendering maps.
Represents a 2D point.
Definition qgspointxy.h:62
A rectangle specified with double values.
LabelPosition is a candidate feature label position.
#define SIP_DEPRECATED
Definition qgis_sip.h:113
#define SIP_SKIP
Definition qgis_sip.h:138