Skip to content

Commit

Permalink
Revert "Remove SIP convert to subclass code for QgsRubberBand and Qgs…
Browse files Browse the repository at this point in the history
…VertexMarker"

This reverts commit 4b014e6.
  • Loading branch information
m-kuhn committed Nov 9, 2019
1 parent 6b82917 commit 7fd0e33
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
11 changes: 11 additions & 0 deletions python/gui/auto_generated/qgsrubberband.sip.in
Expand Up @@ -10,6 +10,11 @@



%ModuleHeaderCode
// For ConvertToSubClassCode.
#include <qgsrubberband.h>
%End

class QgsRubberBand : QObject, QgsMapCanvasItem
{
%Docstring
Expand All @@ -21,6 +26,12 @@ for tracking the mouse while drawing polylines or polygons.

%TypeHeaderCode
#include "qgsrubberband.h"
%End
%ConvertToSubClassCode
if ( dynamic_cast<QgsRubberBand *>( sipCpp ) )
sipType = sipType_QgsRubberBand;
else
sipType = nullptr;
%End
public:

Expand Down
11 changes: 11 additions & 0 deletions python/gui/auto_generated/qgsvertexmarker.sip.in
Expand Up @@ -9,6 +9,11 @@



%ModuleHeaderCode
// For ConvertToSubClassCode.
#include <qgsvertexmarker.h>
%End

class QgsVertexMarker : QgsMapCanvasItem
{
%Docstring
Expand All @@ -17,6 +22,12 @@ A class for marking vertices of features using e.g. circles or 'x'.

%TypeHeaderCode
#include "qgsvertexmarker.h"
%End
%ConvertToSubClassCode
if ( dynamic_cast<QgsVertexMarker *>( sipCpp ) )
sipType = sipType_QgsVertexMarker;
else
sipType = nullptr;
%End
public:

Expand Down
15 changes: 15 additions & 0 deletions src/gui/qgsrubberband.h
Expand Up @@ -31,6 +31,13 @@
class QgsVectorLayer;
class QPaintEvent;

#ifdef SIP_RUN
% ModuleHeaderCode
// For ConvertToSubClassCode.
#include <qgsrubberband.h>
% End
#endif

/**
* \ingroup gui
* A class for drawing transient features (e.g. digitizing lines) on the map.
Expand All @@ -42,6 +49,14 @@ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
{
Q_OBJECT

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( dynamic_cast<QgsRubberBand *>( sipCpp ) )
sipType = sipType_QgsRubberBand;
else
sipType = nullptr;
SIP_END
#endif
public:

Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor )
Expand Down
15 changes: 15 additions & 0 deletions src/gui/qgsvertexmarker.h
Expand Up @@ -22,13 +22,28 @@

class QPainter;

#ifdef SIP_RUN
% ModuleHeaderCode
// For ConvertToSubClassCode.
#include <qgsvertexmarker.h>
% End
#endif

/**
* \ingroup gui
* A class for marking vertices of features using e.g. circles or 'x'.
*/
class GUI_EXPORT QgsVertexMarker : public QgsMapCanvasItem
{

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( dynamic_cast<QgsVertexMarker *>( sipCpp ) )
sipType = sipType_QgsVertexMarker;
else
sipType = nullptr;
SIP_END
#endif
public:

//! Icons
Expand Down

0 comments on commit 7fd0e33

Please sign in to comment.