Skip to content
Permalink
Browse files

Rule-based renderer: dump meaningful debugging info

  • Loading branch information
wonder-sk committed Jul 19, 2011
1 parent 8e08c53 commit 7d74fe04530953ea8f5f2d72598ee67d0f07eae0
@@ -62,7 +62,7 @@ void QgsRuleBasedRendererV2::Rule::initFilter()

QString QgsRuleBasedRendererV2::Rule::dump() const
{
return QString( "RULE %1 - scale [%2,%3] - filter %4 - symbol %5" )
return QString( "RULE %1 - scale [%2,%3] - filter %4 - symbol %5\n" )
.arg( mLabel ).arg( mScaleMinDenom ).arg( mScaleMaxDenom )
.arg( mFilterExp ).arg( mSymbol->dump() );

@@ -409,3 +409,13 @@ QList<QgsRuleBasedRendererV2::Rule> QgsRuleBasedRendererV2::refineRuleScales( Qg
rules.append( Rule( initialRule.symbol()->clone(), oldScale, maxDenom, initialRule.filterExpression(), initialRule.label(), initialRule.description() ) );
return rules;
}

QString QgsRuleBasedRendererV2::dump()
{
QString msg( "Rule-based renderer:\n" );
foreach( const Rule& rule, mRules )
{
msg += rule.dump();
}
return msg;
}
@@ -113,6 +113,9 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
//! @note: this method was added in version 1.5
virtual QgsLegendSymbolList legendSymbolItems();

//! for debugging
virtual QString dump();

/////

//! return the total number of rules

0 comments on commit 7d74fe0

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