Skip to content
Permalink
Browse files
Merge renderer branch to trunk r7761:7920
git-svn-id: http://svn.osgeo.org/qgis/trunk@7922 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 10, 2008
1 parent e70e53d commit 8a55d7f2414a9a00d35437c8b2183acd0b38f9c3
Showing with 3,635 additions and 2,288 deletions.
  1. +0 −1 CMakeLists.txt
  2. +76 −0 images/svg/gpsicons/plane_orange.svg
  3. +102 −0 images/svg/icon/cameraangle.svg
  4. +15 −10 src/app/qgsgraduatedsymboldialog.cpp
  5. +325 −445 src/app/qgssinglesymboldialog.cpp
  6. +11 −5 src/app/qgssinglesymboldialog.h
  7. +10 −4 src/app/qgsuniquevaluedialog.cpp
  8. +382 −218 src/app/qgsvectorlayerproperties.cpp
  9. +4 −0 src/app/qgsvectorlayerproperties.h
  10. +140 −0 src/core/qgsmaplayer.cpp
  11. +50 −0 src/core/qgsmaplayer.h
  12. +28 −34 src/core/qgsprojectversion.h
  13. +51 −10 src/core/qgsvectorlayer.cpp
  14. +2 −1 src/core/qgsvectorlayer.h
  15. +52 −10 src/core/renderer/qgsgraduatedsymbolrenderer.cpp
  16. +4 −1 src/core/renderer/qgsgraduatedsymbolrenderer.h
  17. +78 −35 src/core/renderer/qgssinglesymbolrenderer.cpp
  18. +6 −3 src/core/renderer/qgssinglesymbolrenderer.h
  19. +54 −11 src/core/renderer/qgsuniquevaluerenderer.cpp
  20. +4 −1 src/core/renderer/qgsuniquevaluerenderer.h
  21. +65 −71 src/core/symbology/qgsmarkercatalogue.cpp
  22. +154 −24 src/core/symbology/qgssymbol.cpp
  23. +25 −1 src/core/symbology/qgssymbol.h
  24. +491 −445 src/core/symbology/qgssymbologyutils.cpp
  25. +14 −14 src/core/symbology/qgssymbologyutils.h
  26. +0 −2 src/plugins/CMakeLists.txt
  27. +226 −849 src/ui/qgssinglesymboldialogbase.ui
  28. +112 −71 src/ui/qgsvectorlayerpropertiesbase.ui
  29. +65 −8 tests/src/core/CMakeLists.txt
  30. +18 −8 tests/src/core/testqgsapplication.cpp
  31. +279 −0 tests/src/core/testqgsrenderers.cpp
  32. +10 −5 tests/src/core/testqgsvectorfilewriter.cpp
  33. BIN tests/testdata/expected_continuous.png
  34. BIN tests/testdata/expected_graduated.png
  35. BIN tests/testdata/expected_single.png
  36. BIN tests/testdata/expected_uniquevalue.png
  37. BIN tests/testdata/lines.dbf
  38. +77 −0 tests/testdata/lines.qml
  39. BIN tests/testdata/lines.shp
  40. BIN tests/testdata/lines.shx
  41. +82 −0 tests/testdata/lines_continuous_symbol.qml
  42. +92 −0 tests/testdata/lines_graduated_symbol.qml
  43. +60 −0 tests/testdata/lines_single_symbol.qml
  44. +77 −0 tests/testdata/lines_uniquevalue_symbol.qml
  45. BIN tests/testdata/points.dbf
  46. +1 −1 tests/testdata/points.prj
  47. BIN tests/testdata/points.shp
  48. BIN tests/testdata/points.shx
  49. BIN tests/testdata/polys.dbf
  50. +77 −0 tests/testdata/polys.qml
  51. BIN tests/testdata/polys.shp
  52. BIN tests/testdata/polys.shx
  53. +82 −0 tests/testdata/polys_continuous_symbol.qml
  54. +92 −0 tests/testdata/polys_graduated_symbol.qml
  55. +60 −0 tests/testdata/polys_single_symbol.qml
  56. +82 −0 tests/testdata/polys_uniquevalue_symbol.qml
@@ -1,4 +1,3 @@

PROJECT(qgis0.9.2)

# TODO:
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
x="0"
y="0"
width="109.13385"
height="109.13385"
id="svg602"
xml:space="preserve"
sodipodi:version="0.32"
inkscape:version="0.45"
sodipodi:docname="plane_orange.svg"
sodipodi:docbase="/home/gsherman/qgis_09_qml/share/qgis/svg/gpsicons"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata10"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs8" /><sodipodi:namedview
inkscape:window-height="679"
inkscape:window-width="1024"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:zoom="3.6927131"
inkscape:cx="54.566925"
inkscape:cy="54.566925"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:current-layer="g841" /><g
transform="translate(1.907349e-5,1.15625)"
style="font-size:12;"
id="g841"><rect
style="fill:#ff8000;fill-opacity:1;stroke:none;stroke-opacity:1"
id="rect1309"
width="7.9182968"
height="86.771385"
x="50.982937"
y="6.1554475"
ry="4.6036596"
rx="4.6036596" /><path
style="fill:#ff8000;fill-opacity:1;fill-rule:evenodd;stroke:#ff8000;stroke-width:6.09166908;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 54.942086,37.82865 L 11.143125,65.542701 L 98.74105,65.542701 L 54.942086,37.82865 z "
id="path3061"
sodipodi:nodetypes="cccc" /><path
sodipodi:nodetypes="cccc"
id="path3936"
d="M 54.942086,79.491147 L 35.702152,91.665329 L 74.182023,91.665329 L 54.942086,79.491147 z "
style="fill:#ff8000;fill-opacity:1;fill-rule:evenodd;stroke:#ff8000;stroke-width:2.67593813;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><rect
rx="4.6036596"
ry="4.6036596"
y="45.42197"
x="25.527399"
height="18.258076"
width="7.9182968"
id="rect3938"
style="fill:#ff8000;fill-opacity:1;stroke:#ff8000;stroke-opacity:1" /><use
x="0"
y="0"
xlink:href="#rect3938"
id="use3940"
transform="translate(50.64027,-4.017428e-7)"
width="109.13385"
height="109.13385"
style="fill:#ff8000;fill-opacity:1;stroke:#ff8000;stroke-opacity:1" /></g></svg>
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
x="0"
y="0"
width="200"
height="200"
id="svg602"
xml:space="preserve"
sodipodi:version="0.32"
inkscape:version="0.45.1"
sodipodi:docname="cameraangle.svg"
sodipodi:docbase="/home/homann/Qgis-Devel/qgis_trunk/images/svg/gpsicons"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata2233"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs2231" /><sodipodi:namedview
inkscape:window-height="946"
inkscape:window-width="1272"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
width="200px"
height="200px"
inkscape:zoom="5.91"
inkscape:cx="100"
inkscape:cy="107.76378"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:current-layer="svg602" /><g
transform="translate(44.070463,79.671892)"
style="font-size:12px"
id="g675"><rect
width="95.527664"
height="53.012611"
x="8.398037"
y="45.623695"
style="fill-rule:evenodd;stroke:#000000"
id="rect669" /><rect
width="9.447793"
height="12.072182"
x="16.271196"
y="40.899792"
style="fill-rule:evenodd;stroke:#000000;stroke-width:0.81649703"
id="rect670" /><rect
width="31.492636"
height="24.14436"
x="34.359154"
y="32.501755"
transform="translate(4.461455,-3.814697e-6)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:0.88273501"
id="rect671" /><rect
width="19.945347"
height="14.696564"
x="39.870354"
y="37.225655"
transform="translate(4.723902,-3.814697e-6)"
style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:0.82375503"
id="rect672" /><ellipse
cx="54.062363"
cy="78.690964"
rx="15.746321"
ry="15.746321"
transform="translate(0.504565,-3.711447)"
style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:1"
id="path673"
sodipodi:cx="54.062363"
sodipodi:cy="78.690964"
sodipodi:rx="15.746321"
sodipodi:ry="15.746321" /><ellipse
cx="55.374557"
cy="81.052917"
rx="9.7102299"
ry="9.7102318"
transform="translate(-0.807629,-6.05308)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1"
id="path674"
sodipodi:cx="55.374557"
sodipodi:cy="81.052917"
sodipodi:rx="9.7102299"
sodipodi:ry="9.7102318" /></g><path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.67979956;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 29.836567,47.015587 C 85.156767,101.90019 84.821494,101.90019 84.821494,101.90019 L 85.156767,102.33579"
id="path2237" /><path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.67979956;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 168.26924,47.297597 C 112.94904,102.1822 113.28431,102.1822 113.28431,102.1822 L 112.94904,102.6178"
id="path3144" /></svg>
@@ -89,16 +89,18 @@ QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog(QgsVectorLayer * layer): QDia
//fill the items of the renderer into mValues
for(QList<QgsSymbol*>::iterator it=list.begin();it!=list.end();++it)
{
//todo: make an assignment operator and a copy constructor for QgsSymbol
QString classbreak=(*it)->lowerValue()+" - "+(*it)->upperValue();
QgsSymbol* sym=new QgsSymbol(mVectorLayer->vectorType(), (*it)->lowerValue(), (*it)->upperValue(), (*it)->label());
sym->setPen((*it)->pen());
sym->setCustomTexture((*it)->customTexture());
sym->setBrush((*it)->brush());
sym->setNamedPointSymbol((*it)->pointSymbolName());
sym->setPointSize((*it)->pointSize());
mEntries.insert(std::make_pair(classbreak,sym));
mClassListWidget->addItem(classbreak);
//todo: make an assignment operator and a copy constructor for QgsSymbol
QString classbreak=(*it)->lowerValue()+" - "+(*it)->upperValue();
QgsSymbol* sym=new QgsSymbol(mVectorLayer->vectorType(), (*it)->lowerValue(), (*it)->upperValue(), (*it)->label());
sym->setPen((*it)->pen());
sym->setCustomTexture((*it)->customTexture());
sym->setBrush((*it)->brush());
sym->setNamedPointSymbol((*it)->pointSymbolName());
sym->setPointSize((*it)->pointSize());
sym->setScaleClassificationField((*it)->scaleClassificationField());
sym->setRotationClassificationField((*it)->rotationClassificationField());
mEntries.insert(std::make_pair(classbreak,sym));
mClassListWidget->addItem(classbreak);
}

}
@@ -177,6 +179,8 @@ void QgsGraduatedSymbolDialog::apply()
{
sy->setNamedPointSymbol(it->second->pointSymbolName());
sy->setPointSize(it->second->pointSize());
sy->setScaleClassificationField(it->second->scaleClassificationField());
sy->setRotationClassificationField(it->second->rotationClassificationField());

}

@@ -215,6 +219,7 @@ void QgsGraduatedSymbolDialog::apply()
delete sy;
}
}
renderer->updateSymbolAttributes();

std::map<QString,int>::iterator iter=mFieldMap.find(classificationComboBox->currentText());
if(iter!=mFieldMap.end())
Loading

0 comments on commit 8a55d7f

Please sign in to comment.