QGIS API Documentation  2.17.0-Master (eef6f05)
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  Q_OBJECT
37 
38  public:
48  int directionFieldId,
49  const QString& directDirectionValue,
50  const QString& reverseDirectionValue,
51  const QString& bothDirectionValue,
52  int defaultDirection
53  );
54 
56  virtual ~QgsLineVectorLayerDirector();
57 
58  /*
59  * MANDATORY DIRECTOR PROPERTY DECLARATION
60  */
61  void makeGraph( QgsGraphBuilderInterface *builder,
62  const QVector< QgsPoint >& additionalPoints,
63  QVector< QgsPoint>& tiedPoints ) const override;
64 
65  QString name() const override;
66 
67  private:
68  QgsVectorLayer *mVectorLayer;
69 
70  int mDirectionFieldId;
71 
72  QString mDirectDirectionValue;
73 
74  QString mReverseDirectionValue;
75 
76  QString mBothDirectionValue;
77 
78  //FIXME: need enum
79  int mDefaultDirection;
80 };
81 
82 #endif //QGSLINEVECTORLAYERGRAPHDIRECTORH
Determine interface for creating a graph.
Determine making the graph from vector line layer.
virtual QString name() const =0
return Director name
virtual void makeGraph(QgsGraphBuilderInterface *builder, const QVector< QgsPoint > &additionalPoints, QVector< QgsPoint > &tiedPoints) const
Make a graph using RgGraphBuilder.
Represents a vector layer which manages a vector based data sets.
Determine making the graph.