Skip to content
Permalink
Browse files
Add some more SIP downcasts for map tools
  • Loading branch information
nyalldawson committed Oct 18, 2021
1 parent 1f8aa46 commit a81b872bf4158a56460c02df23b9349e141162eb
Showing with 30 additions and 0 deletions.
  1. +15 −0 python/gui/auto_generated/qgsmaptool.sip.in
  2. +15 −0 src/gui/qgsmaptool.h
@@ -21,6 +21,11 @@
#include <qgsmaptoolemitpoint.h>
#include <qgsmaptoolidentify.h>
#include <qgsmaptooldigitizefeature.h>
#include <qgsmaptoolextent.h>
#include <qgsmaptoolidentifyfeature.h>
#include <qgsmaptoolcapture.h>
#include <qgsmaptooladvanceddigitizing.h>
#include <qgsmaptooledit.h>
%End

class QgsMapTool : QObject
@@ -42,10 +47,20 @@ implemented as map tools.
sipType = sipType_QgsMapToolPan;
else if ( dynamic_cast<QgsMapToolEmitPoint *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolEmitPoint;
else if ( dynamic_cast<QgsMapToolExtent *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolExtent;
else if ( dynamic_cast<QgsMapToolIdentifyFeature *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolIdentifyFeature;
else if ( dynamic_cast<QgsMapToolIdentify *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolIdentify;
else if ( dynamic_cast<QgsMapToolDigitizeFeature *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolDigitizeFeature;
else if ( dynamic_cast<QgsMapToolCapture *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolCapture;
else if ( dynamic_cast<QgsMapToolAdvancedDigitizing *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolAdvancedDigitizing;
else if ( dynamic_cast<QgsMapToolEdit *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolEdit;
else
sipType = NULL;
%End
@@ -52,6 +52,11 @@ class QMenu;
#include <qgsmaptoolemitpoint.h>
#include <qgsmaptoolidentify.h>
#include <qgsmaptooldigitizefeature.h>
#include <qgsmaptoolextent.h>
#include <qgsmaptoolidentifyfeature.h>
#include <qgsmaptoolcapture.h>
#include <qgsmaptooladvanceddigitizing.h>
#include <qgsmaptooledit.h>
% End
#endif

@@ -73,10 +78,20 @@ class GUI_EXPORT QgsMapTool : public QObject
sipType = sipType_QgsMapToolPan;
else if ( dynamic_cast<QgsMapToolEmitPoint *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolEmitPoint;
else if ( dynamic_cast<QgsMapToolExtent *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolExtent;
else if ( dynamic_cast<QgsMapToolIdentifyFeature *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolIdentifyFeature;
else if ( dynamic_cast<QgsMapToolIdentify *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolIdentify;
else if ( dynamic_cast<QgsMapToolDigitizeFeature *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolDigitizeFeature;
else if ( dynamic_cast<QgsMapToolCapture *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolCapture;
else if ( dynamic_cast<QgsMapToolAdvancedDigitizing *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolAdvancedDigitizing;
else if ( dynamic_cast<QgsMapToolEdit *>( sipCpp ) != NULL )
sipType = sipType_QgsMapToolEdit;
else
sipType = NULL;
SIP_END

0 comments on commit a81b872

Please sign in to comment.