QGIS/python/core/renderer/qgssinglesymbolrenderer.sip
Juergen E. Fischer f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00

50 lines
2.0 KiB
Plaintext

/**Render class to display all the features with a single QgsSymbol*/
class QgsSingleSymbolRenderer : QgsRenderer
{
%TypeHeaderCode
#include <qgssinglesymbolrenderer.h>
%End
public:
QgsSingleSymbolRenderer( QGis::GeometryType type );
QgsSingleSymbolRenderer( const QgsSingleSymbolRenderer& other );
virtual ~QgsSingleSymbolRenderer();
/**Replaces the current mSymbol by sy*/
void addSymbol( QgsSymbol* sy /Transfer/ );
/*Returns a pointer to mSymbol*/
const QgsSymbol* symbol() const;
/**Renders a feature
* added in 1.2 */
void renderFeature( QgsRenderContext &renderContext, QgsFeature& f, QImage* img, bool selected, double opacity = 1.0 );
/**Reads the renderer configuration from an XML file
@param rnode the Dom node to read
@param vl the vector layer which will be associated with the renderer
@return 0 in case of success, 1 if vector layer has no renderer, 2 if classification field not found
*/
virtual int readXML( const QDomNode& rnode, QgsVectorLayer& vl );
/**Writes the contents of the renderer to a configuration file*/
/*virtual void writeXML(std::ostream& xml);*/
/**Writes the contents of the renderer to a configuration file
@ return true in case of success*/
virtual bool writeXML( QDomNode & layer_node, QDomDocument & document, const QgsVectorLayer& vl ) const;
/**Returns true, attributes needed for single symbol*/
bool needsAttributes() const;
/**Returns a list of all needed attributes*/
QList<int> classificationAttributes() const;
void updateSymbolAttributes();
/**Returns the renderers name*/
virtual QString name() const;
/**Returns a list containing mSymbol*/
const QList<QgsSymbol*> symbols() const;
/**Returns a deep copy of this renderer*/
QgsRenderer* clone() const /Factory/;
/**Returns renderer symbol for a feature
@note: this method was added in version 1.6*/
QgsSymbol* symbolForFeature( const QgsFeature* f );
};