QGIS/python/core/symbology-ng/qgssinglesymbolrendererv2.sip
Martin Dobias e6c2ecd9f3 Fix #9290 (crashes in symbology on fields with special characters)
Fixes several crashes and problems with backwards compatibility.
Before expressions were allowed, field names were loaded and saved
unquoted, e.g. x.y  - with introduction of expressions it was
necessary to use properly quoted "x.y" name so that expression
is correctly parsed. With these changes both options are possible
and when possible, the unquoted field name is used for compatibility
2014-02-11 14:27:01 +07:00

69 lines
2.2 KiB
Plaintext

class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
{
%TypeHeaderCode
#include <qgssinglesymbolrendererv2.h>
%End
public:
QgsSingleSymbolRendererV2( QgsSymbolV2* symbol /Transfer/ );
virtual ~QgsSingleSymbolRendererV2();
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
virtual void startRender( QgsRenderContext& context, const QgsVectorLayer *vlayer );
virtual void stopRender( QgsRenderContext& context );
virtual QList<QString> usedAttributes();
QgsSymbolV2* symbol() const;
void setSymbol( QgsSymbolV2* s /Transfer/ );
//! @note added in 1.5
void setRotationField( QString fieldOrExpression );
//! @note added in 1.5
QString rotationField() const;
//! @note added in 1.5
void setSizeScaleField( QString fieldOrExpression );
//! @note added in 1.5
QString sizeScaleField() const;
//! @note added in 2.0
void setScaleMethod( QgsSymbolV2::ScaleMethod scaleMethod );
//! @note added in 2.0
QgsSymbolV2::ScaleMethod scaleMethod() const;
virtual QString dump() const;
virtual QgsFeatureRendererV2* clone() /Factory/;
virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
static QgsFeatureRendererV2* createFromSld( QDomElement& element, QGis::GeometryType geomType );
//! returns bitwise OR-ed capabilities of the renderer
//! \note added in 2.0
virtual int capabilities();
virtual QgsSymbolV2List symbols();
//! create renderer from XML element
static QgsFeatureRendererV2* create( QDomElement& element ) /Factory/;
//! store renderer info to XML element
virtual QDomElement save( QDomDocument& doc );
//! return a list of symbology items for the legend
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
//! return a list of item text / symbol
//! @note: this method was added in version 1.5
//! @note not available in python bindings
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = QString() );
private:
QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & );
QgsSingleSymbolRendererV2 & operator=( const QgsSingleSymbolRendererV2 & );
};