Skip to content
Permalink
Browse files
Symbology-NG branch merged to trunk. This includes also work on label…
…ing done during my GSoC'09.

git-svn-id: http://svn.osgeo.org/qgis/trunk@12139 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 16, 2009
1 parent f3388ed commit 961742e243ce62860699007734d32b8895d068c2
Showing with 18,563 additions and 3,624 deletions.
  1. BIN images/themes/default/cap_flat.png
  2. BIN images/themes/default/cap_round.png
  3. BIN images/themes/default/cap_square.png
  4. +112 −0 images/themes/default/cap_style.svg
  5. BIN images/themes/default/join_bevel.png
  6. BIN images/themes/default/join_miter.png
  7. BIN images/themes/default/join_round.png
  8. +100 −0 images/themes/default/join_style.svg
  9. BIN images/themes/default/rendererCategorizedSymbol.png
  10. BIN images/themes/default/rendererGraduatedSymbol.png
  11. BIN images/themes/default/rendererSingleSymbol.png
  12. BIN images/themes/default/symbologyAdd.png
  13. BIN images/themes/default/symbologyDown.png
  14. BIN images/themes/default/symbologyEdit.png
  15. BIN images/themes/default/symbologyLock.png
  16. BIN images/themes/default/symbologyRemove.png
  17. BIN images/themes/default/symbologyUp.png
  18. +2 −0 python/configure.py.in
  19. +81 −0 python/core/conversions.sip
  20. +1 −0 python/core/core.sip
  21. +6 −0 python/core/qgsapplication.sip
  22. +10 −0 python/core/qgsmaplayer.sip
  23. +2 −0 python/core/qgsrenderer.sip
  24. +12 −0 python/core/qgsvectorlayer.sip
  25. +699 −0 python/core/symbology-ng-core.sip
  26. +1 −0 python/gui/gui.sip
  27. +98 −0 python/gui/symbology-ng-gui.sip
  28. +1 −1 resources/CMakeLists.txt
  29. +116 −0 resources/symbology-ng-style.xml
  30. +2 −2 src/app/CMakeLists.txt
  31. +27 −4 src/app/legend/qgslegendlayer.cpp
  32. +3 −1 src/app/legend/qgslegendlayer.h
  33. +16 −0 src/app/qgisapp.cpp
  34. +5 −0 src/app/qgisapp.h
  35. +3 −0 src/app/qgsoptions.cpp
  36. +56 −27 src/app/qgsvectorlayerproperties.cpp
  37. +20 −1 src/core/CMakeLists.txt
  38. +350 −0 src/core/pal/costcalculator.cpp
  39. +54 −0 src/core/pal/costcalculator.h
  40. +630 −192 src/core/pal/feature.cpp
  41. +104 −74 src/core/pal/feature.h
  42. +34 −0 src/core/pal/geomfunction.cpp
  43. +3 −29 src/core/pal/geomfunction.h
  44. +2 −2 src/core/pal/internalexception.h
  45. +0 −107 src/core/pal/label.cpp
  46. +0 −132 src/core/pal/label.h
  47. +259 −310 src/core/pal/labelposition.cpp
  48. +101 −148 src/core/pal/labelposition.h
  49. +188 −362 src/core/pal/layer.cpp
  50. +39 −79 src/core/pal/layer.h
  51. +143 −440 src/core/pal/pal.cpp
  52. +22 −11 src/core/pal/pal.h
  53. +2 −2 src/core/pal/palexception.h
  54. +1 −23 src/core/pal/palgeometry.h
  55. +25 −805 src/core/pal/pointset.cpp
  56. +20 −42 src/core/pal/pointset.h
  57. +86 −284 src/core/pal/problem.cpp
  58. +11 −2 src/core/pal/problem.h
  59. +0 −388 src/core/pal/util.cpp
  60. +12 −52 src/core/pal/util.h
  61. +10 −0 src/core/qgsapplication.cpp
  62. +6 −0 src/core/qgsapplication.h
  63. +61 −1 src/core/qgsmaplayer.cpp
  64. +20 −2 src/core/qgsmaplayer.h
  65. +9 −8 src/core/qgspalobjectpositionmanager.cpp
  66. +331 −89 src/core/qgsvectorlayer.cpp
  67. +35 −0 src/core/qgsvectorlayer.h
  68. +5 −0 src/core/renderer/qgsrenderer.cpp
  69. +2 −0 src/core/renderer/qgsrenderer.h
  70. +379 −0 src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp
  71. +109 −0 src/core/symbology-ng/qgscategorizedsymbolrendererv2.h
  72. +346 −0 src/core/symbology-ng/qgscolorbrewerpalette.h
  73. +84 −0 src/core/symbology-ng/qgsfillsymbollayerv2.cpp
  74. +52 −0 src/core/symbology-ng/qgsfillsymbollayerv2.h
  75. +475 −0 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  76. +112 −0 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.h
  77. +400 −0 src/core/symbology-ng/qgslinesymbollayerv2.cpp
  78. +154 −0 src/core/symbology-ng/qgslinesymbollayerv2.h
  79. +332 −0 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
  80. +105 −0 src/core/symbology-ng/qgsmarkersymbollayerv2.h
  81. +299 −0 src/core/symbology-ng/qgsrendererv2.cpp
  82. +110 −0 src/core/symbology-ng/qgsrendererv2.h
  83. +68 −0 src/core/symbology-ng/qgsrendererv2registry.cpp
  84. +90 −0 src/core/symbology-ng/qgsrendererv2registry.h
  85. +111 −0 src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
  86. +45 −0 src/core/symbology-ng/qgssinglesymbolrendererv2.h
  87. +261 −0 src/core/symbology-ng/qgsstylev2.cpp
  88. +90 −0 src/core/symbology-ng/qgsstylev2.h
  89. +61 −0 src/core/symbology-ng/qgssymbollayerv2.cpp
  90. +122 −0 src/core/symbology-ng/qgssymbollayerv2.h
  91. +92 −0 src/core/symbology-ng/qgssymbollayerv2registry.cpp
  92. +78 −0 src/core/symbology-ng/qgssymbollayerv2registry.h
  93. +584 −0 src/core/symbology-ng/qgssymbollayerv2utils.cpp
  94. +75 −0 src/core/symbology-ng/qgssymbollayerv2utils.h
  95. +423 −0 src/core/symbology-ng/qgssymbolv2.cpp
  96. +156 −0 src/core/symbology-ng/qgssymbolv2.h
  97. +179 −0 src/core/symbology-ng/qgsvectorcolorrampv2.cpp
  98. +141 −0 src/core/symbology-ng/qgsvectorcolorrampv2.h
  99. +33 −2 src/gui/CMakeLists.txt
  100. +30 −0 src/gui/qgscolorbutton.cpp
  101. +15 −0 src/gui/qgscolorbutton.h
  102. +71 −0 src/gui/symbology-ng/qgsbrushstylecombobox.cpp
  103. +21 −0 src/gui/symbology-ng/qgsbrushstylecombobox.h
  104. +328 −0 src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
  105. +61 −0 src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.h
  106. +256 −0 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
  107. +51 −0 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.h
  108. +106 −0 src/gui/symbology-ng/qgspenstylecombobox.cpp
  109. +41 −0 src/gui/symbology-ng/qgspenstylecombobox.h
  110. +170 −0 src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp
  111. +46 −0 src/gui/symbology-ng/qgsrendererv2propertiesdialog.h
  112. +7 −0 src/gui/symbology-ng/qgsrendererv2widget.cpp
  113. +38 −0 src/gui/symbology-ng/qgsrendererv2widget.h
  114. +68 −0 src/gui/symbology-ng/qgssinglesymbolrendererv2widget.cpp
  115. +32 −0 src/gui/symbology-ng/qgssinglesymbolrendererv2widget.h
  116. +423 −0 src/gui/symbology-ng/qgsstylev2managerdialog.cpp
  117. +57 −0 src/gui/symbology-ng/qgsstylev2managerdialog.h
  118. +494 −0 src/gui/symbology-ng/qgssymbollayerv2widget.cpp
  119. +208 −0 src/gui/symbology-ng/qgssymbollayerv2widget.h
  120. +108 −0 src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
  121. +35 −0 src/gui/symbology-ng/qgssymbollevelsv2dialog.h
  122. +385 −0 src/gui/symbology-ng/qgssymbolv2propertiesdialog.cpp
  123. +69 −0 src/gui/symbology-ng/qgssymbolv2propertiesdialog.h
  124. +223 −0 src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
  125. +45 −0 src/gui/symbology-ng/qgssymbolv2selectordialog.h
  126. +83 −0 src/gui/symbology-ng/qgsvectorcolorbrewercolorrampv2dialog.cpp
  127. +31 −0 src/gui/symbology-ng/qgsvectorcolorbrewercolorrampv2dialog.h
  128. +46 −0 src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
  129. +29 −0 src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.h
  130. +81 −0 src/gui/symbology-ng/qgsvectorrandomcolorrampv2dialog.cpp
  131. +34 −0 src/gui/symbology-ng/qgsvectorrandomcolorrampv2dialog.h
  132. +2 −0 src/plugins/CMakeLists.txt
  133. +55 −0 src/plugins/labeling/CMakeLists.txt
  134. +42 −0 src/plugins/labeling/engineconfigdialog.cpp
  135. +23 −0 src/plugins/labeling/engineconfigdialog.h
  136. +228 −0 src/plugins/labeling/engineconfigdialog.ui
  137. +274 −0 src/plugins/labeling/labeling.cpp
  138. +82 −0 src/plugins/labeling/labeling.h
  139. BIN src/plugins/labeling/labeling.png
  140. +5 −0 src/plugins/labeling/labeling.qrc
  141. +327 −0 src/plugins/labeling/labelinggui.cpp
  142. +58 −0 src/plugins/labeling/labelinggui.h
  143. +801 −0 src/plugins/labeling/labelingguibase.ui
  144. +38 −0 src/plugins/labeling/labelpreview.cpp
  145. +23 −0 src/plugins/labeling/labelpreview.h
  146. +588 −0 src/plugins/labeling/pallabeling.cpp
  147. +158 −0 src/plugins/labeling/pallabeling.h
  148. +2 −1 src/ui/CMakeLists.txt
  149. +170 −0 src/ui/qgscategorizedsymbolrendererv2widget.ui
  150. +170 −0 src/ui/qgsgraduatedsymbolrendererv2widget.ui
  151. +17 −1 src/ui/qgsoptionsbase.ui
  152. +94 −0 src/ui/qgsrendererv2propsdialogbase.ui
  153. +129 −0 src/ui/qgsstylev2managerdialogbase.ui
  154. +74 −0 src/ui/qgssymbollevelsv2dialogbase.ui
  155. +275 −0 src/ui/qgssymbolv2propertiesdialogbase.ui
  156. +299 −0 src/ui/qgssymbolv2selectordialogbase.ui
  157. +147 −0 src/ui/qgsvectorcolorbrewercolorrampv2dialogbase.ui
  158. +157 −0 src/ui/qgsvectorgradientcolorrampv2dialogbase.ui
  159. +257 −0 src/ui/qgsvectorrandomcolorrampv2dialogbase.ui
  160. +81 −0 src/ui/symbollayer/widget_linedecoration.ui
  161. +113 −0 src/ui/symbollayer/widget_markerline.ui
  162. +109 −0 src/ui/symbollayer/widget_simplefill.ui
  163. +192 −0 src/ui/symbollayer/widget_simpleline.ui
  164. +203 −0 src/ui/symbollayer/widget_simplemarker.ui
  165. +174 −0 src/ui/symbollayer/widget_svgmarker.ui
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
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"
width="16"
height="16"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.46"
version="1.0"
inkscape:export-filename="/home/wonder/cap_square.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
sodipodi:docname="cap_style.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="35.375"
inkscape:cx="5.3152953"
inkscape:cy="6.869258"
inkscape:document-units="px"
inkscape:current-layer="layer4"
showgrid="false"
inkscape:window-width="1270"
inkscape:window-height="769"
inkscape:window-x="0"
inkscape:window-y="0" />
<metadata
id="metadata7">
<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>
<g
inkscape:label="square cap"
inkscape:groupmode="layer"
id="layer1"
style="display:inline">
<rect
style="opacity:1;fill:#6389b8;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect3165"
width="16.282686"
height="8.4522972"
x="-2.0353358"
y="3.7738514" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="flat cap"
style="display:none">
<rect
style="opacity:1;fill:#6389b8;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect3167"
width="16.282686"
height="8.4522972"
x="-5.2854118"
y="3.7738514" />
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="round cap"
style="display:none">
<path
style="opacity:1;fill:#6389b8;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M -6.4375,3.78125 L -6.4375,12.21875 L 9.84375,12.21875 L 9.7306758,12.244037 C 10.134161,12.218685 10.418569,12.21875 10.483547,12.21875 C 12.808579,12.21875 14.25,10.325032 14.25,8 C 14.25,5.6749682 12.356282,3.78125 10.03125,3.78125 C 9.966272,3.78125 8.5793902,3.8661211 9.84375,3.8125 L 9.7872129,3.8095186 L -6.4375,3.78125 z"
id="path3176"
sodipodi:nodetypes="ccccsssccc" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="line">
<path
style="fill:none;fill-rule:evenodd;stroke:#d3c02d;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1"
d="M 0.14215003,8 L 10.488441,8"
id="path2393"
inkscape:export-filename="/home/wonder/cap_square.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
</g>
</svg>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
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"
width="16"
height="16"
id="svg3203"
sodipodi:version="0.32"
inkscape:version="0.46"
version="1.0"
sodipodi:docname="join_style.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs3205">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective3211" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="35.375"
inkscape:cx="8"
inkscape:cy="8"
inkscape:document-units="px"
inkscape:current-layer="layer7"
showgrid="false"
inkscape:window-width="1270"
inkscape:window-height="769"
inkscape:window-x="0"
inkscape:window-y="0" />
<metadata
id="metadata3208">
<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>
<g
inkscape:groupmode="layer"
id="layer5"
inkscape:label="miter join"
style="display:none">
<path
style="fill:#6389b8;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 8.21875,2.3125 L 6.4375,4.09375 L -2.75,13.28125 L 0.78125,16.8125 L 8.21875,9.40625 L 15.71875,16.90625 L 19.25,13.34375 L 10,4.09375 L 8.21875,2.3125 z"
id="path3724" />
</g>
<g
inkscape:groupmode="layer"
id="layer6"
inkscape:label="bevel join"
style="display:none">
<path
style="fill:#6389b8;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 6.46875,4.125 L -2.71875,13.3125 L 0.8125,16.875 L 8.25,9.4375 L 15.75,16.9375 L 19.28125,13.40625 L 10,4.125 L 6.46875,4.125 z"
id="path3735" />
</g>
<g
inkscape:groupmode="layer"
id="layer7"
inkscape:label="round join"
style="display:inline">
<path
style="fill:#6389b8;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
d="M 7.96875,3.40625 C 7.401375,3.4676239 6.8720695,3.7212494 6.46875,4.125 L -2.71875,13.3125 L 0.8125,16.875 L 8.25,9.4375 L 15.75,16.9375 L 19.28125,13.40625 L 10,4.125 C 9.4661818,3.5909923 8.7196282,3.3268272 7.96875,3.40625 L 7.96875,3.40625 z"
id="path3743" />
</g>
<g
inkscape:label="line"
inkscape:groupmode="layer"
id="layer1"
style="display:inline">
<path
style="fill:none;fill-rule:evenodd;stroke:#d3c02d;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0;stroke-opacity:1"
d="M -0.96113074,15.095406 L 8.2402827,5.8939929 L 17.512367,15.166078"
id="path3213" />
</g>
</svg>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -154,6 +154,7 @@ for mk in [ makefile_core, makefile_gui, makefile_analysis ]:
src_path+"/src/core/renderer",
src_path+"/src/core/spatialindex",
src_path+"/src/core/symbology",
src_path+"/src/core/symbology-ng",
build_path, # qgsconfig.h, qgssvnversion.h
gdal_inc_dir,
geos_inc_dir]
@@ -163,6 +164,7 @@ for mk in [ makefile_core, makefile_gui, makefile_analysis ]:
makefile_gui.extra_libs.append("qgis_gui")
makefile_gui.extra_lib_dirs.append(build_path+"/src/gui"+intdir)
makefile_gui.extra_include_dirs.append(src_path+"/src/gui")
makefile_gui.extra_include_dirs.append(src_path+"/src/gui/symbology-ng")
makefile_gui.extra_include_dirs.append(build_path+"/src/gui")
makefile_gui.extra_include_dirs.append(build_path+"/src/ui")
makefile_gui.extra_include_dirs.append(src_path+"/src/plugins") # because of qgisplugin.h TODO: sort out
@@ -3,6 +3,7 @@ This file contains code for conversion between various (often nested) mapped typ
which are not wrapped by PyQt:
- QVector< QVector<TYPE> >
- QVector< QVector< QVector<TYPE> > >
- QList< QList<TYPE> >
- QSet<int>
- QSet<TYPE>
- QMap<int, QMap<int, TYPE> >
@@ -19,6 +20,7 @@ which are not wrapped by PyQt:
#if (PY_VERSION_HEX < 0x02050000)
typedef int Py_ssize_t;
#endif

%End


@@ -183,6 +185,85 @@ template <TYPE>
};



template <TYPE>
%MappedType QList< QList<TYPE> >
{
%TypeHeaderCode
#include <QList>
%End

%ConvertFromTypeCode
// Create the list.
PyObject *l;

if ((l = PyList_New(sipCpp->size())) == NULL)
return NULL;

const sipMappedType* qlist_type = sipFindMappedType("QList<TYPE>");

// Set the list elements.
for (int i = 0; i < sipCpp->size(); ++i)
{
QList<TYPE>* t = new QList<TYPE>(sipCpp->at(i));
PyObject *tobj;

if ((tobj = sipConvertFromMappedType(t, qlist_type, sipTransferObj)) == NULL)
{
Py_DECREF(l);
delete t;
return NULL;
}
PyList_SET_ITEM(l, i, tobj);
}

return l;
%End

%ConvertToTypeCode
const sipMappedType* qlist_type = sipFindMappedType("QList<TYPE>");

// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
if (!PyList_Check(sipPy))
return 0;

for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
if (!sipCanConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, SIP_NOT_NONE))
return 0;

return 1;
}


QList< QList<TYPE> > *ql = new QList< QList<TYPE> >;

for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
//TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QList<TYPE> * t = reinterpret_cast< QList<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

if (*sipIsErr)
{
sipReleaseInstance(t, sipClass_TYPE, state);
delete ql;
return 0;
}
ql->append(*t);
sipReleaseInstance(t, sipClass_TYPE, state);
}

*sipCppPtr = ql;
return sipGetState(sipTransferObj);
%End

};




%MappedType QSet<int>
{
%TypeHeaderCode
@@ -74,3 +74,4 @@
%Include qgsvectorlayer.sip
%Include qgsvectoroverlay.sip

%Include symbology-ng-core.sip
@@ -156,6 +156,12 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
//! @note deprecated
static const QString svgPath();

//! Returns the path to user's style. Added in QGIS 1.2
static const QString userStyleV2Path();

//! Returns the path to default style (works as a starting point). Added in QGIS 1.2
static const QString defaultStyleV2Path();

//! Returns the path to the application prefix directory.
static const QString prefixPath();

@@ -144,6 +144,16 @@ public:
*/
bool writeXML(QDomNode & layer_node, QDomDocument & document) const;

/** Set a custom property for layer. Properties are stored in a map and saved in project file.
* @note Added in v1.3 */
void setCustomProperty( const QString& key, const QVariant& value );
/** Read a custom property from layer. Properties are stored in a map and saved in project file.
* @note Added in v1.3 */
QVariant customProperty( const QString& value, const QVariant& defaultValue = QVariant() ) const;
/** Remove a custom property from layer. Properties are stored in a map and saved in project file.
* @note Added in v1.3 */
void removeCustomProperty( const QString& key );

/** Read the symbology for the current layer from the Dom node supplied.
* @param QDomNode node that will contain the symbology definition for this layer.
* @param errorMessage reference to string that will be updated with any error messages
@@ -52,6 +52,8 @@ class QgsRenderer
virtual QgsRenderer* clone() const=0;
/** Change selection color */
static void setSelectionColor(QColor color);
/** Get selection color */
static QColor selectionColor();
/**Returns true if this renderer returns a pixmap in the render method (e.g. for point data or diagrams)*/
virtual bool containsPixmap() const;
/**Returns true if this renderer uses its own transparency settings, e.g. differentiated by classification.
@@ -101,6 +101,18 @@ public:
/** Sets the renderer. If a renderer is already present, it is deleted */
void setRenderer(QgsRenderer * r /Transfer/);

/** Return renderer V2. Added in QGIS 1.2 */
QgsFeatureRendererV2* rendererV2();
/** Set renderer V2. Added in QGIS 1.2 */
void setRendererV2(QgsFeatureRendererV2* r);
/** Return whether using renderer V2. Added in QGIS 1.2 */
bool isUsingRendererV2();
/** set whether to use renderer V2 for drawing. Added in QGIS 1.2 */
void setUsingRendererV2(bool usingRendererV2);

void drawRendererV2( QgsRenderContext& rendererContext, bool labeling );
void drawRendererV2Levels( QgsRenderContext& rendererContext, bool labeling );

/** Returns point, line or polygon */
QGis::GeometryType geometryType() const;

0 comments on commit 961742e

Please sign in to comment.