[QGIS Commit] r14736 - trunk/qgis/python/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Nov 22 07:53:24 EST 2010


Author: mhugent
Date: 2010-11-22 04:53:24 -0800 (Mon, 22 Nov 2010)
New Revision: 14736

Modified:
   trunk/qgis/python/core/qgscomposeritem.sip
Log:
Apply fix for ticket #3236, provided by NathanW

Modified: trunk/qgis/python/core/qgscomposeritem.sip
===================================================================
--- trunk/qgis/python/core/qgscomposeritem.sip	2010-11-22 00:01:25 UTC (rev 14735)
+++ trunk/qgis/python/core/qgscomposeritem.sip	2010-11-22 12:53:24 UTC (rev 14736)
@@ -5,8 +5,31 @@
 {
 %TypeHeaderCode
 #include <qgscomposeritem.h>
+#include <qgscomposerlabel.h>
+#include <qgscomposerlegend.h>
+#include <qgscomposermap.h>
+#include <qgscomposerpicture.h>
+#include <qgscomposerscalebar.h>
+#include <qgscomposershape.h>
 %End
 
+%ConvertToSubClassCode
+  if (dynamic_cast<QgsComposerLabel*>(sipCpp) != NULL)
+    sipClass = sipClass_QgsComposerLabel;
+  else if (dynamic_cast<QgsComposerLegend*>(sipCpp) != NULL)
+    sipClass = sipClass_QgsComposerLegend;
+  else if (dynamic_cast<QgsComposerMap*>(sipCpp) != NULL)
+    sipClass = sipClass_QgsComposerMap;
+  else if (dynamic_cast<QgsComposerPicture*>(sipCpp) != NULL)
+    sipClass = sipClass_QgsComposerPicture;
+  else if (dynamic_cast<QgsComposerScaleBar*>(sipCpp) != NULL)
+    sipClass = sipClass_QgsComposerScaleBar;
+  else if (dynamic_cast<QgsComposerShape*>(sipCpp) != NULL)
+    sipClass = sipClass_QgsComposerShape;
+  else
+    sipClass = 0;
+%End
+
   public:
 
     /**Describes the action (move or resize in different directon) to be done during mouse move*/



More information about the QGIS-commit mailing list