Skip to content
Permalink
Browse files

sipClass_Klass is deprecated for a long time: replace with sipType_Klass

  • Loading branch information
m-kuhn committed Oct 20, 2015
1 parent 016f497 commit 56ccb2b8587e17c6851743188b786854043e3054
@@ -19,9 +19,9 @@ class QgsArcProperter

%ConvertToSubClassCode
if ( dynamic_cast< QgsDistanceArcProperter* > ( sipCpp ) != NULL )
sipClass = sipClass_QgsDistanceArcProperter;
sipType = sipType_QgsDistanceArcProperter;
else
sipClass = NULL;
sipType = NULL;
%End

public:
@@ -15,9 +15,9 @@ class QgsGraphBuilderInterface

%ConvertToSubClassCode
if ( dynamic_cast< QgsGraphBuilder* > ( sipCpp ) != NULL )
sipClass = sipClass_QgsGraphBuilder;
sipType = sipType_QgsGraphBuilder;
else
sipClass = NULL;
sipType = NULL;
%End

public:
@@ -15,9 +15,9 @@ class QgsGraphDirector : QObject

%ConvertToSubClassCode
if ( dynamic_cast< QgsLineVectorLayerDirector* > ( sipCpp ) != NULL )
sipClass = sipClass_QgsLineVectorLayerDirector;
sipType = sipType_QgsLineVectorLayerDirector;
else
sipClass = NULL;
sipType = NULL;
%End


@@ -26,63 +26,63 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
switch (sipCpp->type())
{
case QgsComposerItem::ComposerItem:
sipClass = sipClass_QgsComposerItem;
sipType = sipType_QgsComposerItem;
*sipCppRet = static_cast<QgsComposerItem*>(sipCpp);
break;
case QgsComposerItem::ComposerArrow:
sipClass = sipClass_QgsComposerArrow;
sipType = sipType_QgsComposerArrow;
*sipCppRet = static_cast<QgsComposerArrow*>(sipCpp);
break;
case QgsComposerItem::ComposerItemGroup:
sipClass = sipClass_QgsComposerItemGroup;
sipType = sipType_QgsComposerItemGroup;
*sipCppRet = static_cast<QgsComposerItemGroup*>(sipCpp);
break;
case QgsComposerItem::ComposerLabel:
sipClass = sipClass_QgsComposerLabel;
sipType = sipType_QgsComposerLabel;
*sipCppRet = static_cast<QgsComposerLabel*>(sipCpp);
break;
case QgsComposerItem::ComposerLegend:
sipClass = sipClass_QgsComposerLegend;
sipType = sipType_QgsComposerLegend;
*sipCppRet = static_cast<QgsComposerLegend*>(sipCpp);
break;
case QgsComposerItem::ComposerMap:
sipClass = sipClass_QgsComposerMap;
sipType = sipType_QgsComposerMap;
*sipCppRet = static_cast<QgsComposerMap*>(sipCpp);
break;
case QgsComposerItem::ComposerPaper:
sipClass = sipClass_QgsPaperItem;
sipType = sipType_QgsPaperItem;
*sipCppRet = static_cast<QgsPaperItem*>(sipCpp);
break;
case QgsComposerItem::ComposerPicture:
sipClass = sipClass_QgsComposerPicture;
sipType = sipType_QgsComposerPicture;
*sipCppRet = static_cast<QgsComposerPicture*>(sipCpp);
break;
case QgsComposerItem::ComposerScaleBar:
sipClass = sipClass_QgsComposerScaleBar;
sipType = sipType_QgsComposerScaleBar;
*sipCppRet = static_cast<QgsComposerScaleBar*>(sipCpp);
break;
case QgsComposerItem::ComposerShape:
sipClass = sipClass_QgsComposerShape;
sipType = sipType_QgsComposerShape;
*sipCppRet = static_cast<QgsComposerShape*>(sipCpp);
break;
case QgsComposerItem::ComposerTable:
sipClass = sipClass_QgsComposerTable;
sipType = sipType_QgsComposerTable;
*sipCppRet = static_cast<QgsComposerTable*>(sipCpp);
break;
case QgsComposerItem::ComposerAttributeTable:
sipClass = sipClass_QgsComposerAttributeTable;
sipType = sipType_QgsComposerAttributeTable;
*sipCppRet = static_cast<QgsComposerAttributeTable*>(sipCpp);
break;
case QgsComposerItem::ComposerTextTable:
sipClass = sipClass_QgsComposerTextTable;
sipType = sipType_QgsComposerTextTable;
*sipCppRet = static_cast<QgsComposerTextTable*>(sipCpp);
break;
case QgsComposerItem::ComposerFrame:
sipClass = sipClass_QgsComposerFrame;
sipType = sipType_QgsComposerFrame;
*sipCppRet = static_cast<QgsComposerFrame*>(sipCpp);
break;
default:
sipClass = 0;
sipType = 0;
}
%End

@@ -20,15 +20,15 @@ class QgsComposerMultiFrame: QgsComposerObject

%ConvertToSubClassCode
if (dynamic_cast<QgsComposerHtml*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerHtml;
sipType = sipType_QgsComposerHtml;
else if (dynamic_cast<QgsComposerAttributeTableV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerAttributeTableV2;
sipType = sipType_QgsComposerAttributeTableV2;
else if (dynamic_cast<QgsComposerTableV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerTableV2;
sipType = sipType_QgsComposerTableV2;
else if (dynamic_cast<QgsComposerMultiFrame*>(sipCpp) != NULL)
sipClass = sipClass_QgsComposerMultiFrame;
sipType = sipType_QgsComposerMultiFrame;
else
sipClass = NULL;
sipType = NULL;
%End

public:
@@ -30,39 +30,39 @@ class QgsPaintEffect
%ConvertToSubClassCode
if (sipCpp->type() == "drawSource" && dynamic_cast<QgsDrawSourceEffect*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsDrawSourceEffect;
sipType = sipType_QgsDrawSourceEffect;
}
else if (sipCpp->type() == "effectStack" && dynamic_cast<QgsEffectStack*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsEffectStack;
sipType = sipType_QgsEffectStack;
}
else if (sipCpp->type() == "blur" && dynamic_cast<QgsBlurEffect*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsBlurEffect;
sipType = sipType_QgsBlurEffect;
}
else if (sipCpp->type() == "dropShadow" && dynamic_cast<QgsDropShadowEffect*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsDropShadowEffect;
sipType = sipType_QgsDropShadowEffect;
}
else if (sipCpp->type() == "outerGlow" && dynamic_cast<QgsOuterGlowEffect*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsOuterGlowEffect;
sipType = sipType_QgsOuterGlowEffect;
}
else if (sipCpp->type() == "innerGlow" && dynamic_cast<QgsInnerGlowEffect*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsInnerGlowEffect;
sipType = sipType_QgsInnerGlowEffect;
}
else if (sipCpp->type() == "transform" && dynamic_cast<QgsTransformEffect*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsTransformEffect;
sipType = sipType_QgsTransformEffect;
}
else if (sipCpp->type() == "color" && dynamic_cast<QgsColorEffect*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsColorEffect;
sipType = sipType_QgsColorEffect;
}
else
{
sipClass = 0;
sipType = 0;
}
%End

@@ -36,31 +36,31 @@ class QgsAbstractGeometryV2

%ConvertToSubClassCode
if (dynamic_cast<QgsPointV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsPointV2;
sipType = sipType_QgsPointV2;
else if (dynamic_cast<QgsLineStringV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsLineStringV2;
sipType = sipType_QgsLineStringV2;
else if (dynamic_cast<QgsCircularStringV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsCircularStringV2;
sipType = sipType_QgsCircularStringV2;
else if (dynamic_cast<QgsCompoundCurveV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsCompoundCurveV2;
sipType = sipType_QgsCompoundCurveV2;
else if (dynamic_cast<QgsPolygonV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsPolygonV2;
sipType = sipType_QgsPolygonV2;
else if (dynamic_cast<QgsCurvePolygonV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsCurvePolygonV2;
sipType = sipType_QgsCurvePolygonV2;
else if (dynamic_cast<QgsMultiPointV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsMultiPointV2;
sipType = sipType_QgsMultiPointV2;
else if (dynamic_cast<QgsMultiLineStringV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsMultiLineStringV2;
sipType = sipType_QgsMultiLineStringV2;
else if (dynamic_cast<QgsMultiPolygonV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsMultiPolygonV2;
sipType = sipType_QgsMultiPolygonV2;
else if (dynamic_cast<QgsMultiSurfaceV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsMultiSurfaceV2;
sipType = sipType_QgsMultiSurfaceV2;
else if (dynamic_cast<QgsMultiCurveV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsMultiCurveV2;
sipType = sipType_QgsMultiCurveV2;
else if (dynamic_cast<QgsGeometryCollectionV2*>(sipCpp) != NULL )
sipClass = sipClass_QgsGeometryCollectionV2;
sipType = sipType_QgsGeometryCollectionV2;
else
sipClass = 0;
sipType = 0;
%End

public:
@@ -49,11 +49,11 @@ class QgsGPSConnection: QObject

%ConvertToSubClassCode
if (sipCpp->inherits("QgsGpsdConnection"))
sipClass = sipClass_QgsGpsdConnection;
sipType = sipType_QgsGpsdConnection;
else if (sipCpp->inherits("QgsNMEAConnection"))
sipClass = sipClass_QgsNMEAConnection;
sipType = sipType_QgsNMEAConnection;
else
sipClass = NULL;
sipType = NULL;
%End

public:
@@ -9,15 +9,15 @@ class QgsDataProvider : QObject
%ConvertToSubClassCode
if (sipCpp->inherits("QgsVectorDataProvider"))
{
sipClass = sipClass_QgsVectorDataProvider;
sipType = sipType_QgsVectorDataProvider;
}
else if (sipCpp->inherits("QgsRasterDataProvider"))
{
sipClass = sipClass_QgsRasterDataProvider;
sipType = sipType_QgsRasterDataProvider;
}
else
{
sipClass = 0;
sipType = 0;
}
%End

@@ -363,14 +363,14 @@ class QgsExpression
%ConvertToSubClassCode
switch (sipCpp->nodeType())
{
case QgsExpression::ntUnaryOperator: sipClass = sipClass_QgsExpression_NodeUnaryOperator; break;
case QgsExpression::ntBinaryOperator: sipClass = sipClass_QgsExpression_NodeBinaryOperator; break;
case QgsExpression::ntInOperator: sipClass = sipClass_QgsExpression_NodeInOperator; break;
case QgsExpression::ntFunction: sipClass = sipClass_QgsExpression_NodeFunction; break;
case QgsExpression::ntLiteral: sipClass = sipClass_QgsExpression_NodeLiteral; break;
case QgsExpression::ntColumnRef: sipClass = sipClass_QgsExpression_NodeColumnRef; break;
case QgsExpression::ntCondition: sipClass = sipClass_QgsExpression_NodeCondition; break;
default: sipClass = 0; break;
case QgsExpression::ntUnaryOperator: sipType = sipType_QgsExpression_NodeUnaryOperator; break;
case QgsExpression::ntBinaryOperator: sipType = sipType_QgsExpression_NodeBinaryOperator; break;
case QgsExpression::ntInOperator: sipType = sipType_QgsExpression_NodeInOperator; break;
case QgsExpression::ntFunction: sipType = sipType_QgsExpression_NodeFunction; break;
case QgsExpression::ntLiteral: sipType = sipType_QgsExpression_NodeLiteral; break;
case QgsExpression::ntColumnRef: sipType = sipType_QgsExpression_NodeColumnRef; break;
case QgsExpression::ntCondition: sipType = sipType_QgsExpression_NodeCondition; break;
default: sipType = 0; break;
}
%End

@@ -110,7 +110,7 @@ class QgsFeature
%TypeHeaderCode
#include <qgsfeature.h>
#if (SIP_VERSION >= 0x040900 && SIP_VERSION < 0x040c01)
#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#define sipType_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
#endif
%End

@@ -12,24 +12,24 @@ class QgsMapLayer : QObject
%ConvertToSubClassCode
if (sipCpp->inherits("QgsMapLayer"))
{
sipClass = sipClass_QgsMapLayer;
sipType = sipType_QgsMapLayer;
QgsMapLayer* layer = qobject_cast<QgsMapLayer*>(sipCpp);
if (layer->type() == QgsMapLayer::VectorLayer)
{
sipClass = sipClass_QgsVectorLayer;
sipType = sipType_QgsVectorLayer;
}
else if (layer->type() == QgsMapLayer::RasterLayer)
{
sipClass = sipClass_QgsRasterLayer;
sipType = sipType_QgsRasterLayer;
}
else if (layer->type() == QgsMapLayer::PluginLayer)
{
sipClass = sipClass_QgsPluginLayer;
sipType = sipType_QgsPluginLayer;
}
}
else
{
sipClass = 0;
sipType = 0;
}

%End
@@ -12,14 +12,14 @@ class QgsAttributeEditorElement : QObject
%ConvertToSubClassCode
QgsAttributeEditorElement* e = qobject_cast<QgsAttributeEditorElement*>( sipCpp );

sipClass = 0;
sipType = 0;
if ( e )
{
switch ( e->type() )
{
case QgsAttributeEditorElement::AeTypeContainer: sipClass = sipClass_QgsAttributeEditorContainer; break;
case QgsAttributeEditorElement::AeTypeField: sipClass = sipClass_QgsAttributeEditorField; break;
case QgsAttributeEditorElement::AeTypeRelation: sipClass = sipClass_QgsAttributeEditorRelation; break;
case QgsAttributeEditorElement::AeTypeContainer: sipType = sipType_QgsAttributeEditorContainer; break;
case QgsAttributeEditorElement::AeTypeField: sipType = sipType_QgsAttributeEditorField; break;
case QgsAttributeEditorElement::AeTypeRelation: sipType = sipType_QgsAttributeEditorRelation; break;
}
}
%End
@@ -27,39 +27,39 @@ class QgsRasterInterface

%ConvertToSubClassCode
if ( dynamic_cast<QgsBrightnessContrastFilter*>(sipCpp))
sipClass = sipClass_QgsBrightnessContrastFilter;
sipType = sipType_QgsBrightnessContrastFilter;
else if (dynamic_cast<QgsHueSaturationFilter*>(sipCpp))
sipClass = sipClass_QgsHueSaturationFilter;
sipType = sipType_QgsHueSaturationFilter;
else if (dynamic_cast<QgsRasterDataProvider*>(sipCpp))
{
sipClass = sipClass_QgsRasterDataProvider;
sipType = sipType_QgsRasterDataProvider;
// use static cast because QgsRasterDataProvider has multiple inheritance
// and we would end up with bad pointer otherwise!
*sipCppRet = static_cast<QgsRasterDataProvider*>(sipCpp);
}
else if (dynamic_cast<QgsRasterNuller*>(sipCpp))
sipClass = sipClass_QgsRasterNuller;
sipType = sipType_QgsRasterNuller;
else if (dynamic_cast<QgsRasterProjector*>(sipCpp))
sipClass = sipClass_QgsRasterProjector;
sipType = sipType_QgsRasterProjector;
else if (dynamic_cast<QgsRasterRenderer*>(sipCpp))
{
if ( dynamic_cast<QgsMultiBandColorRenderer*>(sipCpp))
sipClass = sipClass_QgsMultiBandColorRenderer;
sipType = sipType_QgsMultiBandColorRenderer;
else if (dynamic_cast<QgsPalettedRasterRenderer*>(sipCpp))
sipClass = sipClass_QgsPalettedRasterRenderer;
sipType = sipType_QgsPalettedRasterRenderer;
else if (dynamic_cast<QgsSingleBandColorDataRenderer*>(sipCpp))
sipClass = sipClass_QgsSingleBandColorDataRenderer;
sipType = sipType_QgsSingleBandColorDataRenderer;
else if (dynamic_cast<QgsSingleBandGrayRenderer*>(sipCpp))
sipClass = sipClass_QgsSingleBandGrayRenderer;
sipType = sipType_QgsSingleBandGrayRenderer;
else if (dynamic_cast<QgsSingleBandPseudoColorRenderer*>(sipCpp))
sipClass = sipClass_QgsSingleBandPseudoColorRenderer;
sipType = sipType_QgsSingleBandPseudoColorRenderer;
else
sipClass = sipClass_QgsRasterRenderer;
sipType = sipType_QgsRasterRenderer;
}
else if (dynamic_cast<QgsRasterResampleFilter*>(sipCpp))
sipClass = sipClass_QgsRasterResampleFilter;
sipType = sipType_QgsRasterResampleFilter;
else
sipClass = 0;
sipType = 0;
%End

public:

0 comments on commit 56ccb2b

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