QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgslinevectorlayerdirector.h
Go to the documentation of this file.
1 /***************************************************************************
2  linevectorlayerdirector.h
3  --------------------------------------
4  Date : 2010-10-20
5  Copyright : (C) 2010 by Yakushev Sergey
6  Email : YakushevS <at> list.ru
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 #ifndef QGSLINEVECTORLAYERDIRECTORH
16 #define QGSLINEVECTORLAYERDIRECTORH
17 
18 //QT4 includes
19 
20 //QGIS includes
21 
22 // Road-graph plugin includes
23 #include "qgsgraphdirector.h"
24 
25 //forward declarations
27 class QgsVectorLayer;
28 
34 class ANALYSIS_EXPORT QgsLineVectorLayerDirector : public QgsGraphDirector
35 {
36  public:
46  int directionFieldId,
47  const QString& directDirectionValue,
48  const QString& reverseDirectionValue,
49  const QString& bothDirectionValue,
50  int defaultDirection
51  );
52 
54  virtual ~QgsLineVectorLayerDirector();
55 
56  /*
57  * MANDATORY DIRECTOR PROPERTY DECLARATION
58  */
59  void makeGraph( QgsGraphBuilderInterface *builder,
60  const QVector< QgsPoint >& additionalPoints,
61  QVector< QgsPoint>& tiedPoints ) const;
62 
63  QString name() const;
64 
65  private:
66  QgsVectorLayer *mVectorLayer;
67 
68  int mDirectionFieldId;
69 
70  QString mDirectDirectionValue;
71 
72  QString mReverseDirectionValue;
73 
74  QString mBothDirectionValue;
75 
76  //FIXME: need enum
77  int mDefaultDirection;
78 };
79 
80 #endif //QGSLINEVECTORLAYERGRAPHDIRECTORH
virtual void makeGraph(QgsGraphBuilderInterface *builder, const QVector< QgsPoint > &additionalPoints, QVector< QgsPoint > &tiedPoints) const
Make a graph using RgGraphBuilder.
Definition: qgsgraphdirector.h:58
Determine interface for creating a graph.
Definition: qgsgraphbuilderintr.h:34
Determine making the graph from vector line layer.
Definition: qgslinevectorlayerdirector.h:34
virtual QString name() const =0
return Director name
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:470
Determine making the graph.
Definition: qgsgraphdirector.h:35