Skip to content

Commit 4616b8e

Browse files
committed
using only 'vertex/arc' notation
1 parent 79f3911 commit 4616b8e

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/analysis/network/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
SET(QGIS_NETWORK_ANALYSIS_SRCS
77
qgsgraph.cpp
88
qgsgraphbuilder.cpp
9-
qgsdistanceedgeproperter.cpp
9+
qgsdistancearcproperter.cpp
1010
qgslinevectorlayerdirector.cpp
1111
qgsgraphanalyzer.cpp
1212
)
@@ -57,8 +57,8 @@ SET(QGIS_NETWORK_ANALYSIS_HDRS
5757
qgsgraph.h
5858
qgsgraphbuilderintr.h
5959
qgsgraphbuilder.h
60-
qgsedgeproperter.h
61-
qgsdistanceedgeproperter.h
60+
qgsarcproperter.h
61+
qgsdistancearcproperter.h
6262
qgsgraphdirector.h
6363
qgslinevectorlayerdirector.h
6464
qgsgraphanalyzer.h )

src/analysis/network/qgsedgeproperter.h renamed to src/analysis/network/qgsarcproperter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
* \ingroup networkanalysis
2828
* \class QgsEdgeProperter
2929
* \brief QgsEdgeProperter is a strategy pattern.
30-
* You can use it for customize edge property. For example look at QgsDistanceEdgeProperter or src/plugins/roadgraph/speedproperter.h
30+
* You can use it for customize arc property. For example look at QgsDistanceArcProperter or src/plugins/roadgraph/speedproperter.h
3131
*/
32-
class ANALYSIS_EXPORT QgsEdgeProperter
32+
class ANALYSIS_EXPORT QgsArcProperter
3333
{
3434
public:
3535
/**
3636
* default constructor
3737
*/
38-
QgsEdgeProperter()
38+
QgsArcProperter()
3939
{ }
4040

4141
/**

src/analysis/network/qgsdistanceedgeproperter.cpp renamed to src/analysis/network/qgsdistancearcproperter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
***************************************************************************/
1111

1212
//QGIS includes
13-
#include "qgsdistanceedgeproperter.h"
13+
#include "qgsdistancearcproperter.h"
1414

15-
QVariant QgsDistanceEdgeProperter::property( double distance, const QgsFeature& f ) const
15+
QVariant QgsDistanceArcProperter::property( double distance, const QgsFeature& f ) const
1616
{
1717
return QVariant( distance );
1818
}

src/analysis/network/qgsdistanceedgeproperter.h renamed to src/analysis/network/qgsdistancearcproperter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#include <QVariant>
2121

2222
// QGIS includes
23-
#include <qgsedgeproperter.h>
23+
#include <qgsarcproperter.h>
2424

25-
class ANALYSIS_EXPORT QgsDistanceEdgeProperter : public QgsEdgeProperter
25+
class ANALYSIS_EXPORT QgsDistanceArcProperter : public QgsArcProperter
2626
{
2727
public:
2828
virtual QVariant property( double distance, const QgsFeature& ) const;

src/analysis/network/qgsgraphdirector.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
//QGIS includes
2424
#include <qgspoint.h>
25-
#include "qgsedgeproperter.h"
25+
#include "qgsarcproperter.h"
2626

2727
//forward declarations
2828
class QgsGraphBuilderInterface;
@@ -59,7 +59,7 @@ class ANALYSIS_EXPORT QgsGraphDirector : public QObject
5959
const QVector< QgsPoint >& additionalPoints,
6060
QVector< QgsPoint>& tiedPoints ) const = 0;
6161

62-
void addProperter( QgsEdgeProperter* prop )
62+
void addProperter( QgsArcProperter* prop )
6363
{
6464
mProperterList.push_back( prop );
6565
}
@@ -70,6 +70,6 @@ class ANALYSIS_EXPORT QgsGraphDirector : public QObject
7070
virtual QString name() const = 0;
7171

7272
protected:
73-
QList<QgsEdgeProperter*> mProperterList;
73+
QList<QgsArcProperter*> mProperterList;
7474
};
7575
#endif //QGSGRAPHDIRECTORH

src/analysis/network/qgslinevectorlayerdirector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void QgsLineVectorLayerDirector::makeGraph( QgsGraphBuilderInterface *builder, c
220220
tmpAttr.push_back( mDirectionFieldId );
221221
}
222222

223-
QList< QgsEdgeProperter* >::const_iterator it;
223+
QList< QgsArcProperter* >::const_iterator it;
224224
QgsAttributeList::const_iterator it2;
225225

226226
for ( it = mProperterList.begin(); it != mProperterList.end(); ++it )
@@ -317,7 +317,7 @@ void QgsLineVectorLayerDirector::makeGraph( QgsGraphBuilderInterface *builder, c
317317
{
318318
double distance = builder->distanceArea()->measureLine( pt1, pt2 );
319319
QVector< QVariant > prop;
320-
QList< QgsEdgeProperter* >::const_iterator it;
320+
QList< QgsArcProperter* >::const_iterator it;
321321
for ( it = mProperterList.begin(); it != mProperterList.end(); ++it )
322322
{
323323
prop.push_back( (*it)->property( distance, feature ) );

src/plugins/roadgraph/roadgraphplugin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <qgslinevectorlayerdirector.h>
3131
#include <qgsgraphbuilder.h>
3232
#include <qgsgraph.h>
33-
#include <qgsdistanceedgeproperter.h>
33+
#include <qgsdistancearcproperter.h>
3434

3535
// Road grap plugin includes
3636
#include "roadgraphplugin.h"
@@ -281,7 +281,7 @@ const QgsGraphDirector* RoadGraphPlugin::director() const
281281
mSettings->mBothDirectionVal,
282282
mSettings->mDefaultDirection
283283
);
284-
director->addProperter( new QgsDistanceEdgeProperter() );
284+
director->addProperter( new QgsDistanceArcProperter() );
285285
director->addProperter( new RgSpeedProperter( provider->fieldNameIndex( mSettings->mSpeed ),
286286
mSettings->mDefaultSpeed, speedUnit.multipler() ) );
287287
return director;

src/plugins/roadgraph/speedproperter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#ifndef ROADGRAPH_SPEEDPROPERTER_H
1515
#define ROADGRAPH_SPEEDPROPERTER_H
1616

17-
#include <qgsedgeproperter.h>
17+
#include <qgsarcproperter.h>
1818

19-
class RgSpeedProperter : public QgsEdgeProperter
19+
class RgSpeedProperter : public QgsArcProperter
2020
{
2121
public:
2222
RgSpeedProperter( int attributeId, double defaultValue, double toMetricFactor );

0 commit comments

Comments
 (0)