# HG changeset patch # User thomas_-_s # Date 1269163311 0 # Node ID 1c5ff048dfaaa4e7e7933baa9680bc492272b7bb # Parent fc850ee753bd84a50ec9abd93b8f03209d33beaa Added a network settings tab to the settings dialog, where a proxy can be defined. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1000 59b1889a-e5ac-428c-b0c7-476e01d41282 diff -r fc850ee753bd -r 1c5ff048dfaa src/UiGuiSettings.cpp --- a/src/UiGuiSettings.cpp Fri Mar 19 19:27:40 2010 +0000 +++ b/src/UiGuiSettings.cpp Sun Mar 21 09:21:51 2010 +0000 @@ -248,9 +248,15 @@ else if ( settingName == "IndenterParameterTooltipsEnabled" ) emit indenterParameterTooltipsEnabled( settings[settingName].toBool() ); else if ( settingName == "TabWidth" ) emit tabWidth( settings[settingName].toInt() ); else if ( settingName == "Language" ) emit language( settings[settingName].toInt() ); - else if ( settingName == "CheckForUpdate" ) emit checkForUpdate( settings[settingName].toBool() ); else if ( settingName == "LastUpdateCheck" ) emit lastUpdateCheck( settings[settingName].toDate() ); else if ( settingName == "MainWindowState" ) emit mainWindowState( settings[settingName].toByteArray() ); + // Network settings. + else if ( settingName == "CheckForUpdate" ) emit checkForUpdate( settings[settingName].toBool() ); + else if ( settingName == "ProxyEnabled" ) emit enableProxy( settings[settingName].toBool() ); + else if ( settingName == "ProxyHostName" ) emit proxyHostName( settings[settingName].toString() ); + else if ( settingName == "ProxyPort" ) emit proxyPort( settings[settingName].toInt() ); + else if ( settingName == "ProxyUserName" ) emit proxyUserName( settings[settingName].toString() ); + else if ( settingName == "ProxyPassword" ) emit proxyPassword( settings[settingName].toString() ); else if ( settingName == "all" ) { emit versionInSettingsFile( settings["VersionInSettingsFile"].toString() ); emit windowIsMaximized( settings["WindowIsMaximized"].toBool() ); @@ -266,9 +272,15 @@ emit indenterParameterTooltipsEnabled( settings["IndenterParameterTooltipsEnabled"].toBool() ); emit tabWidth( settings["TabWidth"].toInt() ); emit language( settings["Language"].toInt() ); - emit checkForUpdate( settings["CheckForUpdate"].toBool() ); emit lastUpdateCheck( settings["LastUpdateCheck"].toDate() ); emit mainWindowState( settings["MainWindowState"].toByteArray() ); + // Network settings. + emit checkForUpdate( settings["CheckForUpdate"].toBool() ); + emit enableProxy( settings["ProxyEnabled"].toBool() ); + emit proxyHostName( settings["ProxyHostName"].toString() ); + emit proxyPort( settings["ProxyPort"].toInt() ); + emit proxyUserName( settings["ProxyUserName"].toString() ); + emit proxyPassword( settings["ProxyPassword"].toString() ); } } diff -r fc850ee753bd -r 1c5ff048dfaa src/UiGuiSettings.h --- a/src/UiGuiSettings.h Fri Mar 19 19:27:40 2010 +0000 +++ b/src/UiGuiSettings.h Sun Mar 21 09:21:51 2010 +0000 @@ -72,9 +72,15 @@ void indenterParameterTooltipsEnabled(bool value); void tabWidth(int value); void language(int value); - void checkForUpdate(bool value); void lastUpdateCheck(QDate value); void mainWindowState(QByteArray value); + // Network settings. + void checkForUpdate(bool value); + void enableProxy(bool value); + void proxyHostName(QString value); + void proxyPort(int value); + void proxyUserName(QString value); + void proxyPassword(QString value); private: void emitSignalForSetting(QString settingName); diff -r fc850ee753bd -r 1c5ff048dfaa src/UiGuiSettingsDialog.ui --- a/src/UiGuiSettingsDialog.ui Fri Mar 19 19:27:40 2010 +0000 +++ b/src/UiGuiSettingsDialog.ui Sun Mar 21 09:21:51 2010 +0000 @@ -9,8 +9,8 @@ 0 0 - 410 - 285 + 503 + 336 @@ -21,12 +21,6 @@ :/mainWindow/preferences-system.png:/mainWindow/preferences-system.png - - 6 - - - 9 - @@ -41,20 +35,8 @@ Common - - 6 - - - 9 - - - 6 - - - 0 - @@ -127,12 +109,6 @@ - - 6 - - - 0 - @@ -184,19 +160,6 @@ - - - Checks whether a new version of UniversalIndentGUI exists on program start, but only once a day. - - - Check online for update on program start - - - DONOTTRANSLATE:CheckForUpdate - - - - Qt::Vertical @@ -220,12 +183,6 @@ Editor - - 6 - - - 9 - @@ -241,12 +198,6 @@ - - 6 - - - 0 - @@ -315,6 +266,150 @@ + + + + :/mainWindow/system-software-update.png:/mainWindow/system-software-update.png + + + Network + + + + + + Checks whether a new version of UniversalIndentGUI exists on program start, but only once a day. + + + Check online for update on program start + + + DONOTTRANSLATE:CheckForUpdate + + + + + + + + + + + + + If checked, the made proxy settings will be applied for all network connections. Type of the used proxy is SOCKS5. + + + Enable proxy + + + DONOTTRANSLATE:ProxyEnabled + + + + + + + false + + + + + + Host name: + + + uiGuiProxyHostNameLineEdit + + + + + + + Host name of the to be used proxy. E.g.: proxy.example.com + + + DONOTTRANSLATE:ProxyHostName + + + + + + + Port: + + + uiGuiProxyPortSpinBox + + + + + + + Port number to connect to the before named proxy. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + QAbstractSpinBox::NoButtons + + + DONOTTRANSLATE:ProxyPort + + + + + + + User name: + + + uiGuiProxyUserNameLineEdit + + + + + + + If the proxy needs authentification, enter the login name here. + + + DONOTTRANSLATE:ProxyUserName + + + + + + + Password: + + + uiGuiProxyPasswordLineEdit + + + + + + + If the proxy needs authentification, enter the password here. + + + QLineEdit::Password + + + DONOTTRANSLATE:ProxyPassword + + + + + + + + + + + @@ -324,12 +419,6 @@ Syntax Highlighting - - 6 - - - 9 - @@ -355,12 +444,6 @@ Highlighter settings - - 6 - - - 9 - @@ -377,12 +460,6 @@ - - 6 - - - 0 - @@ -461,8 +538,8 @@ accept() - 244 - 224 + 250 + 316 153 @@ -477,8 +554,8 @@ reject() - 321 - 227 + 327 + 316 282 @@ -486,5 +563,21 @@ + + uiGuiEnableProxyCheckBox + toggled(bool) + widget + setEnabled(bool) + + + 73 + 68 + + + 76 + 95 + + +