#include <qgscontinuouscolorrenderer.h>
Inheritance diagram for QgsContinuousColorRenderer:


Definition at line 31 of file qgscontinuouscolorrenderer.h.
Public Member Functions | |
| QgsContinuousColorRenderer (QGis::GeometryType type) | |
| QgsContinuousColorRenderer (const QgsContinuousColorRenderer &other) | |
| QgsContinuousColorRenderer & | operator= (const QgsContinuousColorRenderer &other) |
| virtual | ~QgsContinuousColorRenderer () |
| void | renderFeature (QPainter *p, QgsFeature &f, QImage *img, bool selected, double widthScale=1.0, double rasterScaleFactor=1.0) |
| Renders the feature using the minimum and maximum value of the classification field. | |
| int | classificationField () const |
| Returns the number of the classification field. | |
| void | setClassificationField (int id) |
| Sets the id of the classification field. | |
| void | setMinimumSymbol (QgsSymbol *sy) |
| Sets the symbol for the minimum value. | |
| void | setMaximumSymbol (QgsSymbol *sy) |
| Sets the symbol for the maximum value. | |
| void | setDrawPolygonOutline (bool draw) |
| Sets whether to draw the polygon outline. | |
| const QgsSymbol * | minimumSymbol () const |
| Returns the symbol for the minimum value. | |
| const QgsSymbol * | maximumSymbol () const |
| Returns the symbol for the maximum value. | |
| bool | drawPolygonOutline () const |
| whether to draw a polygon outline | |
| virtual int | readXML (const QDomNode &rnode, QgsVectorLayer &vl) |
| Reads the renderer configuration from an XML file. | |
| virtual bool | writeXML (QDomNode &layer_node, QDomDocument &document, const QgsVectorLayer &vl) const |
| Writes the contents of the renderer to a configuration file @ return true in case of success. | |
| bool | needsAttributes () const |
| Returns true. | |
| QgsAttributeList | classificationAttributes () const |
| Returns a list with the index of the classification attribute. | |
| QString | name () const |
| Returns the renderers name. | |
| const QList< QgsSymbol * > | symbols () const |
| Return symbology items. | |
| QgsRenderer * | clone () const |
| Returns a copy of the renderer (a deep copy on the heap). | |
Protected Attributes | |
| int | mClassificationField |
| Number of the classification field (it must be a numerical field). | |
| QgsSymbol * | mMinimumSymbol |
| Item for the minimum value. | |
| QgsSymbol * | mMaximumSymbol |
| Item for the maximum value. | |
| bool | mDrawPolygonOutline |
| Whether to draw the polygon outline or not. | |
| QgsContinuousColorRenderer::QgsContinuousColorRenderer | ( | QGis::GeometryType | type | ) |
Definition at line 31 of file qgscontinuouscolorrenderer.cpp.
References QgsRenderer::mGeometryType.
Referenced by clone().
| QgsContinuousColorRenderer::QgsContinuousColorRenderer | ( | const QgsContinuousColorRenderer & | other | ) |
Definition at line 36 of file qgscontinuouscolorrenderer.cpp.
References mClassificationField, QgsRenderer::mGeometryType, mMaximumSymbol, and mMinimumSymbol.
| QgsContinuousColorRenderer::~QgsContinuousColorRenderer | ( | ) | [virtual] |
Definition at line 58 of file qgscontinuouscolorrenderer.cpp.
References mMaximumSymbol, and mMinimumSymbol.
| QgsContinuousColorRenderer & QgsContinuousColorRenderer::operator= | ( | const QgsContinuousColorRenderer & | other | ) |
Definition at line 44 of file qgscontinuouscolorrenderer.cpp.
References mClassificationField, QgsRenderer::mGeometryType, mMaximumSymbol, and mMinimumSymbol.
| void QgsContinuousColorRenderer::renderFeature | ( | QPainter * | p, | |
| QgsFeature & | f, | |||
| QImage * | img, | |||
| bool | selected, | |||
| double | widthScale = 1.0, |
|||
| double | rasterScaleFactor = 1.0 | |||
| ) | [virtual] |
Renders the feature using the minimum and maximum value of the classification field.
Implements QgsRenderer.
Definition at line 76 of file qgscontinuouscolorrenderer.cpp.
References QgsFeature::attributeMap(), QgsSymbol::brush(), QgsSymbol::fillColor(), QgsMarkerCatalogue::imageMarker(), QgsMarkerCatalogue::instance(), QGis::Line, QgsSymbol::lowerValue(), mClassificationField, mDrawPolygonOutline, QgsRenderer::mGeometryType, mMaximumSymbol, mMinimumSymbol, QgsRenderer::mSelectionColor, QgsSymbol::pen(), QGis::Point, QgsSymbol::pointSize(), QgsSymbol::pointSymbolName(), and QGis::Polygon.
| int QgsContinuousColorRenderer::classificationField | ( | ) | const [inline] |
Returns the number of the classification field.
Definition at line 85 of file qgscontinuouscolorrenderer.h.
References mClassificationField.
Referenced by readXML().
| void QgsContinuousColorRenderer::setClassificationField | ( | int | id | ) | [inline] |
Sets the id of the classification field.
Definition at line 90 of file qgscontinuouscolorrenderer.h.
References mClassificationField.
Referenced by readXML().
| void QgsContinuousColorRenderer::setMinimumSymbol | ( | QgsSymbol * | sy | ) |
Sets the symbol for the minimum value.
The symbol has to be created using the new operator and is automatically deleted when inserting a new symbol or when the instance is destroyed
Definition at line 64 of file qgscontinuouscolorrenderer.cpp.
References mMinimumSymbol.
Referenced by readXML().
| void QgsContinuousColorRenderer::setMaximumSymbol | ( | QgsSymbol * | sy | ) |
Sets the symbol for the maximum value.
The symbol has to be created using the new operator and is automatically deleted when inserting a new symbol or when the instance is destroyed
Definition at line 70 of file qgscontinuouscolorrenderer.cpp.
References mMaximumSymbol.
Referenced by readXML().
| void QgsContinuousColorRenderer::setDrawPolygonOutline | ( | bool | draw | ) | [inline] |
Sets whether to draw the polygon outline.
Definition at line 49 of file qgscontinuouscolorrenderer.h.
| const QgsSymbol * QgsContinuousColorRenderer::minimumSymbol | ( | ) | const [inline] |
Returns the symbol for the minimum value.
Definition at line 95 of file qgscontinuouscolorrenderer.h.
References mMinimumSymbol.
| const QgsSymbol * QgsContinuousColorRenderer::maximumSymbol | ( | ) | const [inline] |
Returns the symbol for the maximum value.
Definition at line 100 of file qgscontinuouscolorrenderer.h.
References mMaximumSymbol.
| bool QgsContinuousColorRenderer::drawPolygonOutline | ( | ) | const [inline] |
| int QgsContinuousColorRenderer::readXML | ( | const QDomNode & | rnode, | |
| QgsVectorLayer & | vl | |||
| ) | [virtual] |
Reads the renderer configuration from an XML file.
| rnode | the Dom node to read | |
| vl | the vector layer which will be associated with the renderer |
Implements QgsRenderer.
Definition at line 190 of file qgscontinuouscolorrenderer.cpp.
References classificationField(), QgsVectorLayer::dataProvider(), QgsVectorDataProvider::fieldNameIndex(), QgsVectorLayer::geometryType(), mDrawPolygonOutline, QgsRenderer::mGeometryType, setClassificationField(), setMaximumSymbol(), setMinimumSymbol(), and QgsVectorLayer::setRenderer().
| bool QgsContinuousColorRenderer::writeXML | ( | QDomNode & | layer_node, | |
| QDomDocument & | document, | |||
| const QgsVectorLayer & | vl | |||
| ) | const [virtual] |
Writes the contents of the renderer to a configuration file @ return true in case of success.
Implements QgsRenderer.
Definition at line 253 of file qgscontinuouscolorrenderer.cpp.
References QgsVectorLayer::dataProvider(), QgsVectorDataProvider::fields(), mClassificationField, mDrawPolygonOutline, mMaximumSymbol, mMinimumSymbol, and QgsSymbol::writeXML().
| bool QgsContinuousColorRenderer::needsAttributes | ( | ) | const [inline, virtual] |
| QgsAttributeList QgsContinuousColorRenderer::classificationAttributes | ( | ) | const [virtual] |
Returns a list with the index of the classification attribute.
Implements QgsRenderer.
Definition at line 241 of file qgscontinuouscolorrenderer.cpp.
References mClassificationField.
| QString QgsContinuousColorRenderer::name | ( | ) | const [virtual] |
Returns the renderers name.
Implements QgsRenderer.
Definition at line 248 of file qgscontinuouscolorrenderer.cpp.
| const QList< QgsSymbol * > QgsContinuousColorRenderer::symbols | ( | ) | const [virtual] |
Return symbology items.
Implements QgsRenderer.
Definition at line 299 of file qgscontinuouscolorrenderer.cpp.
References mMaximumSymbol, and mMinimumSymbol.
| QgsRenderer * QgsContinuousColorRenderer::clone | ( | ) | const [virtual] |
Returns a copy of the renderer (a deep copy on the heap).
Implements QgsRenderer.
Definition at line 307 of file qgscontinuouscolorrenderer.cpp.
References QgsContinuousColorRenderer().
int QgsContinuousColorRenderer::mClassificationField [protected] |
Number of the classification field (it must be a numerical field).
Definition at line 76 of file qgscontinuouscolorrenderer.h.
Referenced by classificationAttributes(), classificationField(), operator=(), QgsContinuousColorRenderer(), renderFeature(), setClassificationField(), and writeXML().
QgsSymbol* QgsContinuousColorRenderer::mMinimumSymbol [protected] |
Item for the minimum value.
Definition at line 78 of file qgscontinuouscolorrenderer.h.
Referenced by minimumSymbol(), operator=(), QgsContinuousColorRenderer(), renderFeature(), setMinimumSymbol(), symbols(), writeXML(), and ~QgsContinuousColorRenderer().
QgsSymbol* QgsContinuousColorRenderer::mMaximumSymbol [protected] |
Item for the maximum value.
Definition at line 80 of file qgscontinuouscolorrenderer.h.
Referenced by maximumSymbol(), operator=(), QgsContinuousColorRenderer(), renderFeature(), setMaximumSymbol(), symbols(), writeXML(), and ~QgsContinuousColorRenderer().
bool QgsContinuousColorRenderer::mDrawPolygonOutline [protected] |
Whether to draw the polygon outline or not.
Definition at line 82 of file qgscontinuouscolorrenderer.h.
Referenced by readXML(), renderFeature(), and writeXML().
1.5.1