Skip to content
Permalink
Browse files

Add factory annotation and use clone for rule based renderer

  • Loading branch information
leyan committed Aug 25, 2014
1 parent 4c51956 commit 11d159cd85e8e69135b1dc03fb259690a5a8e618
@@ -149,7 +149,7 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2

//! convert the renderer to a rule based renderer with equivalent rules
//! @note added in 2.5
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer();
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer() /Factory/;

protected:
void rebuildHash();
@@ -175,7 +175,7 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2

//! convert the renderer to a rule based renderer with equivalent rules
//! @note added in 2.5
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer();
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer() /Factory/;



@@ -177,7 +177,7 @@ class QgsFeatureRendererV2

//! convert the renderer to a rule based renderer with equivalent rules, if possible
//! @note added in 2.5
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer();
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer() /Factory/;

protected:
QgsFeatureRendererV2( QString type );
@@ -233,7 +233,7 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2

//! convert the renderer to a rule based renderer with equivalent rules, if possible
//! @note added in 2.5
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer();
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer() /Factory/;

private:
QgsRuleBasedRendererV2( const QgsRuleBasedRendererV2 & );
@@ -68,7 +68,7 @@ class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2

//! convert the renderer to a rule based renderer with equivalent rules
//! @note added in 2.5
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer();
virtual QgsRuleBasedRendererV2* convertToRuleBasedRenderer() /Factory/;

private:
QgsSingleSymbolRendererV2( const QgsSingleSymbolRendererV2 & );
@@ -1046,5 +1046,5 @@ QgsSymbolV2List QgsRuleBasedRendererV2::symbolsForFeature( QgsFeature& feat )

QgsRuleBasedRendererV2* QgsRuleBasedRendererV2::convertToRuleBasedRenderer()
{
return this ;
return dynamic_cast<QgsRuleBasedRendererV2*>( this->clone() ) ;
}

0 comments on commit 11d159c

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