-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 28 | ||||
-rw-r--r-- | noncore/settings/aqpkg/datamgr.h | 18 | ||||
-rw-r--r-- | noncore/settings/aqpkg/settings.ui | 1135 | ||||
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 21 | ||||
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.h | 2 |
5 files changed, 743 insertions, 461 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index 96c28c0..3933a22 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp @@ -132,3 +132,3 @@ void DataManager :: loadServers() } - else if ( lineStr.startsWith( "option" ) ) + else if ( lineStr.startsWith( "option" ) || lineStr.startsWith( "#option" ) ) { @@ -138,5 +138,17 @@ void DataManager :: loadServers() if ( stricmp( type, "http_proxy" ) == 0 ) + { httpProxy = val; + if ( lineStr.startsWith( "#" ) ) + httpProxyEnabled = false; + else + httpProxyEnabled = true; + } if ( stricmp( type, "ftp_proxy" ) == 0 ) + { ftpProxy = val; + if ( lineStr.startsWith( "#" ) ) + ftpProxyEnabled = false; + else + ftpProxyEnabled = true; + } if ( stricmp( type, "proxy_username" ) == 0 ) @@ -220,14 +232,22 @@ void DataManager :: writeOutIpkgConf() + out << endl; out << "# Proxy Support" << endl; - out << "#" << endl; - if ( httpProxy == "" ) + if ( !httpProxyEnabled && httpProxy == "" ) out << "#option http_proxy http://proxy.tld:3128" << endl; else + { + if ( !httpProxyEnabled ) + out << "#"; out << "option http_proxy " << httpProxy << endl; + } - if ( ftpProxy == "" ) + if ( !ftpProxyEnabled && ftpProxy == "" ) out << "#option ftp_proxy http://proxy.tld:3128" << endl; else + { + if ( !ftpProxyEnabled ) + out << "#"; out << "option ftp_proxy " << ftpProxy << endl; + } if ( proxyUsername == "" ) diff --git a/noncore/settings/aqpkg/datamgr.h b/noncore/settings/aqpkg/datamgr.h index 41833df..0a7467f 100644 --- a/noncore/settings/aqpkg/datamgr.h +++ b/noncore/settings/aqpkg/datamgr.h @@ -60,2 +60,17 @@ public: + QString getHttpProxy() { return httpProxy; } + QString getFtpProxy() { return ftpProxy; } + QString getProxyUsername() { return proxyUsername; } + QString getProxyPassword() { return proxyPassword; } + + bool getHttpProxyEnabled() { return httpProxyEnabled; } + bool getFtpProxyEnabled() { return ftpProxyEnabled; } + + void setHttpProxy( QString proxy ) { httpProxy = proxy; } + void setFtpProxy( QString proxy ) { ftpProxy = proxy; } + void setProxyUsername( QString name ) { proxyUsername = name; } + void setProxyPassword( QString pword ) { proxyPassword = pword; } + + void setHttpProxyEnabled( bool val ) { httpProxyEnabled = val; } + void setFtpProxyEnabled( bool val ) { ftpProxyEnabled = val; } private: @@ -68,2 +83,5 @@ private: + bool httpProxyEnabled; + bool ftpProxyEnabled; + vector<Server> serverList; diff --git a/noncore/settings/aqpkg/settings.ui b/noncore/settings/aqpkg/settings.ui index 44e8fd9..b39d358 100644 --- a/noncore/settings/aqpkg/settings.ui +++ b/noncore/settings/aqpkg/settings.ui @@ -13,3 +13,3 @@ <y>0</y> - <width>235</width> + <width>211</width> <height>390</height> @@ -27,527 +27,741 @@ </property> - <grid> + <widget> + <class>QTabWidget</class> <property stdset="1"> - <name>margin</name> - <number>11</number> + <name>name</name> + <cstring>TabWidget</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>enabled</name> + <bool>true</bool> </property> - <widget row="0" column="0" > - <class>QTabWidget</class> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>11</x> + <y>11</y> + <width>209</width> + <height>368</height> + </rect> + </property> + <property> + <name>layoutMargin</name> + </property> + <property> + <name>layoutSpacing</name> + </property> + <widget> + <class>QWidget</class> <property stdset="1"> <name>name</name> - <cstring>TabWidget</cstring> - </property> - <property stdset="1"> - <name>enabled</name> - <bool>true</bool> + <cstring>tab</cstring> </property> - <property> - <name>layoutMargin</name> - </property> - <property> - <name>layoutSpacing</name> - </property> - <widget> - <class>QWidget</class> + <attribute> + <name>title</name> + <string>Servers</string> + </attribute> + <grid> <property stdset="1"> - <name>name</name> - <cstring>tab</cstring> + <name>margin</name> + <number>11</number> </property> - <attribute> - <name>title</name> - <string>Servers</string> - </attribute> - <grid> - <property stdset="1"> - <name>margin</name> - <number>11</number> - </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget row="0" column="0" > + <class>QLayoutWidget</class> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>name</name> + <cstring>Layout2</cstring> </property> - <widget row="0" column="0" > - <class>QLayoutWidget</class> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> <property stdset="1"> - <name>name</name> - <cstring>Layout2</cstring> + <name>spacing</name> + <number>6</number> </property> - <hbox> + <widget> + <class>QLabel</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>Servers</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>text</name> + <string>Servers</string> </property> - <widget> - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>Servers</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Servers</string> - </property> - </widget> - <spacer> - <property> - <name>name</name> - <cstring>Spacer2</cstring> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Horizontal</enum> - </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> - </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </hbox> - </widget> - <widget row="1" column="0" > - <class>QLayoutWidget</class> + </widget> + <spacer> + <property> + <name>name</name> + <cstring>Spacer2</cstring> + </property> + <property stdset="1"> + <name>orientation</name> + <enum>Horizontal</enum> + </property> + <property stdset="1"> + <name>sizeType</name> + <enum>Expanding</enum> + </property> + <property> + <name>sizeHint</name> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget row="1" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout8</cstring> + </property> + <grid> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> <property stdset="1"> - <name>name</name> - <cstring>Layout8</cstring> + <name>spacing</name> + <number>6</number> </property> - <grid> + <widget row="0" column="0" rowspan="1" colspan="2" > + <class>QListBox</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>servers</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>selectionMode</name> + <enum>Extended</enum> </property> - <widget row="0" column="0" rowspan="1" colspan="2" > - <class>QListBox</class> - <property stdset="1"> - <name>name</name> - <cstring>servers</cstring> - </property> + </widget> + <widget row="2" column="0" rowspan="1" colspan="2" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout6</cstring> + </property> + <grid> <property stdset="1"> - <name>selectionMode</name> - <enum>Extended</enum> + <name>margin</name> + <number>0</number> </property> - </widget> - <widget row="2" column="0" rowspan="1" colspan="2" > - <class>QLayoutWidget</class> <property stdset="1"> - <name>name</name> - <cstring>Layout6</cstring> + <name>spacing</name> + <number>6</number> </property> - <grid> + <widget row="2" column="1" > + <class>QCheckBox</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>active</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>text</name> + <string>Active Server</string> </property> - <widget row="2" column="1" > - <class>QCheckBox</class> - <property stdset="1"> - <name>name</name> - <cstring>active</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Active Server</string> - </property> - </widget> - <widget row="0" column="0" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel1_3</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Name:</string> - </property> - </widget> - <widget row="1" column="0" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel2_3</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>URL:</string> - </property> - </widget> - <widget row="0" column="1" > - <class>QLineEdit</class> - <property stdset="1"> - <name>name</name> - <cstring>servername</cstring> - </property> - </widget> - <widget row="1" column="1" > - <class>QLineEdit</class> - <property stdset="1"> - <name>name</name> - <cstring>serverurl</cstring> - </property> - </widget> - <widget row="3" column="1" > - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> - <cstring>btnChangeServer</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Change</string> - </property> - </widget> - </grid> - </widget> - <widget row="1" column="1" > - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> - <cstring>removeserver</cstring> - </property> - <property stdset="1"> - <name>enabled</name> - <bool>true</bool> - </property> - <property stdset="1"> - <name>text</name> - <string>Remove</string> - </property> - <property stdset="1"> - <name>autoDefault</name> - <bool>false</bool> - </property> - </widget> - <widget row="1" column="0" > - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> - <cstring>newserver</cstring> - </property> - <property stdset="1"> - <name>enabled</name> - <bool>true</bool> - </property> - <property stdset="1"> - <name>text</name> - <string>New</string> - </property> - <property stdset="1"> - <name>autoDefault</name> - <bool>false</bool> - </property> - </widget> - </grid> - </widget> - </grid> - </widget> - <widget> - <class>QWidget</class> + </widget> + <widget row="0" column="0" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel1_3</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Name:</string> + </property> + </widget> + <widget row="1" column="0" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel2_3</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>URL:</string> + </property> + </widget> + <widget row="0" column="1" > + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>servername</cstring> + </property> + </widget> + <widget row="1" column="1" > + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>serverurl</cstring> + </property> + </widget> + <widget row="3" column="1" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>btnChangeServer</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Change</string> + </property> + </widget> + </grid> + </widget> + <widget row="1" column="1" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>removeserver</cstring> + </property> + <property stdset="1"> + <name>enabled</name> + <bool>true</bool> + </property> + <property stdset="1"> + <name>text</name> + <string>Remove</string> + </property> + <property stdset="1"> + <name>autoDefault</name> + <bool>false</bool> + </property> + </widget> + <widget row="1" column="0" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>newserver</cstring> + </property> + <property stdset="1"> + <name>enabled</name> + <bool>true</bool> + </property> + <property stdset="1"> + <name>text</name> + <string>New</string> + </property> + <property stdset="1"> + <name>autoDefault</name> + <bool>false</bool> + </property> + </widget> + </grid> + </widget> + </grid> + </widget> + <widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>tab</cstring> + </property> + <attribute> + <name>title</name> + <string>Destinations</string> + </attribute> + <grid> <property stdset="1"> - <name>name</name> - <cstring>tab</cstring> + <name>margin</name> + <number>11</number> </property> - <attribute> - <name>title</name> - <string>Destinations</string> - </attribute> - <grid> - <property stdset="1"> - <name>margin</name> - <number>11</number> - </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget row="0" column="0" > + <class>QLayoutWidget</class> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>name</name> + <cstring>Layout3</cstring> </property> - <widget row="0" column="0" > - <class>QLayoutWidget</class> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> <property stdset="1"> - <name>name</name> - <cstring>Layout3</cstring> + <name>spacing</name> + <number>6</number> </property> - <hbox> + <widget> + <class>QLabel</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>Destinations</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>text</name> + <string>Destinations</string> + </property> + </widget> + <spacer> + <property> + <name>name</name> + <cstring>Spacer2_2</cstring> </property> - <widget> - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>Destinations</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Destinations</string> - </property> - </widget> - <spacer> - <property> - <name>name</name> - <cstring>Spacer2_2</cstring> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Horizontal</enum> - </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> - </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </hbox> - </widget> - <widget row="2" column="0" > - <class>QLayoutWidget</class> - <property stdset="1"> - <name>name</name> - <cstring>Layout5</cstring> - </property> - <hbox> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>orientation</name> + <enum>Horizontal</enum> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>sizeType</name> + <enum>Expanding</enum> </property> - <widget> - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> - <cstring>newdestination</cstring> - </property> - <property stdset="1"> - <name>enabled</name> - <bool>true</bool> - </property> - <property stdset="1"> - <name>text</name> - <string>New</string> - </property> - <property stdset="1"> - <name>autoDefault</name> - <bool>false</bool> - </property> - </widget> - <widget> - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> - <cstring>removedestination</cstring> - </property> - <property stdset="1"> - <name>enabled</name> - <bool>true</bool> - </property> - <property stdset="1"> - <name>text</name> - <string>Remove</string> - </property> - <property stdset="1"> - <name>autoDefault</name> - <bool>false</bool> - </property> - </widget> - </hbox> - </widget> - <spacer row="0" column="0" > - <property> - <name>name</name> - <cstring>Spacer3</cstring> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Horizontal</enum> - </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> - </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget row="1" column="0" > - <class>QListBox</class> - <property stdset="1"> - <name>name</name> - <cstring>destinations</cstring> - </property> + <property> + <name>sizeHint</name> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget row="2" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout5</cstring> + </property> + <hbox> <property stdset="1"> - <name>selectionMode</name> - <enum>Single</enum> + <name>margin</name> + <number>0</number> </property> - </widget> - <widget row="3" column="0" > - <class>QLayoutWidget</class> <property stdset="1"> - <name>name</name> - <cstring>Layout13</cstring> + <name>spacing</name> + <number>6</number> </property> - <grid> + <widget> + <class>QPushButton</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>newdestination</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>enabled</name> + <bool>true</bool> </property> - <widget row="1" column="0" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel1_3_2_2</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>URL:</string> - </property> - </widget> - <widget row="3" column="1" > - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> - <cstring>btnChangeDest</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Change</string> - </property> - </widget> - <widget row="0" column="1" > - <class>QLineEdit</class> - <property stdset="1"> - <name>name</name> - <cstring>destinationname</cstring> - </property> - </widget> - <widget row="0" column="0" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel1_3_2</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Name:</string> - </property> - </widget> - <widget row="2" column="1" > - <class>QCheckBox</class> - <property stdset="1"> - <name>name</name> - <cstring>linkToRoot</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Link To Root</string> - </property> - <property stdset="1"> - <name>checked</name> - <bool>true</bool> - </property> - </widget> - <widget row="1" column="1" > - <class>QLineEdit</class> - <property stdset="1"> - <name>name</name> - <cstring>destinationurl</cstring> - </property> - </widget> - </grid> - </widget> - </grid> - </widget> - <widget> - <class>QWidget</class> - <property stdset="1"> - <name>name</name> - <cstring>tab</cstring> - </property> - <attribute> - <name>title</name> - <string>General</string> - </attribute> - <widget> - <class>QLabel</class> - <property stdset="1"> + <property stdset="1"> + <name>text</name> + <string>New</string> + </property> + <property stdset="1"> + <name>autoDefault</name> + <bool>false</bool> + </property> + </widget> + <widget> + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>removedestination</cstring> + </property> + <property stdset="1"> + <name>enabled</name> + <bool>true</bool> + </property> + <property stdset="1"> + <name>text</name> + <string>Remove</string> + </property> + <property stdset="1"> + <name>autoDefault</name> + <bool>false</bool> + </property> + </widget> + </hbox> + </widget> + <spacer row="0" column="0" > + <property> <name>name</name> - <cstring>TextLabel1</cstring> + <cstring>Spacer3</cstring> </property> <property stdset="1"> - <name>geometry</name> - <rect> - <x>20</x> - <y>30</y> - <width>150</width> - <height>20</height> - </rect> + <name>orientation</name> + <enum>Horizontal</enum> </property> <property stdset="1"> - <name>text</name> - <string>(Will take effect on restart)</string> + <name>sizeType</name> + <enum>Expanding</enum> </property> - </widget> - <widget> - <class>QCheckBox</class> + <property> + <name>sizeHint</name> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + <widget row="1" column="0" > + <class>QListBox</class> <property stdset="1"> <name>name</name> - <cstring>jumpTo</cstring> + <cstring>destinations</cstring> </property> <property stdset="1"> - <name>geometry</name> - <rect> - <x>17</x> - <y>14</y> - <width>150</width> - <height>20</height> - </rect> + <name>selectionMode</name> + <enum>Single</enum> </property> + </widget> + <widget row="3" column="0" > + <class>QLayoutWidget</class> <property stdset="1"> - <name>text</name> - <string>Show Jump To Letters</string> + <name>name</name> + <cstring>Layout13</cstring> </property> + <grid> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget row="1" column="0" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel1_3_2_2</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>URL:</string> + </property> + </widget> + <widget row="3" column="1" > + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>btnChangeDest</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Change</string> + </property> + </widget> + <widget row="0" column="1" > + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>destinationname</cstring> + </property> + </widget> + <widget row="0" column="0" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel1_3_2</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Name:</string> + </property> + </widget> + <widget row="2" column="1" > + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>linkToRoot</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Link To Root</string> + </property> + <property stdset="1"> + <name>checked</name> + <bool>true</bool> + </property> + </widget> + <widget row="1" column="1" > + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>destinationurl</cstring> + </property> + </widget> + </grid> </widget> + </grid> + </widget> + <widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>tab</cstring> + </property> + <attribute> + <name>title</name> + <string>Proxys</string> + </attribute> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel1_2</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>1</x> + <y>19</y> + <width>67</width> + <height>22</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>HTTP Proxy</string> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>txtFtpProxy</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>74</x> + <y>72</y> + <width>110</width> + <height>22</height> + </rect> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>txtHttpProxy</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>74</x> + <y>19</y> + <width>110</width> + <height>22</height> + </rect> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel4</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>1</x> + <y>153</y> + <width>67</width> + <height>22</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Password</string> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>txtUsername</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>74</x> + <y>125</y> + <width>110</width> + <height>22</height> + </rect> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>txtPassword</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>74</x> + <y>153</y> + <width>110</width> + <height>22</height> + </rect> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>chkFtpProxyEnabled</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>74</x> + <y>100</y> + <width>110</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Enabled</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel2</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>1</x> + <y>72</y> + <width>67</width> + <height>22</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>FTP Proxy</string> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel3</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>1</x> + <y>125</y> + <width>67</width> + <height>22</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Username</string> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>chkHttpProxyEnabled</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>74</x> + <y>47</y> + <width>110</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Enabled</string> + </property> + </widget> + <widget> + <class>QPushButton</class> + <property stdset="1"> + <name>name</name> + <cstring>btnProxyApply</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>74</x> + <y>181</y> + <width>110</width> + <height>28</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>&Apply</string> + </property> + </widget> + </widget> + <widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>tab</cstring> + </property> + <attribute> + <name>title</name> + <string>General</string> + </attribute> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel1</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>20</x> + <y>30</y> + <width>150</width> + <height>20</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>(Will take effect on restart)</string> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>jumpTo</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>17</x> + <y>14</y> + <width>150</width> + <height>20</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Show Jump To Letters</string> + </property> </widget> </widget> - </grid> + </widget> </widget> @@ -608,2 +822,8 @@ </connection> + <connection> + <sender>btnProxyApply</sender> + <signal>clicked()</signal> + <receiver>Settings</receiver> + <slot>proxyApplyChanges()</slot> + </connection> <slot access="public">activeServerChanged()</slot> @@ -622,2 +842,3 @@ <slot access="public">newServer()</slot> + <slot access="public">proxyApplyChanges()</slot> <slot access="public">removeDestination()</slot> diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp index 9dd2206..4bb928a 100644 --- a/noncore/settings/aqpkg/settingsimpl.cpp +++ b/noncore/settings/aqpkg/settingsimpl.cpp @@ -80,2 +80,3 @@ void SettingsImpl :: setupData() + // setup general tab #ifdef QWS @@ -87,2 +88,10 @@ void SettingsImpl :: setupData() #endif + + // setup proxy tab + txtHttpProxy->setText( dataMgr->getHttpProxy() ); + txtFtpProxy->setText( dataMgr->getFtpProxy() ); + txtUsername->setText( dataMgr->getProxyUsername() ); + txtPassword->setText( dataMgr->getProxyPassword() ); + chkHttpProxyEnabled->setChecked( dataMgr->getHttpProxyEnabled() ); + chkFtpProxyEnabled->setChecked( dataMgr->getFtpProxyEnabled() ); } @@ -246 +255,13 @@ void SettingsImpl :: toggleJumpTo( bool val ) +//------------------ Proxy tab ---------------------- +void SettingsImpl :: proxyApplyChanges() +{ + changed = true; + dataMgr->setHttpProxy( txtHttpProxy->text() ); + dataMgr->setFtpProxy( txtFtpProxy->text() ); + dataMgr->setProxyUsername( txtUsername->text() ); + dataMgr->setProxyPassword( txtPassword->text() ); + + dataMgr->setHttpProxyEnabled( chkHttpProxyEnabled->isChecked() ); + dataMgr->setFtpProxyEnabled( chkFtpProxyEnabled->isChecked() ); +} diff --git a/noncore/settings/aqpkg/settingsimpl.h b/noncore/settings/aqpkg/settingsimpl.h index 971516b..bb027dc 100644 --- a/noncore/settings/aqpkg/settingsimpl.h +++ b/noncore/settings/aqpkg/settingsimpl.h @@ -53,2 +53,4 @@ private: void toggleJumpTo( bool val ); + + void proxyApplyChanges(); }; |