Skip to content

Commit 626c8dd

Browse files
committed
Merge remote branch 'pb/master'
2 parents dfeb19b + 07da493 commit 626c8dd

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

src/plugins/wfs/qgswfssourceselect.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,12 @@ void QgsWFSSourceSelect::addLayer()
387387
crsString.prepend( "&SRSNAME=" );
388388
}
389389

390+
QString filterString;
391+
if ( !mFilterLineEdit->text().isEmpty() )
392+
{
393+
filterString = ( "&FILTER=" + mFilterLineEdit->text() );
394+
}
395+
390396
//add a wfs layer to the map
391397
if ( mIface )
392398
{
@@ -402,7 +408,7 @@ void QgsWFSSourceSelect::addLayer()
402408
.arg( currentExtent.xMaximum(), 0, 'f' )
403409
.arg( currentExtent.yMaximum(), 0, 'f' );
404410
}
405-
mIface->addVectorLayer( uri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName + crsString + bBoxString, typeName, "WFS" );
411+
mIface->addVectorLayer( uri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName + crsString + bBoxString + filterString, typeName, "WFS" );
406412
}
407413
accept();
408414
}

src/plugins/wfs/qgswfssourceselectbase.ui

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>590</width>
10-
<height>503</height>
9+
<width>552</width>
10+
<height>439</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -174,13 +174,27 @@
174174
</widget>
175175
</item>
176176
<item row="3" column="0">
177+
<layout class="QHBoxLayout" name="horizontalLayout_2">
178+
<item>
179+
<widget class="QLabel" name="mFilterStringLabel">
180+
<property name="text">
181+
<string>Filter</string>
182+
</property>
183+
</widget>
184+
</item>
185+
<item>
186+
<widget class="QLineEdit" name="mFilterLineEdit"/>
187+
</item>
188+
</layout>
189+
</item>
190+
<item row="4" column="0">
177191
<widget class="QCheckBox" name="mBboxCheckBox">
178192
<property name="text">
179193
<string>Only request features overlapping the current view extent</string>
180194
</property>
181195
</widget>
182196
</item>
183-
<item row="4" column="0">
197+
<item row="5" column="0">
184198
<widget class="QDialogButtonBox" name="buttonBox">
185199
<property name="orientation">
186200
<enum>Qt::Horizontal</enum>

0 commit comments

Comments
 (0)