mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
%ModuleHeaderCode
|
|
#include <qgsspeedarcproperter.h>
|
|
#include <qgsdistancearcproperter.h>
|
|
%End
|
|
|
|
/**
|
|
* \ingroup analysis
|
|
* \class QgsArcProperter
|
|
* \brief QgsArcProperter is a strategy pattern.
|
|
* You can use it for customize arc property. For example look at QgsDistanceArcProperter or QgsSpeedArcProperter
|
|
*/
|
|
class QgsArcProperter
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsarcproperter.h>
|
|
%End
|
|
|
|
%ConvertToSubClassCode
|
|
if ( dynamic_cast< QgsDistanceArcProperter* > ( sipCpp ) != NULL )
|
|
sipType = sipType_QgsDistanceArcProperter;
|
|
else if ( dynamic_cast< QgsSpeedArcProperter* > ( sipCpp ) != NULL )
|
|
sipType = sipType_QgsSpeedArcProperter;
|
|
else
|
|
sipType = NULL;
|
|
%End
|
|
|
|
public:
|
|
/**
|
|
* default constructor
|
|
*/
|
|
QgsArcProperter();
|
|
|
|
virtual ~QgsArcProperter();
|
|
|
|
/**
|
|
* QgsGraphDirector call this method for fetching attribute from source layer
|
|
* \return required attributes list
|
|
*/
|
|
virtual QgsAttributeList requiredAttributes() const;
|
|
|
|
/**
|
|
* calculate and return adge property
|
|
*/
|
|
virtual QVariant property( double distance, const QgsFeature &f ) const;
|
|
};
|