Skip to content
Permalink
Browse files

pyqgis: add conversion to subclasses for QgsAbstractVectorLayerLabeling

  • Loading branch information
wonder-sk committed Feb 3, 2018
1 parent 57d38cd commit 4b365a8f47d96b35f7609859e580388927ae0606
Showing with 20 additions and 0 deletions.
  1. +8 −0 python/core/qgsvectorlayerlabeling.sip.in
  2. +12 −0 src/core/qgsvectorlayerlabeling.h
@@ -21,6 +21,14 @@ Abstract base class - its implementations define different approaches to the lab

%TypeHeaderCode
#include "qgsvectorlayerlabeling.h"
%End
%ConvertToSubClassCode
if ( sipCpp->type() == "simple" )
sipType = sipType_QgsVectorLayerSimpleLabeling;
else if ( sipCpp->type() == "rule-based" )
sipType = sipType_QgsRuleBasedLabeling;
else
sipType = 0;
%End
public:
QgsAbstractVectorLayerLabeling();
@@ -39,6 +39,18 @@ class QgsVectorLayerLabelProvider;
*/
class CORE_EXPORT QgsAbstractVectorLayerLabeling
{

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( sipCpp->type() == "simple" )
sipType = sipType_QgsVectorLayerSimpleLabeling;
else if ( sipCpp->type() == "rule-based" )
sipType = sipType_QgsRuleBasedLabeling;
else
sipType = 0;
SIP_END
#endif

public:
//! Default constructor
QgsAbstractVectorLayerLabeling() = default;

0 comments on commit 4b365a8

Please sign in to comment.
You can’t perform that action at this time.