QGIS/python/core/renderer/qgsuniquevaluerenderer.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

55 lines
2.3 KiB
Plaintext

class QgsUniqueValueRenderer : QgsRenderer
{
%TypeHeaderCode
#include <qgsuniquevaluerenderer.h>
%End
public:
QgsUniqueValueRenderer( QGis::GeometryType type );
QgsUniqueValueRenderer( const QgsUniqueValueRenderer& other );
virtual ~QgsUniqueValueRenderer();
/** Determines if a feature will be rendered or not
@param f a pointer to the feature to determine if rendering will happen*/
virtual bool willRenderFeature( QgsFeature *f );
/** Render 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
*/
int readXML( const QDomNode& rnode, QgsVectorLayer& vl );
/**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, if attribute values are used by the renderer and false otherwise*/
bool needsAttributes() const;
/**Returns a list with indexes of classification attributes*/
QList<int> classificationAttributes() const;
void updateSymbolAttributes();
/**Returns the renderers name*/
QString name() const;
/**Inserts an entry into mEntries. The render items have to be created with the new operator and
are automatically destroyed if not needed anymore */
void insertValue( QString name, QgsSymbol* symbol /Transfer/ );
/**Removes all entries from mEntries*/
void clearValues();
/**Sets the Field index used for classification*/
void setClassificationField( int field );
/**Returns the index of the classification field*/
int classificationField() const;
/**Return symbology items*/
const QList<QgsSymbol*> symbols() const;
/**Return the classification map
@note added in 1.4 */
const QMap<QString, QgsSymbol*> symbolMap() const;
QgsRenderer* clone() const /Factory/;
/**Returns the symbol for a feature or 0 if there isn't any*/
QgsSymbol *symbolForFeature( const QgsFeature* f );
};