Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 365dc60
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/gui/qgscontinuouscolorrenderer.cpp
Expand Up @@ -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");
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 365dc60

Please sign in to comment.