QGIS/python/core/symbology-ng/qgssinglesymbolrendererv2.sip

79 lines
3.1 KiB
Plaintext
Raw Normal View History

class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
{
%TypeHeaderCode
#include <qgssinglesymbolrendererv2.h>
%End
public:
2016-08-05 08:09:43 +02:00
QgsSingleSymbolRendererV2( QgsSymbol* symbol /Transfer/ );
virtual ~QgsSingleSymbolRendererV2();
//! @note available in python as symbolForFeature2
2016-08-05 08:09:43 +02:00
virtual QgsSymbol* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=symbolForFeature2/;
//! @note available in python as originalSymbolForFeature2
2016-08-05 08:09:43 +02:00
virtual QgsSymbol* originalSymbolForFeature( QgsFeature& feature, QgsRenderContext& context ) /PyName=originalSymbolForFeature2/;
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );
virtual void stopRender( QgsRenderContext& context );
virtual QList<QString> usedAttributes();
2016-08-05 08:09:43 +02:00
QgsSymbol* symbol() const;
void setSymbol( QgsSymbol* s /Transfer/ );
void setRotationField( const QString& fieldOrExpression ) /Deprecated/;
QString rotationField() const /Deprecated/;
void setSizeScaleField( const QString& fieldOrExpression );
QString sizeScaleField() const;
2016-08-05 08:09:43 +02:00
void setScaleMethod( QgsSymbol::ScaleMethod scaleMethod );
QgsSymbol::ScaleMethod scaleMethod() const;
virtual QString dump() const;
virtual QgsSingleSymbolRendererV2* clone() const /Factory/;
virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
static QgsFeatureRendererV2* createFromSld( QDomElement& element, QgsWkbTypes::GeometryType geomType );
//! returns bitwise OR-ed capabilities of the renderer
virtual QgsFeatureRendererV2::Capabilities capabilities();
//! @note available in python as symbol2
2016-08-05 08:09:43 +02:00
virtual QgsSymbolList symbols( QgsRenderContext& context ) /PyName=symbols2/;
//! 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
2014-01-26 18:35:21 +01:00
//! @note not available in python bindings
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, const QString& rule = QString() );
//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
//! @note added in 2.6
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;
virtual QSet< QString > legendKeysForFeature( QgsFeature& feature, QgsRenderContext& context );
2016-08-05 08:09:43 +02:00
virtual void setLegendSymbolItem( const QString& key, QgsSymbol* symbol /Transfer/ );
//! creates a QgsSingleSymbolRendererV2 from an existing renderer.
2014-08-24 08:31:36 +08:00
//! @note added in 2.5
//! @returns a new renderer if the conversion was possible, otherwise 0.
static QgsSingleSymbolRendererV2* convertFromRenderer( const QgsFeatureRendererV2 *renderer ) /Factory/;
2014-08-24 08:31:36 +08:00
private:
QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & );
QgsSingleSymbolRendererV2 & operator=( const QgsSingleSymbolRendererV2 & );
};