QGIS/python/core/symbology-ng/qgssinglesymbolrendererv2.sip
Martin Dobias e37a5ad8df [FEATURE] Legend filtering based on map content (in main window, composer, WMS)
There is new "filter" button in layers panel that toggles this functionality
and in composer legend widget.

Related feature is that layer tree now shows symbols in map units with correct size
(even when filtering is not enabled) so as the map view changes the legend node icons
are updated too (if they use map units).

GetLegendGraphics in WMS server
-------------------------------

This is an extension of standard GetLegendGraphics request according to MapServer RFC 101.
See the document for more details: http://mapserver.org/development/rfc/ms-rfc-101.html

In summary, clients need to add BBOX and CRS/SRS parameters to get appropriate legend based on the given map view.
Parameters WIDTH and HEIGHT are also taken into account as they specify map view image size for correct calculation
of size of legend symbols (if they are based on map units).

--

This software has been commissioned by Tuscany Region (Italy),
co-funded by the European Commission and developed under the project LIFE12 ENV/IT/001054 LIFE + IMAGINE.
The software has been realized by Gis3W s.a.s.

Questo software è stato commissionato da Regione Toscana (Italia),
cofinanziato dalla Commissione Europea e sviluppato nell'ambito del progetto LIFE12 ENV/IT/001054 LIFE + IMAGINE.
Il software è stato realizzato da Gis3W s.a.s.
2014-09-25 12:56:37 +02:00

80 lines
2.7 KiB
Plaintext

class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
{
%TypeHeaderCode
#include <qgssinglesymbolrendererv2.h>
%End
public:
QgsSingleSymbolRendererV2( QgsSymbolV2* symbol /Transfer/ );
virtual ~QgsSingleSymbolRendererV2();
virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature );
virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feature );
virtual void startRender( QgsRenderContext& context, const QgsFields& fields );
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() const /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() );
//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
//! @note added in 2.6
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;
//! creates a QgsSingleSymbolRendererV2 from an existing renderer.
//! @note added in 2.5
//! @returns a new renderer if the conversion was possible, otherwise 0.
static QgsSingleSymbolRendererV2* convertFromRenderer( const QgsFeatureRendererV2 *renderer ) /Factory/;
private:
QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & );
QgsSingleSymbolRendererV2 & operator=( const QgsSingleSymbolRendererV2 & );
};