Skip to content

Commit

Permalink
Merge remote branch 'pb/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
stopa85milk committed May 12, 2011
2 parents dfeb19b + 07da493 commit 626c8dd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/plugins/wfs/qgswfssourceselect.cpp
Expand Up @@ -387,6 +387,12 @@ void QgsWFSSourceSelect::addLayer()
crsString.prepend( "&SRSNAME=" );
}

QString filterString;
if ( !mFilterLineEdit->text().isEmpty() )
{
filterString = ( "&FILTER=" + mFilterLineEdit->text() );
}

//add a wfs layer to the map
if ( mIface )
{
Expand All @@ -402,7 +408,7 @@ void QgsWFSSourceSelect::addLayer()
.arg( currentExtent.xMaximum(), 0, 'f' )
.arg( currentExtent.yMaximum(), 0, 'f' );
}
mIface->addVectorLayer( uri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName + crsString + bBoxString, typeName, "WFS" );
mIface->addVectorLayer( uri + "SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=" + typeName + crsString + bBoxString + filterString, typeName, "WFS" );
}
accept();
}
Expand Down
20 changes: 17 additions & 3 deletions src/plugins/wfs/qgswfssourceselectbase.ui
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>590</width>
<height>503</height>
<width>552</width>
<height>439</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -174,13 +174,27 @@
</widget>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mFilterStringLabel">
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mFilterLineEdit"/>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="mBboxCheckBox">
<property name="text">
<string>Only request features overlapping the current view extent</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand Down

0 comments on commit 626c8dd

Please sign in to comment.