author | drw <drw> | 2004-08-16 17:19:29 (UTC) |
---|---|---|
committer | drw <drw> | 2004-08-16 17:19:29 (UTC) |
commit | f8f568aaddc63d39b50aa8357326a64c036f5847 (patch) (unidiff) | |
tree | ed1fe779405d7a14cf1e27486a92dd93462652b3 | |
parent | e08904edaea335f215b7bc16ab2ec239df415e5e (diff) | |
download | opie-f8f568aaddc63d39b50aa8357326a64c036f5847.zip opie-f8f568aaddc63d39b50aa8357326a64c036f5847.tar.gz opie-f8f568aaddc63d39b50aa8357326a64c036f5847.tar.bz2 |
Correct group box label
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index 7941ab8..1561470 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -1,121 +1,121 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (c) 2003 Dan Williams <drw@handhelds.org> | 4 | Copyright (c) 2003 Dan Williams <drw@handhelds.org> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "oipkgconfigdlg.h" | 32 | #include "oipkgconfigdlg.h" |
33 | 33 | ||
34 | #include <qpe/resource.h> | 34 | #include <qpe/resource.h> |
35 | 35 | ||
36 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
37 | #include <qcombobox.h> | 37 | #include <qcombobox.h> |
38 | #include <qgroupbox.h> | 38 | #include <qgroupbox.h> |
39 | #include <qlabel.h> | 39 | #include <qlabel.h> |
40 | #include <qlineedit.h> | 40 | #include <qlineedit.h> |
41 | #include <qlistbox.h> | 41 | #include <qlistbox.h> |
42 | #include <qpushbutton.h> | 42 | #include <qpushbutton.h> |
43 | #include <qscrollview.h> | 43 | #include <qscrollview.h> |
44 | #include <qwhatsthis.h> | 44 | #include <qwhatsthis.h> |
45 | 45 | ||
46 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) | 46 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) |
47 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) | 47 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
48 | , m_ipkg( ipkg ) | 48 | , m_ipkg( ipkg ) |
49 | , m_configs( 0x0 ) | 49 | , m_configs( 0x0 ) |
50 | , m_installOptions( installOptions ) | 50 | , m_installOptions( installOptions ) |
51 | , m_serverNew( false ) | 51 | , m_serverNew( false ) |
52 | , m_serverCurrent( -1 ) | 52 | , m_serverCurrent( -1 ) |
53 | , m_destNew( false ) | 53 | , m_destNew( false ) |
54 | , m_destCurrent( -1 ) | 54 | , m_destCurrent( -1 ) |
55 | , m_layout( this, 2, 4 ) | 55 | , m_layout( this, 2, 4 ) |
56 | , m_tabWidget( this ) | 56 | , m_tabWidget( this ) |
57 | { | 57 | { |
58 | setCaption( tr( "Configuration" ) ); | 58 | setCaption( tr( "Configuration" ) ); |
59 | 59 | ||
60 | // Initialize configuration widgets | 60 | // Initialize configuration widgets |
61 | if ( !installOptions ) | 61 | if ( !installOptions ) |
62 | { | 62 | { |
63 | initServerWidget(); | 63 | initServerWidget(); |
64 | initDestinationWidget(); | 64 | initDestinationWidget(); |
65 | initProxyWidget(); | 65 | initProxyWidget(); |
66 | } | 66 | } |
67 | initOptionsWidget(); | 67 | initOptionsWidget(); |
68 | 68 | ||
69 | // Load configuration information | 69 | // Load configuration information |
70 | initData(); | 70 | initData(); |
71 | 71 | ||
72 | // Setup tabs for all info | 72 | // Setup tabs for all info |
73 | m_layout.addWidget( &m_tabWidget ); | 73 | m_layout.addWidget( &m_tabWidget ); |
74 | if ( !m_installOptions ) | 74 | if ( !m_installOptions ) |
75 | { | 75 | { |
76 | m_tabWidget.addTab( m_serverWidget, "packagemanager/servertab", tr( "Servers" ) ); | 76 | m_tabWidget.addTab( m_serverWidget, "packagemanager/servertab", tr( "Servers" ) ); |
77 | m_tabWidget.addTab( m_destWidget, "packagemanager/desttab", tr( "Destinations" ) ); | 77 | m_tabWidget.addTab( m_destWidget, "packagemanager/desttab", tr( "Destinations" ) ); |
78 | m_tabWidget.addTab( m_proxyWidget, "packagemanager/proxytab", tr( "Proxies" ) ); | 78 | m_tabWidget.addTab( m_proxyWidget, "packagemanager/proxytab", tr( "Proxies" ) ); |
79 | m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) ); | 79 | m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) ); |
80 | m_tabWidget.setCurrentTab( tr( "Servers" ) ); | 80 | m_tabWidget.setCurrentTab( tr( "Servers" ) ); |
81 | } | 81 | } |
82 | else | 82 | else |
83 | { | 83 | { |
84 | m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) ); | 84 | m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) ); |
85 | } | 85 | } |
86 | 86 | ||
87 | //showMaximized(); | 87 | //showMaximized(); |
88 | } | 88 | } |
89 | 89 | ||
90 | void OIpkgConfigDlg::accept() | 90 | void OIpkgConfigDlg::accept() |
91 | { | 91 | { |
92 | // Save server, destination and proxy configuration | 92 | // Save server, destination and proxy configuration |
93 | if ( !m_installOptions ) | 93 | if ( !m_installOptions ) |
94 | { | 94 | { |
95 | // Update proxy information before saving settings | 95 | // Update proxy information before saving settings |
96 | OConfItem *confItem = findConfItem( OConfItem::Option, "http_proxy" ); | 96 | OConfItem *confItem = findConfItem( OConfItem::Option, "http_proxy" ); |
97 | if ( confItem ) | 97 | if ( confItem ) |
98 | { | 98 | { |
99 | confItem->setValue( m_proxyHttpServer->text() ); | 99 | confItem->setValue( m_proxyHttpServer->text() ); |
100 | confItem->setActive( m_proxyHttpActive->isChecked() ); | 100 | confItem->setActive( m_proxyHttpActive->isChecked() ); |
101 | } | 101 | } |
102 | else | 102 | else |
103 | m_configs->append( new OConfItem( OConfItem::Option, "http_proxy", | 103 | m_configs->append( new OConfItem( OConfItem::Option, "http_proxy", |
104 | m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) ); | 104 | m_proxyHttpServer->text(), m_proxyHttpActive->isChecked() ) ); |
105 | 105 | ||
106 | confItem = findConfItem( OConfItem::Option, "ftp_proxy" ); | 106 | confItem = findConfItem( OConfItem::Option, "ftp_proxy" ); |
107 | if ( confItem ) | 107 | if ( confItem ) |
108 | { | 108 | { |
109 | confItem->setValue( m_proxyFtpServer->text() ); | 109 | confItem->setValue( m_proxyFtpServer->text() ); |
110 | confItem->setActive( m_proxyFtpActive->isChecked() ); | 110 | confItem->setActive( m_proxyFtpActive->isChecked() ); |
111 | } | 111 | } |
112 | else | 112 | else |
113 | m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy", | 113 | m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy", |
114 | m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) ); | 114 | m_proxyFtpServer->text(), m_proxyFtpActive->isChecked() ) ); |
115 | 115 | ||
116 | confItem = findConfItem( OConfItem::Option, "proxy_username" ); | 116 | confItem = findConfItem( OConfItem::Option, "proxy_username" ); |
117 | if ( confItem ) | 117 | if ( confItem ) |
118 | confItem->setValue( m_proxyUsername->text() ); | 118 | confItem->setValue( m_proxyUsername->text() ); |
119 | else | 119 | else |
120 | m_configs->append( new OConfItem( OConfItem::Option, "proxy_username", | 120 | m_configs->append( new OConfItem( OConfItem::Option, "proxy_username", |
121 | m_proxyUsername->text() ) ); | 121 | m_proxyUsername->text() ) ); |
@@ -150,193 +150,193 @@ void OIpkgConfigDlg::reject() | |||
150 | { | 150 | { |
151 | if ( m_configs ) | 151 | if ( m_configs ) |
152 | delete m_configs; | 152 | delete m_configs; |
153 | } | 153 | } |
154 | 154 | ||
155 | void OIpkgConfigDlg::initServerWidget() | 155 | void OIpkgConfigDlg::initServerWidget() |
156 | { | 156 | { |
157 | m_serverWidget = new QWidget( this ); | 157 | m_serverWidget = new QWidget( this ); |
158 | 158 | ||
159 | // Initialize UI | 159 | // Initialize UI |
160 | QVBoxLayout *vb = new QVBoxLayout( m_serverWidget ); | 160 | QVBoxLayout *vb = new QVBoxLayout( m_serverWidget ); |
161 | QScrollView *sv = new QScrollView( m_serverWidget ); | 161 | QScrollView *sv = new QScrollView( m_serverWidget ); |
162 | vb->addWidget( sv, 0, 0 ); | 162 | vb->addWidget( sv, 0, 0 ); |
163 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 163 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
164 | sv->setFrameStyle( QFrame::NoFrame ); | 164 | sv->setFrameStyle( QFrame::NoFrame ); |
165 | QWidget *container = new QWidget( sv->viewport() ); | 165 | QWidget *container = new QWidget( sv->viewport() ); |
166 | sv->addChild( container ); | 166 | sv->addChild( container ); |
167 | QGridLayout *layout = new QGridLayout( container, 3, 2, 2, 4 ); | 167 | QGridLayout *layout = new QGridLayout( container, 3, 2, 2, 4 ); |
168 | 168 | ||
169 | m_serverList = new QListBox( container ); | 169 | m_serverList = new QListBox( container ); |
170 | QWhatsThis::add( m_serverList, tr( "This is a list of all servers configured. Select one here to edit or delete, or add a new one below." ) ); | 170 | QWhatsThis::add( m_serverList, tr( "This is a list of all servers configured. Select one here to edit or delete, or add a new one below." ) ); |
171 | m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); | 171 | m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); |
172 | connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerEdit(int)) ); | 172 | connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerEdit(int)) ); |
173 | layout->addMultiCellWidget( m_serverList, 0, 0, 0, 1 ); | 173 | layout->addMultiCellWidget( m_serverList, 0, 0, 0, 1 ); |
174 | 174 | ||
175 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container ); | 175 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container ); |
176 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); | 176 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); |
177 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); | 177 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); |
178 | layout->addWidget( btn, 1, 0 ); | 178 | layout->addWidget( btn, 1, 0 ); |
179 | 179 | ||
180 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container ); | 180 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container ); |
181 | QWhatsThis::add( btn, tr( "Tap here to delete the entry selected above." ) ); | 181 | QWhatsThis::add( btn, tr( "Tap here to delete the entry selected above." ) ); |
182 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); | 182 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); |
183 | layout->addWidget( btn, 1, 1 ); | 183 | layout->addWidget( btn, 1, 1 ); |
184 | 184 | ||
185 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Server" ), container ); | 185 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Server" ), container ); |
186 | grpbox->layout()->setSpacing( 2 ); | 186 | grpbox->layout()->setSpacing( 2 ); |
187 | grpbox->layout()->setMargin( 4 ); | 187 | grpbox->layout()->setMargin( 4 ); |
188 | layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 ); | 188 | layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 ); |
189 | 189 | ||
190 | QGridLayout *grplayout = new QGridLayout( grpbox->layout() ); | 190 | QGridLayout *grplayout = new QGridLayout( grpbox->layout() ); |
191 | 191 | ||
192 | QLabel *label = new QLabel( tr( "Name:" ), grpbox ); | 192 | QLabel *label = new QLabel( tr( "Name:" ), grpbox ); |
193 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); | 193 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); |
194 | grplayout->addWidget( label, 0, 0 ); | 194 | grplayout->addWidget( label, 0, 0 ); |
195 | m_serverName = new QLineEdit( grpbox ); | 195 | m_serverName = new QLineEdit( grpbox ); |
196 | QWhatsThis::add( m_serverName, tr( "Enter the name of this entry here." ) ); | 196 | QWhatsThis::add( m_serverName, tr( "Enter the name of this entry here." ) ); |
197 | grplayout->addWidget( m_serverName, 0, 1 ); | 197 | grplayout->addWidget( m_serverName, 0, 1 ); |
198 | 198 | ||
199 | label = new QLabel( tr( "Address:" ), grpbox ); | 199 | label = new QLabel( tr( "Address:" ), grpbox ); |
200 | QWhatsThis::add( label, tr( "Enter the URL address of this entry here." ) ); | 200 | QWhatsThis::add( label, tr( "Enter the URL address of this entry here." ) ); |
201 | grplayout->addWidget( label, 1, 0 ); | 201 | grplayout->addWidget( label, 1, 0 ); |
202 | m_serverLocation = new QLineEdit( grpbox ); | 202 | m_serverLocation = new QLineEdit( grpbox ); |
203 | QWhatsThis::add( m_serverLocation, tr( "Enter the URL address of this entry here." ) ); | 203 | QWhatsThis::add( m_serverLocation, tr( "Enter the URL address of this entry here." ) ); |
204 | grplayout->addWidget( m_serverLocation, 1, 1 ); | 204 | grplayout->addWidget( m_serverLocation, 1, 1 ); |
205 | 205 | ||
206 | m_serverActive = new QCheckBox( tr( "Active" ), grpbox ); | 206 | m_serverActive = new QCheckBox( tr( "Active" ), grpbox ); |
207 | QWhatsThis::add( m_serverActive, tr( "Tap here to indicate whether this entry is active or not." ) ); | 207 | QWhatsThis::add( m_serverActive, tr( "Tap here to indicate whether this entry is active or not." ) ); |
208 | grplayout->addMultiCellWidget( m_serverActive, 2, 2, 0, 1 ); | 208 | grplayout->addMultiCellWidget( m_serverActive, 2, 2, 0, 1 ); |
209 | 209 | ||
210 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); | 210 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); |
211 | QWhatsThis::add( btn, tr( "Tap here to update the entry's information." ) ); | 211 | QWhatsThis::add( btn, tr( "Tap here to update the entry's information." ) ); |
212 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerUpdate()) ); | 212 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerUpdate()) ); |
213 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); | 213 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); |
214 | } | 214 | } |
215 | 215 | ||
216 | void OIpkgConfigDlg::initDestinationWidget() | 216 | void OIpkgConfigDlg::initDestinationWidget() |
217 | { | 217 | { |
218 | m_destWidget = new QWidget( this ); | 218 | m_destWidget = new QWidget( this ); |
219 | 219 | ||
220 | // Initialize UI | 220 | // Initialize UI |
221 | QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); | 221 | QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); |
222 | QScrollView *sv = new QScrollView( m_destWidget ); | 222 | QScrollView *sv = new QScrollView( m_destWidget ); |
223 | vb->addWidget( sv, 0, 0 ); | 223 | vb->addWidget( sv, 0, 0 ); |
224 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 224 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
225 | sv->setFrameStyle( QFrame::NoFrame ); | 225 | sv->setFrameStyle( QFrame::NoFrame ); |
226 | QWidget *container = new QWidget( sv->viewport() ); | 226 | QWidget *container = new QWidget( sv->viewport() ); |
227 | sv->addChild( container ); | 227 | sv->addChild( container ); |
228 | QGridLayout *layout = new QGridLayout( container, 3, 2, 2, 4 ); | 228 | QGridLayout *layout = new QGridLayout( container, 3, 2, 2, 4 ); |
229 | 229 | ||
230 | m_destList = new QListBox( container ); | 230 | m_destList = new QListBox( container ); |
231 | QWhatsThis::add( m_destList, tr( "This is a list of all destinations configured for this device. Select one here to edit or delete, or add a new one below." ) ); | 231 | QWhatsThis::add( m_destList, tr( "This is a list of all destinations configured for this device. Select one here to edit or delete, or add a new one below." ) ); |
232 | m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); | 232 | m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); |
233 | connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestEdit(int)) ); | 233 | connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestEdit(int)) ); |
234 | layout->addMultiCellWidget( m_destList, 0, 0, 0, 1 ); | 234 | layout->addMultiCellWidget( m_destList, 0, 0, 0, 1 ); |
235 | 235 | ||
236 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container ); | 236 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container ); |
237 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); | 237 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); |
238 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); | 238 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); |
239 | layout->addWidget( btn, 1, 0 ); | 239 | layout->addWidget( btn, 1, 0 ); |
240 | 240 | ||
241 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container ); | 241 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container ); |
242 | QWhatsThis::add( btn, tr( "Tap here to delete the entry selected above." ) ); | 242 | QWhatsThis::add( btn, tr( "Tap here to delete the entry selected above." ) ); |
243 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); | 243 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); |
244 | layout->addWidget( btn, 1, 1 ); | 244 | layout->addWidget( btn, 1, 1 ); |
245 | 245 | ||
246 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Server" ), container ); | 246 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Destination" ), container ); |
247 | grpbox->layout()->setSpacing( 2 ); | 247 | grpbox->layout()->setSpacing( 2 ); |
248 | grpbox->layout()->setMargin( 4 ); | 248 | grpbox->layout()->setMargin( 4 ); |
249 | layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 ); | 249 | layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 ); |
250 | 250 | ||
251 | QGridLayout *grplayout = new QGridLayout( grpbox->layout() ); | 251 | QGridLayout *grplayout = new QGridLayout( grpbox->layout() ); |
252 | 252 | ||
253 | QLabel *label = new QLabel( tr( "Name:" ), grpbox ); | 253 | QLabel *label = new QLabel( tr( "Name:" ), grpbox ); |
254 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); | 254 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); |
255 | grplayout->addWidget( label, 0, 0 ); | 255 | grplayout->addWidget( label, 0, 0 ); |
256 | m_destName = new QLineEdit( grpbox ); | 256 | m_destName = new QLineEdit( grpbox ); |
257 | QWhatsThis::add( m_destName, tr( "Enter the name of this entry here." ) ); | 257 | QWhatsThis::add( m_destName, tr( "Enter the name of this entry here." ) ); |
258 | grplayout->addWidget( m_destName, 0, 1 ); | 258 | grplayout->addWidget( m_destName, 0, 1 ); |
259 | 259 | ||
260 | label = new QLabel( tr( "Location:" ), grpbox ); | 260 | label = new QLabel( tr( "Location:" ), grpbox ); |
261 | QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); | 261 | QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); |
262 | grplayout->addWidget( label, 1, 0 ); | 262 | grplayout->addWidget( label, 1, 0 ); |
263 | m_destLocation = new QLineEdit( grpbox ); | 263 | m_destLocation = new QLineEdit( grpbox ); |
264 | QWhatsThis::add( m_destLocation, tr( "Enter the absolute directory path of this entry here." ) ); | 264 | QWhatsThis::add( m_destLocation, tr( "Enter the absolute directory path of this entry here." ) ); |
265 | grplayout->addWidget( m_destLocation, 1, 1 ); | 265 | grplayout->addWidget( m_destLocation, 1, 1 ); |
266 | 266 | ||
267 | m_destActive = new QCheckBox( tr( "Active" ), grpbox ); | 267 | m_destActive = new QCheckBox( tr( "Active" ), grpbox ); |
268 | QWhatsThis::add( m_destActive, tr( "Tap here to indicate whether this entry is active or not." ) ); | 268 | QWhatsThis::add( m_destActive, tr( "Tap here to indicate whether this entry is active or not." ) ); |
269 | grplayout->addMultiCellWidget( m_destActive, 2, 2, 0, 1 ); | 269 | grplayout->addMultiCellWidget( m_destActive, 2, 2, 0, 1 ); |
270 | 270 | ||
271 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); | 271 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox ); |
272 | QWhatsThis::add( btn, tr( "Tap here to update the entry's information." ) ); | 272 | QWhatsThis::add( btn, tr( "Tap here to update the entry's information." ) ); |
273 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestUpdate()) ); | 273 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestUpdate()) ); |
274 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); | 274 | grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 ); |
275 | } | 275 | } |
276 | 276 | ||
277 | void OIpkgConfigDlg::initProxyWidget() | 277 | void OIpkgConfigDlg::initProxyWidget() |
278 | { | 278 | { |
279 | m_proxyWidget = new QWidget( this ); | 279 | m_proxyWidget = new QWidget( this ); |
280 | 280 | ||
281 | // Initialize UI | 281 | // Initialize UI |
282 | QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); | 282 | QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); |
283 | QScrollView *sv = new QScrollView( m_proxyWidget ); | 283 | QScrollView *sv = new QScrollView( m_proxyWidget ); |
284 | vb->addWidget( sv, 0, 0 ); | 284 | vb->addWidget( sv, 0, 0 ); |
285 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 285 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
286 | sv->setFrameStyle( QFrame::NoFrame ); | 286 | sv->setFrameStyle( QFrame::NoFrame ); |
287 | QWidget *container = new QWidget( sv->viewport() ); | 287 | QWidget *container = new QWidget( sv->viewport() ); |
288 | sv->addChild( container ); | 288 | sv->addChild( container ); |
289 | QGridLayout *layout = new QGridLayout( container, 4, 2, 2, 4 ); | 289 | QGridLayout *layout = new QGridLayout( container, 4, 2, 2, 4 ); |
290 | 290 | ||
291 | // HTTP proxy server configuration | 291 | // HTTP proxy server configuration |
292 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "HTTP Proxy" ), container ); | 292 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "HTTP Proxy" ), container ); |
293 | grpbox->layout()->setSpacing( 2 ); | 293 | grpbox->layout()->setSpacing( 2 ); |
294 | grpbox->layout()->setMargin( 4 ); | 294 | grpbox->layout()->setMargin( 4 ); |
295 | layout->addMultiCellWidget( grpbox, 0, 0, 0, 1 ); | 295 | layout->addMultiCellWidget( grpbox, 0, 0, 0, 1 ); |
296 | QVBoxLayout *grplayout = new QVBoxLayout( grpbox->layout() ); | 296 | QVBoxLayout *grplayout = new QVBoxLayout( grpbox->layout() ); |
297 | m_proxyHttpServer = new QLineEdit( grpbox ); | 297 | m_proxyHttpServer = new QLineEdit( grpbox ); |
298 | QWhatsThis::add( m_proxyHttpServer, tr( "Enter the URL address of the HTTP proxy server here." ) ); | 298 | QWhatsThis::add( m_proxyHttpServer, tr( "Enter the URL address of the HTTP proxy server here." ) ); |
299 | grplayout->addWidget( m_proxyHttpServer ); | 299 | grplayout->addWidget( m_proxyHttpServer ); |
300 | m_proxyHttpActive = new QCheckBox( tr( "Enabled" ), grpbox ); | 300 | m_proxyHttpActive = new QCheckBox( tr( "Enabled" ), grpbox ); |
301 | QWhatsThis::add( m_proxyHttpActive, tr( "Tap here to enable or disable the HTTP proxy server." ) ); | 301 | QWhatsThis::add( m_proxyHttpActive, tr( "Tap here to enable or disable the HTTP proxy server." ) ); |
302 | grplayout->addWidget( m_proxyHttpActive ); | 302 | grplayout->addWidget( m_proxyHttpActive ); |
303 | 303 | ||
304 | // FTP proxy server configuration | 304 | // FTP proxy server configuration |
305 | grpbox = new QGroupBox( 0, Qt::Vertical, tr( "FTP Proxy" ), container ); | 305 | grpbox = new QGroupBox( 0, Qt::Vertical, tr( "FTP Proxy" ), container ); |
306 | grpbox->layout()->setSpacing( 2 ); | 306 | grpbox->layout()->setSpacing( 2 ); |
307 | grpbox->layout()->setMargin( 4 ); | 307 | grpbox->layout()->setMargin( 4 ); |
308 | layout->addMultiCellWidget( grpbox, 1, 1, 0, 1 ); | 308 | layout->addMultiCellWidget( grpbox, 1, 1, 0, 1 ); |
309 | grplayout = new QVBoxLayout( grpbox->layout() ); | 309 | grplayout = new QVBoxLayout( grpbox->layout() ); |
310 | m_proxyFtpServer = new QLineEdit( grpbox ); | 310 | m_proxyFtpServer = new QLineEdit( grpbox ); |
311 | QWhatsThis::add( m_proxyFtpServer, tr( "Enter the URL address of the FTP proxy server here." ) ); | 311 | QWhatsThis::add( m_proxyFtpServer, tr( "Enter the URL address of the FTP proxy server here." ) ); |
312 | grplayout->addWidget( m_proxyFtpServer ); | 312 | grplayout->addWidget( m_proxyFtpServer ); |
313 | m_proxyFtpActive = new QCheckBox( tr( "Enabled" ), grpbox ); | 313 | m_proxyFtpActive = new QCheckBox( tr( "Enabled" ), grpbox ); |
314 | QWhatsThis::add( m_proxyFtpActive, tr( "Tap here to enable or disable the FTP proxy server." ) ); | 314 | QWhatsThis::add( m_proxyFtpActive, tr( "Tap here to enable or disable the FTP proxy server." ) ); |
315 | grplayout->addWidget( m_proxyFtpActive ); | 315 | grplayout->addWidget( m_proxyFtpActive ); |
316 | 316 | ||
317 | // Proxy server username and password configuration | 317 | // Proxy server username and password configuration |
318 | QLabel *label = new QLabel( tr( "Username:" ), container ); | 318 | QLabel *label = new QLabel( tr( "Username:" ), container ); |
319 | QWhatsThis::add( label, tr( "Enter the username for the proxy servers here." ) ); | 319 | QWhatsThis::add( label, tr( "Enter the username for the proxy servers here." ) ); |
320 | layout->addWidget( label, 2, 0 ); | 320 | layout->addWidget( label, 2, 0 ); |
321 | m_proxyUsername = new QLineEdit( container ); | 321 | m_proxyUsername = new QLineEdit( container ); |
322 | QWhatsThis::add( m_proxyUsername, tr( "Enter the username for the proxy servers here." ) ); | 322 | QWhatsThis::add( m_proxyUsername, tr( "Enter the username for the proxy servers here." ) ); |
323 | layout->addWidget( m_proxyUsername, 2, 1 ); | 323 | layout->addWidget( m_proxyUsername, 2, 1 ); |
324 | 324 | ||
325 | label = new QLabel( tr( "Password:" ), container ); | 325 | label = new QLabel( tr( "Password:" ), container ); |
326 | QWhatsThis::add( label, tr( "Enter the password for the proxy servers here." ) ); | 326 | QWhatsThis::add( label, tr( "Enter the password for the proxy servers here." ) ); |
327 | layout->addWidget( label, 3, 0 ); | 327 | layout->addWidget( label, 3, 0 ); |
328 | m_proxyPassword = new QLineEdit( container ); | 328 | m_proxyPassword = new QLineEdit( container ); |
329 | QWhatsThis::add( m_proxyPassword, tr( "Enter the password for the proxy servers here." ) ); | 329 | QWhatsThis::add( m_proxyPassword, tr( "Enter the password for the proxy servers here." ) ); |
330 | layout->addWidget( m_proxyPassword, 3, 1 ); | 330 | layout->addWidget( m_proxyPassword, 3, 1 ); |
331 | } | 331 | } |
332 | 332 | ||
333 | void OIpkgConfigDlg::initOptionsWidget() | 333 | void OIpkgConfigDlg::initOptionsWidget() |
334 | { | 334 | { |
335 | m_optionsWidget = new QWidget( this ); | 335 | m_optionsWidget = new QWidget( this ); |
336 | 336 | ||
337 | // Initialize UI | 337 | // Initialize UI |
338 | QVBoxLayout *vb = new QVBoxLayout( m_optionsWidget ); | 338 | QVBoxLayout *vb = new QVBoxLayout( m_optionsWidget ); |
339 | QScrollView *sv = new QScrollView( m_optionsWidget ); | 339 | QScrollView *sv = new QScrollView( m_optionsWidget ); |
340 | vb->addWidget( sv, 0, 0 ); | 340 | vb->addWidget( sv, 0, 0 ); |
341 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 341 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
342 | sv->setFrameStyle( QFrame::NoFrame ); | 342 | sv->setFrameStyle( QFrame::NoFrame ); |