Skip to content
Permalink
Browse files

[FEATURE] Made wms search server user configurable

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12740 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Jan 11, 2010
1 parent 94800ac commit 59d5824d937911d4e6bbac834113869d36237887
Showing with 170 additions and 144 deletions.
  1. +7 −0 src/app/qgsoptions.cpp
  2. +3 −1 src/app/qgswmssourceselect.cpp
  3. +160 −143 src/ui/qgsoptionsbase.ui
@@ -114,6 +114,10 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
}
}

//wms search server
leWmsSearch->setText( settings.value( "/qgis/WMSSearchUrl", "http://geopole.org/wms/search?search=%1&type=rss" ).toString() );


// set the current theme
cmbTheme->setItemText( cmbTheme->currentIndex(), settings.value( "/Themes" ).toString() );

@@ -438,6 +442,9 @@ void QgsOptions::saveOptions()
}
settings.setValue( "proxy/proxyExcludedUrls", proxyExcludeString );

//wms search url
settings.setValue( "/qgis/WMSSearchUrl", leWmsSearch->text() );

//general settings
settings.setValue( "/Map/identifyMode", cmbIdentifyMode->itemData( cmbIdentifyMode->currentIndex() ).toInt() );
settings.setValue( "/Map/identifyAutoFeatureForm", cbxAutoFeatureForm->isChecked() );
@@ -821,7 +821,9 @@ bool QgsWMSSourceSelect::retrieveSearchResults( const QString& searchTerm, QByte
}
// Get username/password from settings for protected WMS

QUrl url( QString( "http://geopole.org/wms/search?search=%1&type=rss" ).arg( searchTerm ) );
QString mySearchUrl = settings.value("/qgis/WMSSearchUrl", "http://geopole.org/wms/search?search=%1&type=rss").toString();
QUrl url( mySearchUrl.arg( searchTerm ) );
QgsDebugMsg( url.toString() );
QgsHttpTransaction http( url.toEncoded(),
proxyHost, proxyPort, proxyUser, proxyPassword, proxyType );

@@ -20,10 +20,152 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QListWidget" name="listWidget">
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>false</bool>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="flow">
<enum>QListView::TopToBottom</enum>
</property>
<property name="isWrapping" stdset="0">
<bool>false</bool>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>9</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="uniformItemSizes">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>General</string>
</property>
<property name="textAlignment">
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/general.png</normaloff>:/images/themes/default/propertyicons/general.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Rendering &amp; SVG</string>
</property>
<property name="textAlignment">
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/rendering.png</normaloff>:/images/themes/default/propertyicons/rendering.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Map tools</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/map_tools.png</normaloff>:/images/themes/default/propertyicons/map_tools.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Overlay</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/overlay.png</normaloff>:/images/themes/default/propertyicons/overlay.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Digitising</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/digitising.png</normaloff>:/images/themes/default/propertyicons/digitising.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>CRS</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/CRS.png</normaloff>:/images/themes/default/propertyicons/CRS.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Locale</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/locale.png</normaloff>:/images/themes/default/propertyicons/locale.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Network &amp; Proxy</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</iconset>
</property>
</item>
</widget>
</item>
<item row="0" column="1">
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>0</number>
<number>7</number>
</property>
<widget class="QWidget" name="stackedWidgetPage1">
<layout class="QGridLayout">
@@ -1255,6 +1397,23 @@
</layout>
</widget>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>WMS search address</string>
</property>
<property name="buddy">
<cstring>leWmsSearch</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leWmsSearch"/>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
@@ -1269,148 +1428,6 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QListWidget" name="listWidget">
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>false</bool>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="flow">
<enum>QListView::TopToBottom</enum>
</property>
<property name="isWrapping" stdset="0">
<bool>false</bool>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>9</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="uniformItemSizes">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>General</string>
</property>
<property name="textAlignment">
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/general.png</normaloff>:/images/themes/default/propertyicons/general.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Rendering &amp; SVG</string>
</property>
<property name="textAlignment">
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/rendering.png</normaloff>:/images/themes/default/propertyicons/rendering.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Map tools</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/map_tools.png</normaloff>:/images/themes/default/propertyicons/map_tools.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Overlay</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/overlay.png</normaloff>:/images/themes/default/propertyicons/overlay.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Digitising</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/digitising.png</normaloff>:/images/themes/default/propertyicons/digitising.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>CRS</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/CRS.png</normaloff>:/images/themes/default/propertyicons/CRS.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Locale</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/locale.png</normaloff>:/images/themes/default/propertyicons/locale.png</iconset>
</property>
</item>
<item>
<property name="text">
<string>Network &amp; Proxy</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</iconset>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>

0 comments on commit 59d5824

Please sign in to comment.