QGIS API Documentation  2.99.0-Master (2270603)
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:
39 
49  int directionFieldId,
50  const QString& directDirectionValue,
51  const QString& reverseDirectionValue,
52  const QString& bothDirectionValue,
53  int defaultDirection
54  );
55 
57  virtual ~QgsLineVectorLayerDirector();
58 
59  /*
60  * MANDATORY DIRECTOR PROPERTY DECLARATION
61  */
62  void makeGraph( QgsGraphBuilderInterface *builder,
63  const QVector< QgsPoint >& additionalPoints,
64  QVector< QgsPoint>& tiedPoints ) const override;
65 
66  QString name() const override;
67 
68  private:
69  QgsVectorLayer *mVectorLayer;
70 
71  int mDirectionFieldId;
72 
73  QString mDirectDirectionValue;
74 
75  QString mReverseDirectionValue;
76 
77  QString mBothDirectionValue;
78 
79  //FIXME: need enum
80  int mDefaultDirection;
81 };
82 
83 #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.