QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
network
qgsgraphdirector.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgraphdirector.h
3
--------------------------------------
4
Date : 2010-10-18
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 QGSGRAPHDIRECTOR_H
17
#define QGSGRAPHDIRECTOR_H
18
19
#include "qgis_analysis.h"
20
#include "
qgis_sip.h
"
21
#include "
qgsfeedback.h
"
22
#include "
qgsnetworkstrategy.h
"
23
24
#include <QList>
25
#include <QObject>
26
#include <QVector>
27
28
class
QgsGraphBuilderInterface
;
29
class
QgsPoint
;
30
31
#ifdef SIP_RUN
32
//%ModuleHeaderCode
33
#include <
qgsvectorlayerdirector.h
>
34
//%End
35
#endif
36
43
class
ANALYSIS_EXPORT
QgsGraphDirector
:
public
QObject
44
{
45
#ifdef SIP_RUN
46
SIP_CONVERT_TO_SUBCLASS_CODE
47
if
(
dynamic_cast<
QgsVectorLayerDirector
*
>
( sipCpp ) != NULL )
48
sipType = sipType_QgsVectorLayerDirector;
49
else
50
sipType = NULL;
51
SIP_END
52
#endif
53
54
Q_OBJECT
55
56
public
:
57
~QgsGraphDirector
()
override
{ qDeleteAll(
mStrategies
); }
58
68
virtual
void
makeGraph
(
QgsGraphBuilderInterface
*builder,
const
QVector<QgsPointXY> &additionalPoints, QVector<QgsPointXY> &snappedPoints
SIP_OUT
,
QgsFeedback
*feedback =
nullptr
)
const
69
{
70
Q_UNUSED( builder )
71
Q_UNUSED( additionalPoints )
72
Q_UNUSED( snappedPoints )
73
Q_UNUSED( feedback )
74
}
75
77
void
addStrategy
(
QgsNetworkStrategy
*prop
SIP_TRANSFER
) {
mStrategies
.push_back( prop ); }
78
80
virtual
QString
name
()
const
= 0;
81
82
protected
:
83
QList<QgsNetworkStrategy *>
mStrategies
;
84
};
85
86
#endif
// QGSGRAPHDIRECTOR_H
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition
qgsfeedback.h:44
QgsGraphBuilderInterface
Interface for creating a graph.
Definition
qgsgraphbuilderinterface.h:44
QgsGraphDirector
Determine making the graph.
Definition
qgsgraphdirector.h:44
QgsGraphDirector::addStrategy
void addStrategy(QgsNetworkStrategy *prop)
Add optimization strategy.
Definition
qgsgraphdirector.h:77
QgsGraphDirector::~QgsGraphDirector
~QgsGraphDirector() override
Definition
qgsgraphdirector.h:57
QgsGraphDirector::mStrategies
QList< QgsNetworkStrategy * > mStrategies
Definition
qgsgraphdirector.h:83
QgsGraphDirector::makeGraph
virtual void makeGraph(QgsGraphBuilderInterface *builder, const QVector< QgsPointXY > &additionalPoints, QVector< QgsPointXY > &snappedPoints, QgsFeedback *feedback=nullptr) const
Make a graph using QgsGraphBuilder.
Definition
qgsgraphdirector.h:68
QgsGraphDirector::name
virtual QString name() const =0
Returns director name.
QgsNetworkStrategy
Defines strategy used for calculation of the edge cost in networks.
Definition
qgsnetworkstrategy.h:42
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition
qgspoint.h:53
QgsVectorLayerDirector
Determines creating a graph from a vector line layer.
Definition
qgsvectorlayerdirector.h:32
qgis_sip.h
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition
qgis_sip.h:203
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:35
SIP_OUT
#define SIP_OUT
Definition
qgis_sip.h:57
SIP_END
#define SIP_END
Definition
qgis_sip.h:220
qgsfeedback.h
qgsnetworkstrategy.h
qgsvectorlayerdirector.h
Generated on
for QGIS API Documentation by
1.17.0