Skip to content

Commit 6a080ba

Browse files
committedJan 21, 2015
Add some missing type conversions to python bindings
1 parent c6a77f6 commit 6a080ba

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed
 

‎python/core/composer/qgscomposermultiframe.sip

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
%ModuleHeaderCode
2+
// fix to allow compilation with sip 4.7
3+
#include <qgscomposerhtml.h>
4+
#include <qgscomposertablev2.h>
5+
#include <qgscomposerattributetablev2.h>
6+
%End
17

28
/**
39
* \ingroup composer
@@ -9,7 +15,20 @@
915
class QgsComposerMultiFrame: QgsComposerObject
1016
{
1117
%TypeHeaderCode
12-
#include "qgscomposermultiframe.h"
18+
#include <qgscomposermultiframe.h>
19+
%End
20+
21+
%ConvertToSubClassCode
22+
if (dynamic_cast<QgsComposerHtml*>(sipCpp) != NULL)
23+
sipClass = sipClass_QgsComposerHtml;
24+
else if (dynamic_cast<QgsComposerAttributeTableV2*>(sipCpp) != NULL)
25+
sipClass = sipClass_QgsComposerAttributeTableV2;
26+
else if (dynamic_cast<QgsComposerTableV2*>(sipCpp) != NULL)
27+
sipClass = sipClass_QgsComposerTableV2;
28+
else if (dynamic_cast<QgsComposerMultiFrame*>(sipCpp) != NULL)
29+
sipClass = sipClass_QgsComposerMultiFrame;
30+
else
31+
sipClass = NULL;
1332
%End
1433

1534
public:

‎python/core/symbology-ng/qgsrendererv2.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ class QgsFeatureRendererV2
4242
sipClass = sipClass_QgsGraduatedSymbolRendererV2;
4343
else if (sipCpp->type() == "RuleRenderer")
4444
sipClass = sipClass_QgsRuleBasedRendererV2;
45+
else if (sipCpp->type() == "heatmapRenderer")
46+
sipClass = sipClass_QgsHeatmapRenderer;
47+
else if (sipCpp->type() == "invertedPolygonRenderer")
48+
sipClass = sipClass_QgsInvertedPolygonRenderer;
49+
else if (sipCpp->type() == "pointDisplacement")
50+
sipClass = sipClass_QgsPointDisplacementRenderer;
4551
else
4652
sipClass = 0;
4753
%End

‎python/core/symbology-ng/qgssymbollayerv2.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,17 @@ class QgsSymbolLayerV2
4343
sipClass = sipClass_QgsPointPatternFillSymbolLayer;
4444
else if (dynamic_cast<QgsSVGFillSymbolLayer*>(sipCpp) != NULL)
4545
sipClass = sipClass_QgsSVGFillSymbolLayer;
46+
else if (dynamic_cast<QgsRasterFillSymbolLayer*>(sipCpp) != NULL)
47+
sipClass = sipClass_QgsRasterFillSymbolLayer;
4648
else
4749
sipClass = sipClass_QgsImageFillSymbolLayer;
4850
}
4951
else if (dynamic_cast<QgsCentroidFillSymbolLayerV2*>(sipCpp) != NULL)
5052
sipClass = sipClass_QgsCentroidFillSymbolLayerV2;
53+
else if (dynamic_cast<QgsGradientFillSymbolLayerV2*>(sipCpp) != NULL)
54+
sipClass = sipClass_QgsGradientFillSymbolLayerV2;
55+
else if (dynamic_cast<QgsShapeburstFillSymbolLayerV2*>(sipCpp) != NULL)
56+
sipClass = sipClass_QgsShapeburstFillSymbolLayerV2;
5157
else
5258
sipClass = sipClass_QgsFillSymbolLayerV2;
5359
break;

0 commit comments

Comments
 (0)
Please sign in to comment.