Quantum GIS API Documentation
1.8
|
00001 /*************************************************************************** 00002 qgsgraphbuilder.h 00003 -------------------------------------- 00004 Date : 2010-10-25 00005 Copyright : (C) 2010 by Yakushev Sergey 00006 Email : [email protected] 00007 **************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 #ifndef QGSGRAPHBUILDERH 00016 #define QGSGRAPHBUILDERH 00017 00018 #include "qgsgraphbuilderintr.h" 00019 00020 //QT4 includes 00021 00022 //QGIS includes 00023 #include <qgsspatialindex.h> 00024 00025 //forward declarations 00026 class QgsDistanceArea; 00027 class QgsCoordinateTransform; 00028 class QgsGraph; 00029 00036 class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface 00037 { 00038 public: 00042 QgsGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = "WGS84" ); 00043 00044 ~QgsGraphBuilder(); 00045 00046 /* 00047 * MANDATORY BUILDER PROPERTY DECLARATION 00048 */ 00049 virtual void addVertex( int id, const QgsPoint& pt ); 00050 00051 virtual void addArc( int pt1id, const QgsPoint& pt1, int pt2id, const QgsPoint& pt2, const QVector< QVariant >& prop ); 00052 00056 QgsGraph* graph(); 00057 00058 private: 00059 00060 QgsGraph *mGraph; 00061 }; 00062 #endif //QGSGRAPHBUILDERH