Quantum GIS API Documentation
1.7.4
|
00001 /*************************************************************************** 00002 qgslabelsearchtree.h 00003 Node for raster calculator tree 00004 -------------------- 00005 begin : 2010-11-02 00006 copyright : (C) 2010 by Marco Hugentobler 00007 email : marco dot hugentobler at sourcepole dot ch 00008 ***************************************************************************/ 00009 00010 /*************************************************************************** 00011 * * 00012 * This program is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU General Public License as published by * 00014 * the Free Software Foundation; either version 2 of the License, or * 00015 * (at your option) any later version. * 00016 * * 00017 ***************************************************************************/ 00018 00019 #ifndef QGSLABELSEARCHTREE_H 00020 #define QGSLABELSEARCHTREE_H 00021 00022 #include "qgspoint.h" 00023 #include "qgsmaprenderer.h" 00024 #include <QList> 00025 #include <QVector> 00026 #include <pointset.h> 00027 #include <labelposition.h> 00028 #include "qgsrectangle.h" 00029 00030 using namespace pal; 00031 00033 class CORE_EXPORT QgsLabelSearchTree 00034 { 00035 public: 00036 QgsLabelSearchTree(); 00037 ~QgsLabelSearchTree(); 00038 00040 void clear(); 00041 00043 void label( const QgsPoint& p, QList<QgsLabelPosition*>& posList ); 00044 00047 bool insertLabel( LabelPosition* labelPos, int featureId, const QString& layerName, bool diagram = false ); 00048 00049 private: 00050 RTree<QgsLabelPosition*, double, 2, double> mSpatialIndex; 00051 }; 00052 00053 #endif // QGSLABELTREE_H