Skip to content

Commit

Permalink
Add ConvertToSubClass code to vertexmarker
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and 3nids committed Oct 9, 2017
1 parent 5107f99 commit b2620ae
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/gui/qgsvertexmarker.sip
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@



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

class QgsVertexMarker : QgsMapCanvasItem
{
%Docstring
Expand All @@ -17,6 +22,13 @@ class QgsVertexMarker : QgsMapCanvasItem

%TypeHeaderCode
#include "qgsvertexmarker.h"

%ConvertToSubClassCode
if ( dynamic_cast<QgsVertexMarker *>( sipCpp ) )
sipType = sipType_QgsVertexMarker;
else
sipType = nullptr;
%End
%End
public:

Expand Down
15 changes: 15 additions & 0 deletions src/gui/qgsvertexmarker.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,27 @@

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 b2620ae

Please sign in to comment.