mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
pyqgis: add conversion to subclasses for QgsAbstractVectorLayerLabeling
This commit is contained in:
parent
57d38cd0d5
commit
4b365a8f47
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user