Quantum GIS API Documentation  1.8
src/analysis/network/qgslinevectorlayerdirector.h
Go to the documentation of this file.
00001 /***************************************************************************
00002   linevectorlayerdirector.h
00003   --------------------------------------
00004   Date                 : 2010-10-20
00005   Copyright            : (C) 2010 by Yakushev Sergey
00006   Email                : YakushevS <at> list.ru
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 QGSLINEVECTORLAYERDIRECTORH
00016 #define QGSLINEVECTORLAYERDIRECTORH
00017 
00018 //QT4 includes
00019 
00020 //QGIS includes
00021 
00022 // Road-graph plugin includes
00023 #include "qgsgraphdirector.h"
00024 
00025 //forward declarations
00026 class QgsGraphBuilderInterface;
00027 class QgsVectorLayer;
00028 
00034 class ANALYSIS_EXPORT QgsLineVectorLayerDirector : public QgsGraphDirector
00035 {
00036   public:
00045     QgsLineVectorLayerDirector( QgsVectorLayer* vl,
00046                                 int directionFieldId,
00047                                 const QString& directDirectionValue,
00048                                 const QString& reverseDirectionValue,
00049                                 const QString& bothDirectionValue,
00050                                 int defaultDirection
00051                               );
00052 
00054     virtual ~QgsLineVectorLayerDirector();
00055 
00056     /*
00057      * MANDATORY DIRECTOR PROPERTY DECLARATION
00058      */
00059     void makeGraph( QgsGraphBuilderInterface *builder,
00060                     const QVector< QgsPoint >& additionalPoints,
00061                     QVector< QgsPoint>& tiedPoints ) const;
00062 
00063     QString name() const;
00064 
00065 
00066   private:
00067 
00068     QgsVectorLayer *mVectorLayer;
00069 
00070     int mDirectionFieldId;
00071 
00072     QString mDirectDirectionValue;
00073 
00074     QString mReverseDirectionValue;
00075 
00076     QString mBothDirectionValue;
00077 
00078     //FIXME: need enum
00079     int mDefaultDirection;
00080 };
00081 
00082 #endif //QGSLINEVECTORLAYERGRAPHDIRECTORH
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines