Skip to content
Permalink
Browse files
Possibility to add several wfs layers in one go
  • Loading branch information
mhugent committed Dec 6, 2011
1 parent e8a67fe commit c12b9ba838f39077e5a5d95dfae1361ba2a8880d
Showing with 17 additions and 12 deletions.
  1. +13 −11 src/providers/wfs/qgswfssourceselect.cpp
  2. +4 −1 src/ui/qgswfssourceselectbase.ui
@@ -262,11 +262,7 @@ void QgsWFSSourceSelect::addLayer()
return;
}

QString typeName = tItem->text( 1 );
QString crs = labelCoordRefSys->text();
QString filter = mFilterLineEdit->text();
QgsRectangle bBox;

#if 0
// TODO: resolve [MD]
//get current extent
@@ -277,13 +273,19 @@ void QgsWFSSourceSelect::addLayer()
}
#endif

//add a wfs layer to the map
QgsWFSConnection conn( cmbConnections->currentText() );
QString uri = conn.uriGetFeature( typeName, crs, filter, bBox );

emit addWfsLayer( uri, typeName );

accept();
QList<QTreeWidgetItem*> selectedItems = treeWidget->selectedItems();
QList<QTreeWidgetItem*>::const_iterator sIt = selectedItems.constBegin();
for ( ; sIt != selectedItems.constEnd(); ++sIt )
{
QString typeName = ( *sIt )->text( 1 );
QString crs = labelCoordRefSys->text();
QString filter = mFilterLineEdit->text();

//add a wfs layer to the map
QgsWFSConnection conn( cmbConnections->currentText() );
QString uri = conn.uriGetFeature( typeName, crs, filter, bBox );
emit addWfsLayer( uri, typeName );
}
}

void QgsWFSSourceSelect::changeCRS()
@@ -105,6 +105,9 @@
</item>
<item row="1" column="0">
<widget class="QTreeWidget" name="treeWidget">
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
@@ -203,7 +206,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::Close|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

0 comments on commit c12b9ba

Please sign in to comment.