QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgsvectorlayerdirector.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectorlayerdirector.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
16#ifndef QGSVECTORLAYERDIRECTOR_H
17#define QGSVECTORLAYERDIRECTOR_H
18
19#include "qgis.h"
20
21#include "qgsgraphdirector.h"
22#include "qgis_analysis.h"
23
26
32class ANALYSIS_EXPORT QgsVectorLayerDirector : public QgsGraphDirector
33{
34 Q_OBJECT
35
36 public:
37
51
63 int directionFieldId,
64 const QString &directDirectionValue,
65 const QString &reverseDirectionValue,
66 const QString &bothDirectionValue,
67 Direction defaultDirection
68 );
69
70 /*
71 * MANDATORY DIRECTOR PROPERTY DECLARATION
72 */
74 const QVector< QgsPointXY > &additionalPoints,
75 QVector< QgsPointXY> &snappedPoints SIP_OUT,
76 QgsFeedback *feedback = nullptr ) const override;
77
78 QString name() const override;
79
80 private:
81 QgsFeatureSource *mSource = nullptr;
82 int mDirectionFieldId = -1;
83 QString mDirectDirectionValue;
84 QString mReverseDirectionValue;
85 QString mBothDirectionValue;
86 Direction mDefaultDirection = DirectionBoth;
87
88 QgsAttributeList requiredAttributes() const;
89 Direction directionForFeature( const QgsFeature &feature ) const;
90};
91
92#endif // QGSVECTORLAYERDIRECTOR_H
An interface for objects which provide features via a getFeatures method.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
Determine interface for creating a graph.
Determine making the graph.
virtual void makeGraph(QgsGraphBuilderInterface *builder, const QVector< QgsPointXY > &additionalPoints, QVector< QgsPointXY > &snappedPoints, QgsFeedback *feedback=nullptr) const
Make a graph using QgsGraphBuilder.
virtual QString name() const =0
Returns director name.
Determine making the graph from vector line layer.
Direction
Edge direction Edge can be one-way with direct flow (one can move only from the start point to the en...
@ DirectionBackward
One-way reversed.
#define SIP_OUT
Definition qgis_sip.h:58
QList< int > QgsAttributeList
Definition qgsfield.h:27