Skip to content
Permalink
Browse files
Save/load the option to draw polygon outlines in the continuous color…
… renderer to project file

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5834 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 18, 2006
1 parent 80f0499 commit 365dc60aec67b04cb01f5eb851b49584e5b15513
Showing with 20 additions and 0 deletions.
  1. +20 −0 src/gui/qgscontinuouscolorrenderer.cpp
@@ -179,6 +179,18 @@ void QgsContinuousColorRenderer::readXML(const QDomNode& rnode, QgsVectorLayer&
QDomNode classnode = rnode.namedItem("classificationfield");
int classificationfield = classnode.toElement().text().toInt();
this->setClassificationField(classificationfield);

//polygon outline
QDomNode polyoutlinenode = rnode.namedItem("polygonoutline");
QString polyoutline = polyoutlinenode.toElement().text();
if(polyoutline == "0")
{
mDrawPolygonOutline = false;
}
else if(polyoutline == "1")
{
mDrawPolygonOutline = true;
}

//read the settings for the renderitem of the minimum value
QDomNode lowernode = rnode.namedItem("lowestsymbol");
@@ -222,6 +234,14 @@ bool QgsContinuousColorRenderer::writeXML( QDomNode & layer_node, QDomDocument &
QDomText classificationfieldtxt=document.createTextNode(QString::number(mClassificationField));
classificationfield.appendChild(classificationfieldtxt);
continuoussymbol.appendChild(classificationfield);

//polygon outlines
QDomElement drawPolygonOutlines = document.createElement("polygonoutline");
int drawPolyInt = mDrawPolygonOutline ? 1 : 0;
QDomText drawPolygonText = document.createTextNode(QString::number(drawPolyInt));
drawPolygonOutlines.appendChild(drawPolygonText);
continuoussymbol.appendChild(drawPolygonOutlines);

QDomElement lowestsymbol=document.createElement("lowestsymbol");
continuoussymbol.appendChild(lowestsymbol);
if(mMinimumSymbol)

0 comments on commit 365dc60

Please sign in to comment.