mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
class QgsUniqueValueRenderer : QgsRenderer
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include <qgsuniquevaluerenderer.h>
 | 
						|
%End
 | 
						|
 | 
						|
 public:
 | 
						|
    QgsUniqueValueRenderer(QGis::VectorType 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*/
 | 
						|
    bool willRenderFeature(QgsFeature *f);
 | 
						|
    void renderFeature(QPainter* p, QgsFeature& f, QImage* img, bool selected, double widthScale = 1.0, double rasterScaleFactor = 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*/
 | 
						|
    void 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;
 | 
						|
    /** 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;
 | 
						|
    /**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();
 | 
						|
    /**Return symbology items*/
 | 
						|
    const QList<QgsSymbol*> symbols() const;
 | 
						|
    QgsRenderer* clone() const /Factory/;
 | 
						|
};
 | 
						|
 |