mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Added global proxy configuration to options dialog. Use the follow qsettings keys to obtain proxy configs: proxy/proxyEnabled, proxy/proxyHost, proxy/proxyPort, proxy/proxyUser and proxy/proxyPassword. Note that the proxy password is not encrypted in any way when stored in Qt config file / win registry.
git-svn-id: http://svn.osgeo.org/qgis/trunk@8648 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
3c57584d40
commit
1131288fdb
@ -61,6 +61,12 @@ QgsOptions::QgsOptions(QWidget *parent, Qt::WFlags fl) :
|
||||
#endif
|
||||
spinBoxIdentifyValue->setValue(identifyValue);
|
||||
|
||||
//Web proxy settings
|
||||
grpProxy->setChecked(settings.value("proxy/proxyEnabled", "0").toBool());
|
||||
leProxyHost->setText(settings.value("proxy/proxyHost", "").toString());
|
||||
leProxyPort->setText(settings.value("proxy/proxyPort", "").toString());
|
||||
leProxyUser->setText(settings.value("proxy/proxyUser", "").toString());
|
||||
leProxyPassword->setText(settings.value("proxy/proxyPassword", "").toString());
|
||||
// set the current theme
|
||||
cmbTheme->setItemText(cmbTheme->currentIndex(), settings.value("/Themes").toString());
|
||||
// set the display update threshold
|
||||
@ -246,6 +252,13 @@ QString QgsOptions::theme()
|
||||
void QgsOptions::saveOptions()
|
||||
{
|
||||
QSettings settings;
|
||||
//Web proxy settings
|
||||
settings.setValue("proxy/proxyEnabled", grpProxy->isChecked());
|
||||
settings.setValue("proxy/proxyHost", leProxyHost->text());
|
||||
settings.setValue("proxy/proxyPort", leProxyPort->text());
|
||||
settings.setValue("proxy/proxyUser", leProxyUser->text());
|
||||
settings.setValue("proxy/proxyPassword", leProxyPassword->text());
|
||||
//general settings
|
||||
settings.setValue("/Map/identifyRadius", spinBoxIdentifyValue->value());
|
||||
settings.setValue("/qgis/showLegendClassifiers",cbxLegendClassifiers->isChecked());
|
||||
settings.setValue("/qgis/hideSplash",cbxHideSplash->isChecked());
|
||||
|
@ -938,6 +938,104 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab" >
|
||||
<attribute name="title" >
|
||||
<string>Proxy</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="grpProxy" >
|
||||
<property name="title" >
|
||||
<string>Use proxy for web access</string>
|
||||
</property>
|
||||
<property name="flat" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="lblProxyHost" >
|
||||
<property name="text" >
|
||||
<string>Host</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>cboModellerPluginName</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="leProxyHost" />
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="lblProxyPort" >
|
||||
<property name="text" >
|
||||
<string>Port</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>cboModellerPluginName</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="leProxyPort" />
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="lblUser" >
|
||||
<property name="text" >
|
||||
<string>User</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>cboModellerPluginName</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="leProxyUser" >
|
||||
<property name="toolTip" >
|
||||
<string>Leave this blank if no proxy username / password are required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="lblPassword" >
|
||||
<property name="text" >
|
||||
<string>Password</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>cboModellerPluginName</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QLineEdit" name="leProxyPassword" >
|
||||
<property name="toolTip" >
|
||||
<string>Leave this blank if no proxy username / password are required</string>
|
||||
</property>
|
||||
<property name="echoMode" >
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
|
Loading…
x
Reference in New Issue
Block a user