Skip to content
Permalink
Browse files
Added query builder to rule properties dialog (rule-based renderer). …
…Patch from #3303 - contributed by Nathan Woodrow

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14878 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 9, 2010
1 parent 9ef391f commit 40e73e7ba80e37c6b75858088ce6761af062bff5
Showing with 31 additions and 2 deletions.
  1. +1 −0 CONTRIBUTORS
  2. +11 −0 src/gui/symbology-ng/qgsrulebasedrendererv2widget.cpp
  3. +1 −0 src/gui/symbology-ng/qgsrulebasedrendererv2widget.h
  4. +18 −2 src/ui/qgsrendererrulepropsdialogbase.ui
@@ -39,6 +39,7 @@ Mathias Walker
Matt Amos
Maurizio Napolitano
Milena Nowotarska
Nathan Woodrow
Nikos Alexandris
Paul Ramsey
Richard Duivenvoorde
@@ -176,6 +176,7 @@ void QgsRuleBasedRendererV2Widget::removeRule()
#include "qgscategorizedsymbolrendererv2widget.h"
#include "qgsgraduatedsymbolrendererv2.h"
#include "qgsgraduatedsymbolrendererv2widget.h"
#include "qgssearchquerybuilder.h"
#include <QDialogButtonBox>
#include <QInputDialog>

@@ -315,9 +316,19 @@ QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( const QgsRuleBasedRender
l->addWidget( symbolSel );
groupSymbol->setLayout( l );

connect( btnExpressionBuilder, SIGNAL( clicked() ), this, SLOT( buildExpreesion() ) );
connect( btnTestFilter, SIGNAL( clicked() ), this, SLOT( testFilter() ) );
}

void QgsRendererRulePropsDialog::buildExpreesion()
{
QgsSearchQueryBuilder dlg( mLayer, this );
dlg.setSearchString( editFilter->text() );

if ( dlg.exec() )
editFilter->setText( dlg.searchString() );
}

void QgsRendererRulePropsDialog::testFilter()
{
QgsSearchString filterParsed;
@@ -110,6 +110,7 @@ class GUI_EXPORT QgsRendererRulePropsDialog : public QDialog, private Ui::QgsRen

public slots:
void testFilter();
void buildExpreesion();

protected:
QgsRuleBasedRendererV2::Rule mRule;
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>547</width>
<height>300</height>
<width>545</width>
<height>298</height>
</rect>
</property>
<property name="windowTitle">
@@ -16,6 +16,9 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
@@ -26,6 +29,19 @@
<item>
<widget class="QLineEdit" name="editFilter"/>
</item>
<item>
<widget class="QPushButton" name="btnExpressionBuilder">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnTestFilter">
<property name="text">

0 comments on commit 40e73e7

Please sign in to comment.