Skip to content

Commit

Permalink
Allow changing rendering order in rule-based renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Nov 30, 2011
1 parent e553416 commit 45caf4f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ QgsRuleBasedRendererV2Widget::QgsRuleBasedRendererV2Widget( QgsVectorLayer* laye
connect( radGroupFilter, SIGNAL( clicked() ), this, SLOT( setGrouping() ) );
connect( radGroupScale, SIGNAL( clicked() ), this, SLOT( setGrouping() ) );

connect( btnRenderingOrder, SIGNAL( clicked() ), this, SLOT( setRenderingOrder() ) );

treeRules->populateRules();
}

Expand Down Expand Up @@ -391,6 +393,16 @@ void QgsRuleBasedRendererV2Widget::refreshSymbolView()
}
}

#include "qgssymbollevelsv2dialog.h"

void QgsRuleBasedRendererV2Widget::setRenderingOrder()
{
QgsSymbolV2List symbols = mRenderer->symbols();

QgsSymbolLevelsV2Dialog dlg( symbols, true, this );
dlg.exec();
}


///////////

Expand Down
2 changes: 2 additions & 0 deletions src/gui/symbology-ng/qgsrulebasedrendererv2widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class GUI_EXPORT QgsRuleBasedRendererV2Widget : public QgsRendererV2Widget, priv
void refineRuleCategories();
void refineRuleRanges();

void setRenderingOrder();

protected:

void refineRule( int type );
Expand Down
7 changes: 7 additions & 0 deletions src/ui/qgsrulebasedrendererv2widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnRenderingOrder">
<property name="text">
<string>Rendering order...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down

0 comments on commit 45caf4f

Please sign in to comment.