Skip to content
Permalink
Browse files

Add gui for WMS layer restriction

  • Loading branch information
Marco Hugentobler
Marco Hugentobler committed Oct 16, 2012
1 parent 3954555 commit d96f0680451bf85aad1ee190e003091998998dd7
Showing with 145 additions and 64 deletions.
  1. +14 −0 src/app/qgsprojectproperties.cpp
  2. +2 −0 src/app/qgsprojectproperties.h
  3. +129 −64 src/ui/qgsprojectpropertiesbase.ui
@@ -802,6 +802,20 @@ void QgsProjectProperties::on_mRemoveWMSComposerButton_clicked()
}
}

void QgsProjectProperties::on_mAddLayerRestrictionButton_clicked()
{

}

void QgsProjectProperties::on_mRemoveLayerRestrictionButton_clicked()
{
QListWidgetItem* currentItem = mLayerRestrictionsListWidget->currentItem();
if ( currentItem )
{
delete mLayerRestrictionsListWidget->takeItem( mLayerRestrictionsListWidget->row( currentItem ) );
}
}

void QgsProjectProperties::on_pbnWFSLayersSelectAll_clicked()
{
for ( int i = 0; i < twWFSLayers->rowCount(); i++ )
@@ -114,6 +114,8 @@ class QgsProjectProperties : public QDialog, private Ui::QgsProjectPropertiesBas
void on_pbnWMSSetUsedSRS_clicked();
void on_mAddWMSComposerButton_clicked();
void on_mRemoveWMSComposerButton_clicked();
void on_mAddLayerRestrictionButton_clicked();
void on_mRemoveLayerRestrictionButton_clicked();

/*!
* Slots to select/unselect all the WFS layers
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>637</width>
<height>665</height>
<width>645</width>
<height>504</height>
</rect>
</property>
<property name="windowTitle">
@@ -20,16 +20,6 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
@@ -60,8 +50,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>607</width>
<height>577</height>
<width>600</width>
<height>489</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_13">
@@ -794,19 +784,25 @@
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea">
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>646</width>
<height>839</height>
<y>-425</y>
<width>600</width>
<height>984</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout_15">
<item row="0" column="0">
<widget class="QGroupBox" name="grpOWSServiceCapabilities">
<property name="title">
@@ -1016,7 +1012,46 @@
</layout>
</widget>
</item>
<item row="0" column="1">
<item row="0" column="1" colspan="2">
<widget class="QGroupBox" name="grpWMSList">
<property name="title">
<string>Coordinate Systems Restrictions</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0" colspan="3">
<widget class="QListWidget" name="mWMSList"/>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pbnWMSAddSRS">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pbnWMSRemoveSRS">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pbnWMSSetUsedSRS">
<property name="text">
<string>Used</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="mWMSComposerGroupBox">
<property name="title">
<string>Composer restrictions</string>
@@ -1069,90 +1104,104 @@
</layout>
</widget>
</item>
<item row="0" column="2">
<widget class="QGroupBox" name="grpWMSList">
<item row="1" column="2">
<widget class="QGroupBox" name="mLayerRestrictionsGroupBox">
<property name="title">
<string>Coordinate Systems Restrictions</string>
<string>Layer restrictions</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="3">
<widget class="QListWidget" name="mWMSList"/>
<widget class="QListWidget" name="mLayerRestrictionsListWidget"/>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pbnWMSAddSRS">
<widget class="QToolButton" name="mAddLayerRestrictionButton">
<property name="text">
<string>Add</string>
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pbnWMSRemoveSRS">
<property name="text">
<string>Remove</string>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/symbologyAdd.png</normaloff>:/images/themes/default/symbologyAdd.png</iconset>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pbnWMSSetUsedSRS">
<widget class="QToolButton" name="mRemoveLayerRestrictionButton">
<property name="text">
<string>Used</string>
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/symbologyRemove.png</normaloff>:/images/themes/default/symbologyRemove.png</iconset>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>244</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QCheckBox" name="mAddWktGeometryCheckBox">
<property name="text">
<string>Add WKT geometry to feature info response</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="mWMSUrlLabel">
<property name="text">
<string>Advertised WMS url</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mMaxWidthLabel">
<property name="text">
<string>Maximum width</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mMaxWidthLineEdit"/>
</item>
<item>
<widget class="QLabel" name="mMaxHeightLabel">
<property name="text">
<string>Maximum height</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mMaxHeightLineEdit"/>
</item>
</layout>
</item>
<item row="3" column="0" colspan="3">
<widget class="QLineEdit" name="mWMSUrlLineEdit"/>
</item>
</layout>
</widget>
</item>
<item row="7" column="0">
<item row="2" column="0">
<widget class="QLineEdit" name="mWMSUrlLineEdit"/>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mMaxWidthLabel">
<property name="text">
<string>Maximum width</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mMaxWidthLineEdit"/>
</item>
<item>
<widget class="QLabel" name="mMaxHeightLabel">
<property name="text">
<string>Maximum height</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mMaxHeightLineEdit"/>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QGroupBox" name="grpWFSCapabilities">
<property name="title">
<string>WFS Capabilitities</string>
@@ -1196,6 +1245,12 @@
</widget>
</item>
</layout>
<zorder>grpOWSServiceCapabilities</zorder>
<zorder>grpWMSCapabilities</zorder>
<zorder>grpWFSCapabilities</zorder>
<zorder></zorder>
<zorder>mWMSUrlLineEdit</zorder>
<zorder>buttonBox</zorder>
</widget>
</widget>
</item>
@@ -1235,6 +1290,16 @@
</widget>
</widget>
</item>
<item row="2" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>

0 comments on commit d96f068

Please sign in to comment.
You can’t perform that action at this time.