mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6864 c8812cc2-4d05-0410-92ff-de0c093fc19c
41 lines
1.8 KiB
Plaintext
41 lines
1.8 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, double* scalefactor, bool selected, double widthScale = 1);
|
|
/**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);
|
|
/**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;
|
|
};
|
|
|