Skip to content

Commit

Permalink
add select/unselect buttons in project properties->OWS server->WFS la…
Browse files Browse the repository at this point in the history
…yers (fix #5865)
  • Loading branch information
brushtyler committed Oct 4, 2012
1 parent 5455d8a commit 89f1051
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/app/qgsprojectproperties.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -744,6 +744,24 @@ void QgsProjectProperties::on_pbnWMSSetUsedSRS_clicked()
mWMSList->addItems( crsList.values() ); mWMSList->addItems( crsList.values() );
} }


void QgsProjectProperties::on_pbnWFSLayersSelectAll_clicked()
{
for ( int i = 0; i < twWFSLayers->rowCount(); i++ )
{
QCheckBox *cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget( i, 1 ) );
cb->setChecked( true );
}
}

void QgsProjectProperties::on_pbnWFSLayersUnselectAll_clicked()
{
for ( int i = 0; i < twWFSLayers->rowCount(); i++ )
{
QCheckBox *cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget( i, 1 ) );
cb->setChecked( false );
}
}

void QgsProjectProperties::on_pbnAddScale_clicked() void QgsProjectProperties::on_pbnAddScale_clicked()
{ {
int myScale = QInputDialog::getInt( int myScale = QInputDialog::getInt(
Expand Down
6 changes: 6 additions & 0 deletions src/app/qgsprojectproperties.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ class QgsProjectProperties : public QDialog, private Ui::QgsProjectPropertiesBas
void on_pbnWMSRemoveSRS_clicked(); void on_pbnWMSRemoveSRS_clicked();
void on_pbnWMSSetUsedSRS_clicked(); void on_pbnWMSSetUsedSRS_clicked();


/*!
* Slots to select/unselect all the WFS layers
*/
void on_pbnWFSLayersSelectAll_clicked();
void on_pbnWFSLayersUnselectAll_clicked();

/*! /*!
* Slots for Styles * Slots for Styles
*/ */
Expand Down
20 changes: 17 additions & 3 deletions src/ui/qgsprojectpropertiesbase.ui
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -801,9 +801,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>-390</y>
<width>670</width> <width>670</width>
<height>926</height> <height>959</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
Expand Down Expand Up @@ -1105,7 +1105,7 @@
<string>WFS Capabilitities</string> <string>WFS Capabilitities</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_8"> <layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0"> <item row="0" column="0" colspan="2">
<widget class="QTableWidget" name="twWFSLayers"> <widget class="QTableWidget" name="twWFSLayers">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding"> <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
Expand All @@ -1125,6 +1125,20 @@
</column> </column>
</widget> </widget>
</item> </item>
<item row="1" column="1">
<widget class="QPushButton" name="pbnWFSLayersUnselectAll">
<property name="text">
<string>Unselect all</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pbnWFSLayersSelectAll">
<property name="text">
<string>Select all</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
Expand Down

0 comments on commit 89f1051

Please sign in to comment.