Skip to content
Permalink
Browse files
Merge branch 'master' of https://github.com/qgis/Quantum-GIS
  • Loading branch information
volaya committed Jan 27, 2013
2 parents 20e4ec5 + a9a289e commit 250e2a52851b482b6fbabe176d7bf43c3e8c55c8
Showing with 13,100 additions and 10,189 deletions.
  1. +34 −34 doc/TRANSLATORS
  2. +3 −1 doc/osx.t2t
  3. +2,374 −1,885 i18n/qgis_de.ts
  4. +78 −55 python/core/conversions.sip
  5. +3 −0 python/core/core.sip
  6. +3 −3 python/core/diagram/qgsdiagram.sip
  7. +3 −3 python/core/diagram/qgshistogramdiagram.sip
  8. +3 −3 python/core/diagram/qgspiediagram.sip
  9. +3 −3 python/core/diagram/qgstextdiagram.sip
  10. +8 −8 python/core/qgsdiagramrendererv2.sip
  11. +10 −10 python/core/qgsexpression.sip
  12. +81 −53 python/core/qgsfeature.sip
  13. +47 −0 python/core/qgsfeatureiterator.sip
  14. +50 −0 python/core/qgsfeaturerequest.sip
  15. +66 −0 python/core/qgsfield.sip
  16. +3 −3 python/core/qgslabel.sip
  17. +0 −6 python/core/qgsmaplayer.sip
  18. +12 −59 python/core/qgsvectordataprovider.sip
  19. +1 −1 python/core/qgsvectorfilewriter.sip
  20. +16 −21 python/core/qgsvectorlayer.sip
  21. +105 −0 python/core/qgsvectorlayereditbuffer.sip
  22. +1 −1 python/core/qgsvectorlayerimport.sip
  23. +6 −19 python/core/qgsvectorlayerjoinbuffer.sip
  24. +0 −88 python/core/qgsvectorlayerundocommand.sip
  25. +0 −6 python/core/raster/qgsrasterlayer.sip
  26. +1 −1 python/gui/qgsexpressionbuilderwidget.sip
  27. +4 −0 python/gui/qgslegendinterface.sip
  28. +1 −1 python/gui/qgsmessagelogviewer.sip
  29. +7 −10 python/plugins/osm/OsmDatabaseManager.py
  30. +1 −1 src/CMakeLists.txt
  31. +4 −3 src/analysis/interpolation/DualEdgeTriangulation.cc
  32. +7 −8 src/analysis/interpolation/qgsinterpolator.cpp
  33. +3 −4 src/analysis/interpolation/qgstininterpolator.cpp
  34. +12 −20 src/analysis/network/qgslinevectorlayerdirector.cpp
  35. +57 −57 src/analysis/vector/qgsgeometryanalyzer.cpp
  36. +18 −36 src/analysis/vector/qgsoverlayanalyzer.cpp
  37. +2 −2 src/analysis/vector/qgsoverlayanalyzer.h
  38. +5 −3 src/analysis/vector/qgszonalstatistics.cpp
  39. +7 −7 src/app/composer/qgsattributeselectiondialog.cpp
  40. +2 −2 src/app/gps/qgsgpsinformationwidget.cpp
  41. +5 −0 src/app/legend/qgsapplegendinterface.cpp
  42. +3 −0 src/app/legend/qgsapplegendinterface.h
  43. +7 −0 src/app/legend/qgslegend.cpp
  44. +3 −0 src/app/legend/qgslegend.h
  45. +8 −16 src/app/legend/qgslegendlayer.cpp
  46. +0 −1 src/app/legend/qgslegendlayer.h
  47. +14 −13 src/app/qgisapp.cpp
  48. +6 −18 src/app/qgsaddjoindialog.cpp
  49. +0 −4 src/app/qgsaddjoindialog.h
  50. +3 −3 src/app/qgsattributeactiondialog.cpp
  51. +1 −1 src/app/qgsattributeactiondialog.h
  52. +15 −17 src/app/qgsattributedialog.cpp
  53. +9 −11 src/app/qgsattributetabledialog.cpp
  54. +8 −7 src/app/qgsattributetypedialog.cpp
  55. +4 −4 src/app/qgsattributetypeloaddialog.cpp
  56. +5 −5 src/app/qgsclipboard.cpp
  57. +2 −2 src/app/qgsclipboard.h
  58. +5 −5 src/app/qgscontinuouscolordialog.cpp
  59. +4 −5 src/app/qgsdelattrdialog.cpp
  60. +11 −17 src/app/qgsdiagramproperties.cpp
  61. +19 −20 src/app/qgsfeatureaction.cpp
  62. +8 −16 src/app/qgsfieldcalculator.cpp
  63. +6 −7 src/app/qgsfieldsproperties.cpp
  64. +6 −7 src/app/qgsgraduatedsymboldialog.cpp
  65. +21 −24 src/app/qgsidentifyresults.cpp
  66. +7 −7 src/app/qgslabeldialog.cpp
  67. +6 −7 src/app/qgslabelinggui.cpp
  68. +2 −2 src/app/qgslabelpropertydialog.cpp
  69. +2 −2 src/app/qgsmaptooladdfeature.cpp
  70. +7 −12 src/app/qgsmaptoollabel.cpp
  71. +5 −6 src/app/qgsmaptooloffsetcurve.cpp
  72. +3 −4 src/app/qgsmaptoolrotatepointsymbols.cpp
  73. +1 −1 src/app/qgsmaptoolshowhidelabels.cpp
  74. +16 −16 src/app/qgsmergeattributesdialog.cpp
  75. +1 −1 src/app/qgsmergeattributesdialog.h
  76. +7 −9 src/app/qgssinglesymboldialog.cpp
  77. +5 −5 src/app/qgsuniquevaluedialog.cpp
  78. +10 −15 src/app/qgsvectorlayerproperties.cpp
  79. +14 −0 src/core/CMakeLists.txt
  80. +5 −8 src/core/composer/qgsatlascomposition.cpp
  81. +11 −13 src/core/composer/qgscomposerattributetable.cpp
  82. +2 −2 src/core/composer/qgscomposerattributetable.h
  83. +4 −4 src/core/composer/qgslegendmodel.cpp
  84. +3 −3 src/core/diagram/qgsdiagram.h
  85. +11 −13 src/core/diagram/qgshistogramdiagram.cpp
  86. +3 −3 src/core/diagram/qgshistogramdiagram.h
  87. +6 −6 src/core/diagram/qgspiediagram.cpp
  88. +3 −3 src/core/diagram/qgspiediagram.h
  89. +6 −6 src/core/diagram/qgstextdiagram.cpp
  90. +3 −3 src/core/diagram/qgstextdiagram.h
  91. +10 −9 src/core/qgsattributeaction.cpp
  92. +6 −6 src/core/qgsdiagramrendererv2.cpp
  93. +8 −8 src/core/qgsdiagramrendererv2.h
  94. +11 −11 src/core/qgsexpression.cpp
  95. +10 −10 src/core/qgsexpression.h
  96. +61 −61 src/core/qgsfeature.cpp
  97. +59 −57 src/core/qgsfeature.h
  98. +39 −0 src/core/qgsfeatureiterator.cpp
  99. +129 −0 src/core/qgsfeatureiterator.h
  100. +26 −0 src/core/qgsfeaturerequest.cpp
  101. +101 −0 src/core/qgsfeaturerequest.h
  102. +6 −0 src/core/qgsfield.cpp
  103. +57 −0 src/core/qgsfield.h
  104. +16 −24 src/core/qgslabel.cpp
  105. +5 −4 src/core/qgslabel.h
  106. +0 −6 src/core/qgsmaplayer.h
  107. +15 −14 src/core/qgsofflineediting.cpp
  108. +23 −28 src/core/qgspallabeling.cpp
  109. +0 −1 src/core/qgsproject.cpp
  110. +3 −4 src/core/qgsprojectfiletransform.cpp
  111. +34 −49 src/core/qgsvectordataprovider.cpp
  112. +8 −41 src/core/qgsvectordataprovider.h
  113. +17 −25 src/core/qgsvectorfilewriter.cpp
  114. +2 −2 src/core/qgsvectorfilewriter.h
  115. +449 −1,947 src/core/qgsvectorlayer.cpp
  116. +51 −122 src/core/qgsvectorlayer.h
  117. +39 −0 src/core/qgsvectorlayercache.cpp
  118. +46 −0 src/core/qgsvectorlayercache.h
  119. +526 −0 src/core/qgsvectorlayereditbuffer.cpp
  120. +181 −0 src/core/qgsvectorlayereditbuffer.h
  121. +504 −0 src/core/qgsvectorlayereditutils.cpp
  122. +103 −0 src/core/qgsvectorlayereditutils.h
  123. +456 −0 src/core/qgsvectorlayerfeatureiterator.cpp
  124. +81 −0 src/core/qgsvectorlayerfeatureiterator.h
  125. +14 −15 src/core/qgsvectorlayerimport.cpp
  126. +1 −1 src/core/qgsvectorlayerimport.h
  127. +30 −226 src/core/qgsvectorlayerjoinbuffer.cpp
  128. +10 −35 src/core/qgsvectorlayerjoinbuffer.h
  129. +330 −50 src/core/qgsvectorlayerundocommand.cpp
  130. +101 −123 src/core/qgsvectorlayerundocommand.h
  131. +4 −15 src/core/qgswfsdata.cpp
  132. +1 −0 src/core/qgswfsdata.h
  133. +0 −26 src/core/raster/qgsrasterlayer.cpp
  134. +0 −6 src/core/raster/qgsrasterlayer.h
  135. +5 −5 src/core/renderer/qgscontinuouscolorrenderer.cpp
  136. +7 −10 src/core/renderer/qgsgraduatedsymbolrenderer.cpp
  137. +3 −6 src/core/renderer/qgssinglesymbolrenderer.cpp
  138. +8 −12 src/core/renderer/qgsuniquevaluerenderer.cpp
  139. +6 −7 src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp
  140. +7 −7 src/core/symbology-ng/qgsellipsesymbollayerv2.cpp
  141. +6 −7 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  142. +3 −7 src/core/symbology-ng/qgspointdisplacementrenderer.cpp
  143. +14 −10 src/core/symbology-ng/qgsrendererv2.cpp
  144. +2 −2 src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
  145. +8 −4 src/core/symbology-ng/qgssymbologyv2conversion.cpp
  146. +2 −2 src/core/symbology-ng/qgsvectorfieldsymbollayer.cpp
  147. +7 −5 src/core/symbology/qgssymbol.cpp
  148. +1 −1 src/gui/attributetable/qgsattributetablememorymodel.cpp
  149. +11 −9 src/gui/attributetable/qgsattributetablemodel.cpp
  150. +3 −3 src/gui/qgsattributeeditor.cpp
  151. +1 −1 src/gui/qgsattributeeditor.h
  152. +5 −5 src/gui/qgsexpressionbuilderwidget.cpp
  153. +1 −1 src/gui/qgsexpressionbuilderwidget.h
  154. +8 −10 src/gui/qgsformannotationitem.cpp
  155. +2 −2 src/gui/qgshtmlannotationitem.cpp
  156. +4 −0 src/gui/qgslegendinterface.h
  157. +1 −1 src/gui/qgsmaptip.cpp
  158. +4 −3 src/gui/qgsquerybuilder.cpp
  159. +6 −7 src/gui/qgssearchquerybuilder.cpp
  160. +3 −4 src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
  161. +3 −5 src/gui/symbology-ng/qgsellipsesymbollayerv2widget.cpp
  162. +4 −5 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
  163. +3 −4 src/gui/symbology-ng/qgspointdisplacementrendererwidget.cpp
  164. +3 −3 src/gui/symbology-ng/qgsrendererv2widget.cpp
  165. +3 −3 src/gui/symbology-ng/qgsrendererv2widget.h
  166. +2 −2 src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp
  167. +3 −4 src/gui/symbology-ng/qgsvectorfieldsymbollayerwidget.cpp
  168. +1 −1 src/mapserver/qgsfilter.cpp
  169. +17 −16 src/mapserver/qgsprojectparser.cpp
  170. +52 −58 src/mapserver/qgswfsserver.cpp
  171. +5 −3 src/mapserver/qgswfsserver.h
  172. +9 −14 src/mapserver/qgswmsserver.cpp
  173. +1 −1 src/plugins/CMakeLists.txt
  174. +13 −13 src/plugins/diagram_overlay/qgsbardiagramfactory.cpp
  175. +2 −2 src/plugins/diagram_overlay/qgsbardiagramfactory.h
  176. +58 −67 src/plugins/diagram_overlay/qgsdiagramoverlay.cpp
  177. +7 −9 src/plugins/diagram_overlay/qgsdiagramrenderer.cpp
  178. +5 −6 src/plugins/diagram_overlay/qgspiediagramfactory.cpp
  179. +36 −35 src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
  180. +8 −12 src/plugins/grass/qgsgrassmodule.cpp
  181. +3 −2 src/plugins/grass/qgsgrassmodule.h
  182. +5 −13 src/plugins/heatmap/heatmap.cpp
  183. +4 −6 src/plugins/heatmap/heatmapgui.cpp
  184. +3 −4 src/plugins/interpolation/qgsinterpolationdialog.cpp
  185. +3 −4 src/plugins/roadgraph/linevectorlayerwidget.cpp
  186. +3 −4 src/plugins/roadgraph/speedproperter.cpp
  187. +1 −1 src/plugins/spatialquery/qgsspatialquerydialog.cpp
  188. +3 −4 src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp
  189. +2 −2 src/providers/CMakeLists.txt
  190. +1 −0 src/providers/delimitedtext/CMakeLists.txt
  191. +245 −0 src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp
  192. +40 −0 src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.h
  193. +20 −202 src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
  194. +10 −41 src/providers/delimitedtext/qgsdelimitedtextprovider.h
  195. +5 −1 src/providers/gpx/CMakeLists.txt
  196. +467 −0 src/providers/gpx/qgsgpxfeatureiterator.cpp
  197. +56 −0 src/providers/gpx/qgsgpxfeatureiterator.h
  198. +91 −429 src/providers/gpx/qgsgpxprovider.cpp
  199. +28 −50 src/providers/gpx/qgsgpxprovider.h
  200. +1 −1 src/providers/grass/CMakeLists.txt
  201. +376 −0 src/providers/grass/qgsgrassfeatureiterator.cpp
  202. +58 −0 src/providers/grass/qgsgrassfeatureiterator.h
  203. +46 −325 src/providers/grass/qgsgrassprovider.cpp
  204. +12 −54 src/providers/grass/qgsgrassprovider.h
  205. +1 −1 src/providers/memory/CMakeLists.txt
  206. +174 −0 src/providers/memory/qgsmemoryfeatureiterator.cpp
  207. +42 −0 src/providers/memory/qgsmemoryfeatureiterator.h
  208. +36 −151 src/providers/memory/qgsmemoryprovider.cpp
  209. +7 −54 src/providers/memory/qgsmemoryprovider.h
  210. +1 −8 src/providers/mssql/qgsmssqlprovider.cpp
  211. +0 −5 src/providers/mssql/qgsmssqlprovider.h
  212. +1 −1 src/providers/ogr/CMakeLists.txt
  213. +266 −0 src/providers/ogr/qgsogrfeatureiterator.cpp
  214. +43 −0 src/providers/ogr/qgsogrfeatureiterator.h
  215. +30 −279 src/providers/ogr/qgsogrprovider.cpp
  216. +9 −47 src/providers/ogr/qgsogrprovider.h
  217. +1 −0 src/providers/oracle/CMakeLists.txt
  218. +316 −0 src/providers/oracle/qgsoraclefeatureiterator.cpp
  219. +56 −0 src/providers/oracle/qgsoraclefeatureiterator.h
  220. +112 −448 src/providers/oracle/qgsoracleprovider.cpp
  221. +14 −55 src/providers/oracle/qgsoracleprovider.h
  222. +1 −0 src/providers/osm/CMakeLists.txt
  223. +472 −0 src/providers/osm/osmfeatureiterator.cpp
  224. +87 −0 src/providers/osm/osmfeatureiterator.h
  225. +21 −518 src/providers/osm/osmprovider.cpp
  226. +15 −118 src/providers/osm/osmprovider.h
  227. +1 −2 src/providers/osm/osmrenderer.cpp
  228. +1 −0 src/providers/postgres/CMakeLists.txt
  229. +8 −5 src/providers/postgres/qgspostgresconn.cpp
  230. +461 −0 src/providers/postgres/qgspostgresfeatureiterator.cpp
  231. +54 −0 src/providers/postgres/qgspostgresfeatureiterator.h
  232. +85 −508 src/providers/postgres/qgspostgresprovider.cpp
  233. +9 −58 src/providers/postgres/qgspostgresprovider.h
  234. +1 −0 src/providers/spatialite/CMakeLists.txt
  235. +362 −0 src/providers/spatialite/qgsspatialitefeatureiterator.cpp
  236. +53 −0 src/providers/spatialite/qgsspatialitefeatureiterator.h
  237. +52 −390 src/providers/spatialite/qgsspatialiteprovider.cpp
  238. +9 −44 src/providers/spatialite/qgsspatialiteprovider.h
  239. +1 −0 src/providers/sqlanywhere/qgssqlanywhereprovider.cpp
  240. +0 −5 src/providers/sqlanywhere/qgssqlanywhereprovider.h
  241. +1 −0 src/providers/wfs/CMakeLists.txt
  242. +98 −0 src/providers/wfs/qgswfsfeatureiterator.cpp
  243. +24 −0 src/providers/wfs/qgswfsfeatureiterator.h
  244. +106 −120 src/providers/wfs/qgswfsprovider.cpp
  245. +13 −20 src/providers/wfs/qgswfsprovider.h
  246. +1 −1 src/providers/wfs/qgswfssourceselect.cpp
  247. +1 −0 tests/src/core/CMakeLists.txt
  248. +4 −4 tests/src/core/regression1141.cpp
  249. +4 −6 tests/src/core/testqgscomposerlabel.cpp
  250. +6 −3 tests/src/core/testqgsexpression.cpp
  251. +4 −4 tests/src/core/testqgsmaprenderer.cpp
  252. +3 −3 tests/src/core/testqgsrulebasedrenderer.cpp
  253. +232 −0 tests/src/core/testqgsvectordataprovider.cpp
  254. +12 −11 tests/src/core/testqgsvectorfilewriter.cpp
  255. +3 −4 tests/src/core/testqgsvectorlayer.cpp
  256. +3 −3 tests/src/python/test_qgscomposerlabel.py
  257. +24 −52 tests/src/python/test_qgsfeature.py
  258. +6 −8 tests/src/python/test_qgsgeometry.py
  259. +14 −15 tests/src/python/test_qgsmemoryprovider.py
  260. +3 −3 tests/src/python/test_qgsvectorfilewriter.py
  261. +960 −1 tests/src/python/test_qgsvectorlayer.py

Large diffs are not rendered by default.

@@ -1,4 +1,3 @@

= Building on MacOS X =

In this approach I will try to avoid as much as possible building dependencies
@@ -77,6 +76,9 @@ of Xcode, regardless of using a separate DMG installer for just the tools.

Xcode 4.4+ also introduces the clang frontend to the LLVM compiler as default.

**Note:** In XCODE 4.5 installed from teh app store, you need to install the
command line tools from XCode -> Preferences -> Downloads and choose command line tools.

http://clang.llvm.org/

The supplied clang version 4 can compile QGIS, but presents many warnings

Large diffs are not rendered by default.

@@ -14,7 +14,7 @@ which are not wrapped by PyQt:
- QMap<TYPE1, TYPE2*>
- QMap<double, TYPE>
- QMultiMap<double, TYPE2>
- QMap<qint64, QgsGeometry>
- QMap<qint64, TYPE>
- QMap<qint64, QgsOverlayObject*>
- QList< QPair< QString, QList<QString> > >
- QVector<TYPE*>
@@ -661,94 +661,117 @@ template<TYPE>
};


//
// copied from PyQt4 QMap<int, TYPE> and adapted to qint64
//

%MappedType QMap<qint64, QgsGeometry>
// QMap<qint64, TYPE> is implemented as a Python dictionary.
template<TYPE>
%MappedType QMap<qint64, TYPE> /DocType="dict-of-qint64-TYPE"/
{
%TypeHeaderCode
#include <QMap>
#include <qmap.h>
%End

%ConvertFromTypeCode
// Create the list.
PyObject *d;
// Create the dictionary.
PyObject *d = PyDict_New();

if ((d = PyDict_New()) == NULL)
return NULL;
if (!d)
return NULL;

// Set the list elements.
for (QMap<qint64, QgsGeometry>::iterator it = sipCpp->begin(); it != sipCpp->end(); ++it)
{
PyObject *kobj = PyLong_FromLongLong(it.key());
PyObject *tobj = sipConvertFromInstance( &it.value(), sipClass_QgsGeometry, sipTransferObj);
// Set the dictionary elements.
QMap<qint64, TYPE>::const_iterator i = sipCpp->constBegin();

if (kobj == NULL || tobj == NULL || PyDict_SetItem(d, kobj, tobj) < 0)
while (i != sipCpp->constEnd())
{
Py_DECREF(d);
TYPE *t = new TYPE(i.value());

if (kobj)
{
Py_DECREF(kobj);
}
PyObject *kobj = PyLong_FromLongLong(i.key());
//PyObject *kobj = SIPLong_FromLong(i.key());
PyObject *tobj = sipConvertFromNewType(t, sipType_TYPE, sipTransferObj);

if (tobj)
{
if (kobj == NULL || tobj == NULL || PyDict_SetItem(d, kobj, tobj) < 0)
{
Py_DECREF(d);

if (kobj)
{
Py_DECREF(kobj);
}

if (tobj)
{
Py_DECREF(tobj);
}
else
{
delete t;
}

return NULL;
}

Py_DECREF(kobj);
Py_DECREF(tobj);
}

return NULL;
++i;
}

Py_DECREF(tobj);
}

return d;
return d;
%End

%ConvertToTypeCode
PyObject *kobj, *tobj;
PyObject *kobj, *tobj;
SIP_SSIZE_T i = 0;

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

while (PyDict_Next(sipPy, &i, &kobj, &tobj))
if (!sipCanConvertToType(tobj, sipType_TYPE, SIP_NOT_NONE))
return 0;

return 1;
}

QMap<qint64, TYPE> *qm = new QMap<qint64, TYPE>;

Py_ssize_t i = 0;
while (PyDict_Next(sipPy, &i, &kobj, &tobj))
{
if (!sipCanConvertToInstance(tobj, sipClass_QgsGeometry, SIP_NOT_NONE))
return 0;
}
return 1;
}
int state;
//, k = SIPLong_AsLong(kobj);
qint64 k = PyLong_AsLongLong(kobj);
TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(tobj, sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));

QMap<qint64, QgsGeometry> *qm = new QMap<qint64, QgsGeometry>;
if (*sipIsErr)
{
sipReleaseType(t, sipType_TYPE, state);

Py_ssize_t i = 0;
while (PyDict_Next(sipPy, &i, &kobj, &tobj))
{
int state;
qint64 k = PyLong_AsLongLong(kobj);
QgsGeometry * t = reinterpret_cast<QgsGeometry*>(sipConvertToInstance(tobj, sipClass_QgsGeometry, sipTransferObj,SIP_NOT_NONE,&state,sipIsErr));
delete qm;
return 0;
}

if (*sipIsErr)
{
sipReleaseInstance(t, sipClass_QgsGeometry, state);
delete qm;
return 0;
qm->insert(k, *t);

sipReleaseType(t, sipType_TYPE, state);
}

qm->insert(k, *t);
sipReleaseInstance(t, sipClass_QgsGeometry, state);
}
*sipCppPtr = qm;

*sipCppPtr = qm;
return sipGetState(sipTransferObj);
return sipGetState(sipTransferObj);
%End
};







%MappedType QMap<QString, QVariant::Type>
{
%TypeHeaderCode
@@ -26,6 +26,8 @@
%Include qgsdistancearea.sip
%Include qgsexpression.sip
%Include qgsfeature.sip
%Include qgsfeatureiterator.sip
%Include qgsfeaturerequest.sip
%Include qgsfield.sip
%Include qgsgeometry.sip
%Include qgsgeometryvalidator.sip
@@ -72,6 +74,7 @@
%Include qgsvectordataprovider.sip
%Include qgsvectorfilewriter.sip
%Include qgsvectorlayer.sip
%Include qgsvectorlayereditbuffer.sip
%Include qgsvectorlayerimport.sip
%Include qgsvectorlayerjoinbuffer.sip
%Include qgsvectorlayerundocommand.sip
@@ -6,12 +6,12 @@ class QgsDiagram
public:
virtual ~QgsDiagram();
/**Draws the diagram at the given position (in pixel coordinates)*/
virtual void renderDiagram( const QgsAttributeMap& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position ) = 0;
virtual void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position ) = 0;
virtual QString diagramName() const = 0;
/**Returns the size in map units the diagram will use to render.*/
virtual QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s ) = 0;
virtual QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s ) = 0;
/**Returns the size in map units the diagram will use to render. Interpolate size*/
virtual QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) = 0;
virtual QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) = 0;

protected:
/** Changes the pen width to match the current settings and rendering context
@@ -7,8 +7,8 @@ class QgsHistogramDiagram: QgsDiagram
QgsHistogramDiagram();
~QgsHistogramDiagram();

void renderDiagram( const QgsAttributeMap& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is );
void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is );
QString diagramName() const;
};
@@ -7,8 +7,8 @@ class QgsPieDiagram: QgsDiagram
QgsPieDiagram();
~QgsPieDiagram();

void renderDiagram( const QgsAttributeMap& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is );
void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is );
QString diagramName() const;
};
@@ -20,9 +20,9 @@ class QgsTextDiagram: QgsDiagram

QgsTextDiagram();
~QgsTextDiagram();
void renderDiagram( const QgsAttributeMap& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is );
void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is );

QString diagramName() const;
};
@@ -119,14 +119,14 @@ class QgsDiagramRendererV2
virtual ~QgsDiagramRendererV2();

/**Returns size of the diagram for feature f in map units. Returns an invalid QSizeF in case of error*/
virtual QSizeF sizeMapUnits( const QgsAttributeMap& attributes, const QgsRenderContext& c );
virtual QSizeF sizeMapUnits( const QgsAttributes& attributes, const QgsRenderContext& c );

virtual QString rendererName() const = 0;

/**Returns attribute indices needed for diagram rendering*/
virtual QList<int> diagramAttributes() const = 0;

void renderDiagram( const QgsAttributeMap& att, QgsRenderContext& c, const QPointF& pos );
void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QPointF& pos );

void setDiagram( QgsDiagram* d );
const QgsDiagram* diagram() const;
@@ -144,10 +144,10 @@ class QgsDiagramRendererV2
* @param c render context
* @param s out: diagram settings for the feature
*/
virtual bool diagramSettings( const QgsAttributeMap& att, const QgsRenderContext& c, QgsDiagramSettings& s ) = 0;
virtual bool diagramSettings( const QgsAttributes& att, const QgsRenderContext& c, QgsDiagramSettings& s ) = 0;

/**Returns size of the diagram (in painter units) or an invalid size in case of error*/
virtual QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c ) = 0;
virtual QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c ) = 0;

/**Converts size from mm to map units*/
void convertSizeToMapUnits( QSizeF& size, const QgsRenderContext& context ) const;
@@ -183,9 +183,9 @@ class QgsSingleCategoryDiagramRenderer : QgsDiagramRendererV2
void writeXML( QDomElement& layerElem, QDomDocument& doc ) const;

protected:
bool diagramSettings( const QgsAttributeMap&, const QgsRenderContext& c, QgsDiagramSettings& s );
bool diagramSettings( const QgsAttributes&, const QgsRenderContext& c, QgsDiagramSettings& s );

QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c );
};

class QgsLinearlyInterpolatedDiagramRenderer : QgsDiagramRendererV2
@@ -226,7 +226,7 @@ class QgsLinearlyInterpolatedDiagramRenderer : QgsDiagramRendererV2
void writeXML( QDomElement& layerElem, QDomDocument& doc ) const;

protected:
bool diagramSettings( const QgsAttributeMap&, const QgsRenderContext& c, QgsDiagramSettings& s );
bool diagramSettings( const QgsAttributes&, const QgsRenderContext& c, QgsDiagramSettings& s );

QSizeF diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c );
QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c );
};
Loading

0 comments on commit 250e2a5

Please sign in to comment.