2011-06-02 19:02:20 +06:00
|
|
|
%ModuleHeaderCode
|
|
|
|
#include <qgslinevectorlayerdirector.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \ingroup networkanalysis
|
|
|
|
* \class QgsGraphDirector
|
|
|
|
* \brief Determine making the graph. QgsGraphBuilder and QgsGraphDirector is a builder patter.
|
|
|
|
*/
|
|
|
|
class QgsGraphDirector : QObject
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsgraphbuilder.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
%ConvertToSubClassCode
|
|
|
|
if ( dynamic_cast< QgsLineVectorLayerDirector* > ( sipCpp ) != NULL )
|
|
|
|
sipClass = sipClass_QgsLineVectorLayerDirector;
|
|
|
|
else
|
|
|
|
sipClass = NULL;
|
|
|
|
%End
|
|
|
|
|
2013-01-12 23:48:58 +01:00
|
|
|
|
2011-06-02 19:02:20 +06:00
|
|
|
signals:
|
|
|
|
void buildProgress( int, int ) const;
|
|
|
|
void buildMessage( QString ) const;
|
|
|
|
|
|
|
|
public:
|
|
|
|
//! Destructor
|
|
|
|
virtual ~QgsGraphDirector();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Make a graph using RgGraphBuilder
|
|
|
|
*
|
|
|
|
* @param builder The graph builder
|
|
|
|
*
|
|
|
|
* @param additionalPoints Vector of points that must be tied to the graph
|
|
|
|
*
|
|
|
|
* @param tiedPoints Vector of tied points
|
|
|
|
*
|
|
|
|
* @note if tiedPoints[i]==QgsPoint(0.0,0.0) then tied failed.
|
|
|
|
*/
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void makeGraph( QgsGraphBuilderInterface *builder,
|
|
|
|
const QVector< QgsPoint > &additionalPoints,
|
|
|
|
QVector< QgsPoint> &tiedPoints /Out/ );
|
2013-01-12 23:48:58 +01:00
|
|
|
|
2011-06-09 18:10:58 +06:00
|
|
|
void addProperter( QgsArcProperter* prop /Transfer/ ) ;
|
2013-01-12 23:48:58 +01:00
|
|
|
|
2011-06-02 19:02:20 +06:00
|
|
|
/**
|
|
|
|
* return Director name
|
|
|
|
*/
|
|
|
|
virtual QString name() const = 0;
|
|
|
|
};
|
|
|
|
|