QGIS API Documentation  master-3f58142
QgsGraphBuilderInterface Class Reference

Determine interface for creating a graph. More...

#include <qgsgraphbuilderintr.h>

+ Inheritance diagram for QgsGraphBuilderInterface:
+ Collaboration diagram for QgsGraphBuilderInterface:

List of all members.

Public Member Functions

 QgsGraphBuilderInterface (const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
 QgsGraphBuilderInterface constructor.
virtual ~QgsGraphBuilderInterface ()
 Destructor.
virtual void addArc (int pt1id, const QgsPoint &pt1, int pt2id, const QgsPoint &pt2, const QVector< QVariant > &properties)
 add arc
virtual void addVertex (int id, const QgsPoint &pt)
 add vertex
bool coordinateTransformationEnabled ()
 get coordinate transformation enabled
QgsCoordinateReferenceSystemdestinationCrs ()
 get destinaltion Crs
QgsDistanceAreadistanceArea ()
 get measurement tool
double topologyTolerance ()
 get topology tolerance

Private Attributes

QgsCoordinateReferenceSystem mCrs
bool mCtfEnabled
QgsDistanceArea mDa
double mTopologyTolerance

Detailed Description

Determine interface for creating a graph.

Contains the settings of the graph. QgsGraphBuilder and QgsGraphDirector is a Builder pattern

Definition at line 34 of file qgsgraphbuilderintr.h.


Constructor & Destructor Documentation

QgsGraphBuilderInterface::QgsGraphBuilderInterface ( const QgsCoordinateReferenceSystem crs,
bool  ctfEnabled = true,
double  topologyTolerance = 0.0,
const QString &  ellipsoidID = "WGS84" 
) [inline]

QgsGraphBuilderInterface constructor.

Parameters:
crsCoordinate reference system for new graph vertex
ctfEnabledenable coordinate transform from source graph CRS to CRS graph
topologyTolerancesqrt distance between source point as one graph vertex
ellipsoidIDellipsoid for edge measurement

Definition at line 44 of file qgsgraphbuilderintr.h.

Destructor.

Definition at line 53 of file qgsgraphbuilderintr.h.


Member Function Documentation

virtual void QgsGraphBuilderInterface::addArc ( int  pt1id,
const QgsPoint pt1,
int  pt2id,
const QgsPoint pt2,
const QVector< QVariant > &  properties 
) [inline, virtual]

add arc

Parameters:
pt1idfirst vertex identificator
pt1first vertex coordinate
pt2idsecond vertex identificator
pt2second vertex coordinate
propertiesarc properties
Note:
pt1id, pt1 and pt2id, pt2 is a redundant interface. You can use vertex coordinates or their identificators.

Reimplemented in QgsGraphBuilder.

Definition at line 101 of file qgsgraphbuilderintr.h.

Referenced by QgsLineVectorLayerDirector::makeGraph().

virtual void QgsGraphBuilderInterface::addVertex ( int  id,
const QgsPoint pt 
) [inline, virtual]

add vertex

Parameters:
idvertex identifier
ptvertex coordinate
Note:
id and pt are redundant. You can use pt or id to identify the vertex

Reimplemented in QgsGraphBuilder.

Definition at line 86 of file qgsgraphbuilderintr.h.

Referenced by QgsLineVectorLayerDirector::makeGraph().

get coordinate transformation enabled

Definition at line 63 of file qgsgraphbuilderintr.h.

Referenced by QgsLineVectorLayerDirector::makeGraph().

get measurement tool

Definition at line 75 of file qgsgraphbuilderintr.h.

Referenced by QgsLineVectorLayerDirector::makeGraph().

get topology tolerance

Definition at line 69 of file qgsgraphbuilderintr.h.

Referenced by QgsLineVectorLayerDirector::makeGraph().


Member Data Documentation

Definition at line 115 of file qgsgraphbuilderintr.h.

Definition at line 117 of file qgsgraphbuilderintr.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines