summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2002-10-02 19:23:45 (UTC)
committer benmeyer <benmeyer>2002-10-02 19:23:45 (UTC)
commit2d0c6327dd40ab6847ce055c40ca59893bc8b9b2 (patch) (unidiff)
tree260222139bb322f24d058cba10db0f7d1c43858f
parentc997983c6917885f6c487b942a9b294fa50ae618 (diff)
downloadopie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.zip
opie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.tar.gz
opie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.tar.bz2
Fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/interfaceinformation.ui11
-rw-r--r--noncore/net/networksetup/interfacesetup.ui13
-rw-r--r--noncore/net/networksetup/mainwindow.ui177
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp25
-rw-r--r--noncore/net/networksetup/mainwindowimp.h3
-rw-r--r--noncore/net/networksetup/namedialog.cpp61
-rw-r--r--noncore/net/networksetup/namedialog.h36
-rw-r--r--noncore/net/networksetup/networksetup.pro4
-rw-r--r--noncore/net/networksetup/systemadvanced.ui51
-rw-r--r--noncore/settings/networksettings/interfaceinformation.ui11
-rw-r--r--noncore/settings/networksettings/interfacesetup.ui13
-rw-r--r--noncore/settings/networksettings/mainwindow.ui177
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp25
-rw-r--r--noncore/settings/networksettings/mainwindowimp.h3
-rw-r--r--noncore/settings/networksettings/namedialog.cpp61
-rw-r--r--noncore/settings/networksettings/namedialog.h36
-rw-r--r--noncore/settings/networksettings/networksetup.pro4
-rw-r--r--noncore/settings/networksettings/systemadvanced.ui51
18 files changed, 322 insertions, 440 deletions
diff --git a/noncore/net/networksetup/interfaceinformation.ui b/noncore/net/networksetup/interfaceinformation.ui
index 8b6280d..76af19c 100644
--- a/noncore/net/networksetup/interfaceinformation.ui
+++ b/noncore/net/networksetup/interfaceinformation.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>203</width> 14 <width>199</width>
15 <height>244</height> 15 <height>244</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -333,6 +333,11 @@
333 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> 333 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
334 </image> 334 </image>
335</images> 335</images>
336<connections> 336<tabstops>
337</connections> 337 <tabstop>startButton</tabstop>
338 <tabstop>stopButton</tabstop>
339 <tabstop>refreshButton</tabstop>
340 <tabstop>restartButton</tabstop>
341 <tabstop>advancedButton</tabstop>
342</tabstops>
338</UI> 343</UI>
diff --git a/noncore/net/networksetup/interfacesetup.ui b/noncore/net/networksetup/interfacesetup.ui
index d367608..3db9a0b 100644
--- a/noncore/net/networksetup/interfacesetup.ui
+++ b/noncore/net/networksetup/interfacesetup.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>271</width> 14 <width>267</width>
15 <height>280</height> 15 <height>280</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -333,4 +333,15 @@
333 <slot>setDisabled(bool)</slot> 333 <slot>setDisabled(bool)</slot>
334 </connection> 334 </connection>
335</connections> 335</connections>
336<tabstops>
337 <tabstop>autoStart</tabstop>
338 <tabstop>profileCombo</tabstop>
339 <tabstop>dhcpCheckBox</tabstop>
340 <tabstop>leaseTime</tabstop>
341 <tabstop>ipAddressEdit</tabstop>
342 <tabstop>subnetMaskEdit</tabstop>
343 <tabstop>gatewayEdit</tabstop>
344 <tabstop>firstDNSLineEdit</tabstop>
345 <tabstop>secondDNSLineEdit</tabstop>
346</tabstops>
336</UI> 347</UI>
diff --git a/noncore/net/networksetup/mainwindow.ui b/noncore/net/networksetup/mainwindow.ui
index 3538aeb..bea999b 100644
--- a/noncore/net/networksetup/mainwindow.ui
+++ b/noncore/net/networksetup/mainwindow.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>217</width> 14 <width>230</width>
15 <height>289</height> 15 <height>289</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -208,28 +208,27 @@
208 <name>spacing</name> 208 <name>spacing</name>
209 <number>6</number> 209 <number>6</number>
210 </property> 210 </property>
211 <widget row="1" column="0" rowspan="1" colspan="3" > 211 <spacer row="7" column="2" >
212 <class>Line</class> 212 <property>
213 <property stdset="1">
214 <name>name</name> 213 <name>name</name>
215 <cstring>Line1</cstring> 214 <cstring>Spacer16</cstring>
216 </property> 215 </property>
217 <property stdset="1"> 216 <property stdset="1">
218 <name>orientation</name> 217 <name>orientation</name>
219 <enum>Horizontal</enum> 218 <enum>Vertical</enum>
220 </property> 219 </property>
221 </widget>
222 <widget row="0" column="0" >
223 <class>QLabel</class>
224 <property stdset="1"> 220 <property stdset="1">
225 <name>name</name> 221 <name>sizeType</name>
226 <cstring>TextLabel1</cstring> 222 <enum>Expanding</enum>
227 </property> 223 </property>
228 <property stdset="1"> 224 <property>
229 <name>text</name> 225 <name>sizeHint</name>
230 <string>Current Profile</string> 226 <size>
227 <width>20</width>
228 <height>20</height>
229 </size>
231 </property> 230 </property>
232 </widget> 231 </spacer>
233 <widget row="0" column="1" > 232 <widget row="0" column="1" >
234 <class>QLabel</class> 233 <class>QLabel</class>
235 <property stdset="1"> 234 <property stdset="1">
@@ -249,57 +248,48 @@
249 <string>All</string> 248 <string>All</string>
250 </property> 249 </property>
251 </widget> 250 </widget>
252 <spacer row="0" column="2" > 251 <widget row="3" column="2" >
253 <property> 252 <class>QPushButton</class>
253 <property stdset="1">
254 <name>name</name> 254 <name>name</name>
255 <cstring>Spacer2</cstring> 255 <cstring>setCurrentProfileButton</cstring>
256 </property> 256 </property>
257 <property stdset="1"> 257 <property stdset="1">
258 <name>orientation</name> 258 <name>text</name>
259 <enum>Horizontal</enum> 259 <string>&amp;Set Current</string>
260 </property> 260 </property>
261 </widget>
262 <widget row="5" column="0" rowspan="1" colspan="3" >
263 <class>Line</class>
261 <property stdset="1"> 264 <property stdset="1">
262 <name>sizeType</name>
263 <enum>Expanding</enum>
264 </property>
265 <property>
266 <name>sizeHint</name>
267 <size>
268 <width>20</width>
269 <height>20</height>
270 </size>
271 </property>
272 </spacer>
273 <spacer row="6" column="2" >
274 <property>
275 <name>name</name> 265 <name>name</name>
276 <cstring>Spacer16</cstring> 266 <cstring>Line6</cstring>
277 </property> 267 </property>
278 <property stdset="1"> 268 <property stdset="1">
279 <name>orientation</name> 269 <name>orientation</name>
280 <enum>Vertical</enum> 270 <enum>Horizontal</enum>
281 </property> 271 </property>
272 </widget>
273 <widget row="1" column="0" rowspan="1" colspan="3" >
274 <class>Line</class>
282 <property stdset="1"> 275 <property stdset="1">
283 <name>sizeType</name> 276 <name>name</name>
284 <enum>Expanding</enum> 277 <cstring>Line1</cstring>
285 </property> 278 </property>
286 <property> 279 <property stdset="1">
287 <name>sizeHint</name> 280 <name>orientation</name>
288 <size> 281 <enum>Horizontal</enum>
289 <width>20</width>
290 <height>20</height>
291 </size>
292 </property> 282 </property>
293 </spacer> 283 </widget>
294 <widget row="5" column="2" > 284 <widget row="0" column="0" >
295 <class>QPushButton</class> 285 <class>QLabel</class>
296 <property stdset="1"> 286 <property stdset="1">
297 <name>name</name> 287 <name>name</name>
298 <cstring>PushButton7</cstring> 288 <cstring>TextLabel1</cstring>
299 </property> 289 </property>
300 <property stdset="1"> 290 <property stdset="1">
301 <name>text</name> 291 <name>text</name>
302 <string>&amp;Set Current</string> 292 <string>Current Profile</string>
303 </property> 293 </property>
304 </widget> 294 </widget>
305 <widget row="4" column="2" > 295 <widget row="4" column="2" >
@@ -313,17 +303,34 @@
313 <string>&amp;Remove</string> 303 <string>&amp;Remove</string>
314 </property> 304 </property>
315 </widget> 305 </widget>
316 <widget row="3" column="2" > 306 <widget row="3" column="0" rowspan="2" colspan="2" >
317 <class>QPushButton</class> 307 <class>QListBox</class>
318 <property stdset="1"> 308 <property stdset="1">
319 <name>name</name> 309 <name>name</name>
320 <cstring>newProfileButton</cstring> 310 <cstring>profilesList</cstring>
311 </property>
312 </widget>
313 <spacer row="0" column="2" >
314 <property>
315 <name>name</name>
316 <cstring>Spacer2</cstring>
321 </property> 317 </property>
322 <property stdset="1"> 318 <property stdset="1">
323 <name>text</name> 319 <name>orientation</name>
324 <string>&amp;New</string> 320 <enum>Horizontal</enum>
325 </property> 321 </property>
326 </widget> 322 <property stdset="1">
323 <name>sizeType</name>
324 <enum>Expanding</enum>
325 </property>
326 <property>
327 <name>sizeHint</name>
328 <size>
329 <width>20</width>
330 <height>20</height>
331 </size>
332 </property>
333 </spacer>
327 <widget row="2" column="0" > 334 <widget row="2" column="0" >
328 <class>QLabel</class> 335 <class>QLabel</class>
329 <property stdset="1"> 336 <property stdset="1">
@@ -335,12 +342,55 @@
335 <string>Profiles</string> 342 <string>Profiles</string>
336 </property> 343 </property>
337 </widget> 344 </widget>
338 <widget row="3" column="0" rowspan="3" colspan="2" > 345 <widget row="6" column="0" rowspan="1" colspan="3" >
339 <class>QListBox</class> 346 <class>QLayoutWidget</class>
340 <property stdset="1"> 347 <property stdset="1">
341 <name>name</name> 348 <name>name</name>
342 <cstring>profilesList</cstring> 349 <cstring>Layout6</cstring>
343 </property> 350 </property>
351 <hbox>
352 <property stdset="1">
353 <name>margin</name>
354 <number>0</number>
355 </property>
356 <property stdset="1">
357 <name>spacing</name>
358 <number>6</number>
359 </property>
360 <widget>
361 <class>QLabel</class>
362 <property stdset="1">
363 <name>name</name>
364 <cstring>TextLabel1_3</cstring>
365 </property>
366 <property stdset="1">
367 <name>text</name>
368 <string>New Profile</string>
369 </property>
370 </widget>
371 <widget>
372 <class>QLineEdit</class>
373 <property stdset="1">
374 <name>name</name>
375 <cstring>newProfile</cstring>
376 </property>
377 </widget>
378 <widget>
379 <class>QPushButton</class>
380 <property stdset="1">
381 <name>name</name>
382 <cstring>newProfileButton</cstring>
383 </property>
384 <property stdset="1">
385 <name>enabled</name>
386 <bool>false</bool>
387 </property>
388 <property stdset="1">
389 <name>text</name>
390 <string>&amp;Add</string>
391 </property>
392 </widget>
393 </hbox>
344 </widget> 394 </widget>
345 </grid> 395 </grid>
346 </widget> 396 </widget>
@@ -369,4 +419,17 @@
369 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> 419 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
370 </image> 420 </image>
371</images> 421</images>
422<tabstops>
423 <tabstop>tabWidget</tabstop>
424 <tabstop>connectionList</tabstop>
425 <tabstop>informationConnectionButton</tabstop>
426 <tabstop>configureConnectionButton</tabstop>
427 <tabstop>addConnectionButton</tabstop>
428 <tabstop>removeConnectionButton</tabstop>
429 <tabstop>profilesList</tabstop>
430 <tabstop>setCurrentProfileButton</tabstop>
431 <tabstop>removeProfileButton</tabstop>
432 <tabstop>newProfile</tabstop>
433 <tabstop>newProfileButton</tabstop>
434</tabstops>
372</UI> 435</UI>
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp
index e9429e3..e895971 100644
--- a/noncore/net/networksetup/mainwindowimp.cpp
+++ b/noncore/net/networksetup/mainwindowimp.cpp
@@ -5,11 +5,11 @@
5#include "module.h" 5#include "module.h"
6 6
7#include "kprocess.h" 7#include "kprocess.h"
8#include "namedialog.h"
9 8
10#include <qpushbutton.h> 9#include <qpushbutton.h>
11#include <qtabwidget.h> 10#include <qtabwidget.h>
12#include <qlistbox.h> 11#include <qlistbox.h>
12#include <qlineedit.h>
13#include <qlistview.h> 13#include <qlistview.h>
14#include <qheader.h> 14#include <qheader.h>
15#include <qlabel.h> 15#include <qlabel.h>
@@ -37,8 +37,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
37 37
38 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); 38 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
39 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); 39 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
40 connect(profilesList, SIGNAL(highlighted(const QString&)), this, SLOT(changeProfile(const QString&))); 40 connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
41 41
42 connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
42 // Load connections. 43 // Load connections.
43 loadModules(QDir::homeDirPath() + "/.networksetup/plugins"); 44 loadModules(QDir::homeDirPath() + "/.networksetup/plugins");
44 getInterfaceList(); 45 getInterfaceList();
@@ -59,6 +60,7 @@ MainWindowImp::~MainWindowImp(){
59 // Save profiles. 60 // Save profiles.
60 if(profiles.count() > 1){ 61 if(profiles.count() > 1){
61 Config cfg("NetworkSetup"); 62 Config cfg("NetworkSetup");
63 cfg.setGroup("General");
62 cfg.writeEntry("Profiles", profiles.join(" ")); 64 cfg.writeEntry("Profiles", profiles.join(" "));
63 } 65 }
64 // Delete Modules and Libraries 66 // Delete Modules and Libraries
@@ -372,17 +374,20 @@ void MainWindowImp::updateInterface(Interface *i){
372 item->setText(3, (i->getStatus()) ? i->getIp() : QString("")); 374 item->setText(3, (i->getStatus()) ? i->getIp() : QString(""));
373} 375}
374 376
377void MainWindowImp::newProfileChanged(const QString& newText){
378 if(newText.length() > 0)
379 newProfileButton->setEnabled(true);
380 else
381 newProfileButton->setEnabled(false);
382}
383
375/** 384/**
376 * Adds a new profile to the list of profiles. 385 * Adds a new profile to the list of profiles.
377 * Don't add profiles that already exists. 386 * Don't add profiles that already exists.
378 * Appends to the list and QStringList 387 * Appends to the list and QStringList
379 */ 388 */
380void MainWindowImp::addProfile(){ 389void MainWindowImp::addProfile(){
381 NameDialog foo(this, "namedialog", true); 390 QString newProfileName = newProfile->text();
382 QString newProfileName = foo.go();
383 if(newProfileName.length() == 0)
384 return;
385
386 if(profiles.grep(newProfileName).count() > 0){ 391 if(profiles.grep(newProfileName).count() > 0){
387 QMessageBox::information(this, "Can't Add","Profile already exists.", "Ok"); 392 QMessageBox::information(this, "Can't Add","Profile already exists.", "Ok");
388 return; 393 return;
@@ -414,8 +419,8 @@ void MainWindowImp::removeProfile(){
414 * A new profile has been selected, change. 419 * A new profile has been selected, change.
415 * @param newProfile the new profile. 420 * @param newProfile the new profile.
416 */ 421 */
417void MainWindowImp::changeProfile(const QString& newProfile){ 422void MainWindowImp::changeProfile(){
418 currentProfileLabel->setText(newProfile); 423 currentProfileLabel->setText(profilesList->text(profilesList->currentItem()));
419} 424}
420 425
421// mainwindowimp.cpp 426// mainwindowimp.cpp
diff --git a/noncore/net/networksetup/mainwindowimp.h b/noncore/net/networksetup/mainwindowimp.h
index 629b758..c67c161 100644
--- a/noncore/net/networksetup/mainwindowimp.h
+++ b/noncore/net/networksetup/mainwindowimp.h
@@ -28,9 +28,10 @@ private slots:
28 28
29 void addProfile(); 29 void addProfile();
30 void removeProfile(); 30 void removeProfile();
31 void changeProfile(const QString&); 31 void changeProfile();
32 32
33 void updateInterface(Interface *i); 33 void updateInterface(Interface *i);
34 void newProfileChanged(const QString& newText);
34 35
35private: 36private:
36 void loadModules(QString path); 37 void loadModules(QString path);
diff --git a/noncore/net/networksetup/namedialog.cpp b/noncore/net/networksetup/namedialog.cpp
deleted file mode 100644
index c5efa37..0000000
--- a/noncore/net/networksetup/namedialog.cpp
+++ b/dev/null
@@ -1,61 +0,0 @@
1/****************************************************************************
2** Form implementation generated from reading ui file 'namedialog.ui'
3**
4** Created: Sat Dec 15 04:36:20 2001
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#include "namedialog.h"
10
11#include <qlineedit.h>
12#include <qpushbutton.h>
13#include <qlayout.h>
14#include <qvariant.h>
15#include <qtooltip.h>
16#include <qwhatsthis.h>
17
18/*
19 * Constructs a NameDialog which is a child of 'parent', with the
20 * name 'name' and widget flags set to 'f'
21 *
22 * The dialog will by default be modeless, unless you set 'modal' to
23 * TRUE to construct a modal dialog.
24 */
25NameDialog::NameDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
26 : QDialog( parent, name, modal, fl )
27{
28 if ( !name )
29 setName( "NameDialog" );
30 resize( 176, 65 );
31 setCaption( tr( "Enter A Name" ) );
32 NameDialogLayout = new QGridLayout( this );
33 NameDialogLayout->setSpacing( 6 );
34 NameDialogLayout->setMargin( 5 );
35
36 Name = new QLineEdit( this, "Name" );
37
38 NameDialogLayout->addMultiCellWidget( Name, 0, 0, 0, 1 );
39
40 cancel = new QPushButton( this, "Cancel" );
41 cancel->setText( tr( "&Cancel" ) );
42
43 NameDialogLayout->addWidget( cancel, 1, 1 );
44
45 ok = new QPushButton( this, "ok" );
46 ok->setText( tr( "&Ok" ) );
47
48 NameDialogLayout->addWidget( ok, 1, 0 );
49
50 connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
51 connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
52 connect( Name, SIGNAL(returnPressed () ), this, SLOT(accept() ) );
53}
54
55QString NameDialog::go(){
56 if( exec() ) //pressed OK
57 return (Name->text());
58 else //pressed cancel
59 return QString();
60}
61
diff --git a/noncore/net/networksetup/namedialog.h b/noncore/net/networksetup/namedialog.h
deleted file mode 100644
index 4c4e149..0000000
--- a/noncore/net/networksetup/namedialog.h
+++ b/dev/null
@@ -1,36 +0,0 @@
1/****************************************************************************
2** Form interface generated from reading ui file 'namedialog.ui'
3**
4** Created: Sat Dec 15 04:36:14 2001
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#ifndef NAMEDIALOG_H
10#define NAMEDIALOG_H
11
12#include <qvariant.h>
13#include <qdialog.h>
14class QVBoxLayout;
15class QHBoxLayout;
16class QGridLayout;
17class QLineEdit;
18class QPushButton;
19
20class NameDialog : public QDialog
21{
22 Q_OBJECT
23
24public:
25 NameDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
26
27 QLineEdit* Name;
28 QPushButton* cancel;
29 QPushButton* ok;
30 QString go();
31
32protected:
33 QGridLayout* NameDialogLayout;
34};
35
36#endif // NAMEDIALOG_H
diff --git a/noncore/net/networksetup/networksetup.pro b/noncore/net/networksetup/networksetup.pro
index e146eb4..ba70180 100644
--- a/noncore/net/networksetup/networksetup.pro
+++ b/noncore/net/networksetup/networksetup.pro
@@ -1,8 +1,8 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 #CONFIG = qt warn_on debug 2 #CONFIG = qt warn_on debug
3 CONFIG = qt warn_on release 3 CONFIG = qt warn_on release
4 HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h namedialog.h 4 HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h
5 SOURCES = main.cpp namedialog.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp 5 SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp
6 #INCLUDEPATH+= $(QPEDIR)/include 6 #INCLUDEPATH+= $(QPEDIR)/include
7 #DEPENDPATH+= $(QPEDIR)/include 7 #DEPENDPATH+= $(QPEDIR)/include
8LIBS += -lqpe 8LIBS += -lqpe
diff --git a/noncore/net/networksetup/systemadvanced.ui b/noncore/net/networksetup/systemadvanced.ui
index 6ea192c..cd7ac61 100644
--- a/noncore/net/networksetup/systemadvanced.ui
+++ b/noncore/net/networksetup/systemadvanced.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>222</width> 14 <width>218</width>
15 <height>289</height> 15 <height>289</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -393,51 +393,4 @@
393 </property> 393 </property>
394 </widget> 394 </widget>
395 <spacer row="2" column="1" > 395 <spacer row="2" column="1" >
396 <property> 396 \ No newline at end of file
397 <name>name</name>
398 <cstring>Spacer15</cstring>
399 </property>
400 <property stdset="1">
401 <name>orientation</name>
402 <enum>Vertical</enum>
403 </property>
404 <property stdset="1">
405 <name>sizeType</name>
406 <enum>Expanding</enum>
407 </property>
408 <property>
409 <name>sizeHint</name>
410 <size>
411 <width>20</width>
412 <height>20</height>
413 </size>
414 </property>
415 </spacer>
416 </grid>
417 </widget>
418 </widget>
419 </vbox>
420</widget>
421<customwidgets>
422 <customwidget>
423 <class>QWidget</class>
424 <header location="local">qwidget.h</header>
425 <sizehint>
426 <width>100</width>
427 <height>100</height>
428 </sizehint>
429 <container>0</container>
430 <sizepolicy>
431 <hordata>7</hordata>
432 <verdata>7</verdata>
433 </sizepolicy>
434 <pixmap>image0</pixmap>
435 </customwidget>
436</customwidgets>
437<images>
438 <image>
439 <name>image0</name>
440 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
441 </image>
442</images>
443</UI>
diff --git a/noncore/settings/networksettings/interfaceinformation.ui b/noncore/settings/networksettings/interfaceinformation.ui
index 8b6280d..76af19c 100644
--- a/noncore/settings/networksettings/interfaceinformation.ui
+++ b/noncore/settings/networksettings/interfaceinformation.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>203</width> 14 <width>199</width>
15 <height>244</height> 15 <height>244</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -333,6 +333,11 @@
333 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> 333 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
334 </image> 334 </image>
335</images> 335</images>
336<connections> 336<tabstops>
337</connections> 337 <tabstop>startButton</tabstop>
338 <tabstop>stopButton</tabstop>
339 <tabstop>refreshButton</tabstop>
340 <tabstop>restartButton</tabstop>
341 <tabstop>advancedButton</tabstop>
342</tabstops>
338</UI> 343</UI>
diff --git a/noncore/settings/networksettings/interfacesetup.ui b/noncore/settings/networksettings/interfacesetup.ui
index d367608..3db9a0b 100644
--- a/noncore/settings/networksettings/interfacesetup.ui
+++ b/noncore/settings/networksettings/interfacesetup.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>271</width> 14 <width>267</width>
15 <height>280</height> 15 <height>280</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -333,4 +333,15 @@
333 <slot>setDisabled(bool)</slot> 333 <slot>setDisabled(bool)</slot>
334 </connection> 334 </connection>
335</connections> 335</connections>
336<tabstops>
337 <tabstop>autoStart</tabstop>
338 <tabstop>profileCombo</tabstop>
339 <tabstop>dhcpCheckBox</tabstop>
340 <tabstop>leaseTime</tabstop>
341 <tabstop>ipAddressEdit</tabstop>
342 <tabstop>subnetMaskEdit</tabstop>
343 <tabstop>gatewayEdit</tabstop>
344 <tabstop>firstDNSLineEdit</tabstop>
345 <tabstop>secondDNSLineEdit</tabstop>
346</tabstops>
336</UI> 347</UI>
diff --git a/noncore/settings/networksettings/mainwindow.ui b/noncore/settings/networksettings/mainwindow.ui
index 3538aeb..bea999b 100644
--- a/noncore/settings/networksettings/mainwindow.ui
+++ b/noncore/settings/networksettings/mainwindow.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>217</width> 14 <width>230</width>
15 <height>289</height> 15 <height>289</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -208,28 +208,27 @@
208 <name>spacing</name> 208 <name>spacing</name>
209 <number>6</number> 209 <number>6</number>
210 </property> 210 </property>
211 <widget row="1" column="0" rowspan="1" colspan="3" > 211 <spacer row="7" column="2" >
212 <class>Line</class> 212 <property>
213 <property stdset="1">
214 <name>name</name> 213 <name>name</name>
215 <cstring>Line1</cstring> 214 <cstring>Spacer16</cstring>
216 </property> 215 </property>
217 <property stdset="1"> 216 <property stdset="1">
218 <name>orientation</name> 217 <name>orientation</name>
219 <enum>Horizontal</enum> 218 <enum>Vertical</enum>
220 </property> 219 </property>
221 </widget>
222 <widget row="0" column="0" >
223 <class>QLabel</class>
224 <property stdset="1"> 220 <property stdset="1">
225 <name>name</name> 221 <name>sizeType</name>
226 <cstring>TextLabel1</cstring> 222 <enum>Expanding</enum>
227 </property> 223 </property>
228 <property stdset="1"> 224 <property>
229 <name>text</name> 225 <name>sizeHint</name>
230 <string>Current Profile</string> 226 <size>
227 <width>20</width>
228 <height>20</height>
229 </size>
231 </property> 230 </property>
232 </widget> 231 </spacer>
233 <widget row="0" column="1" > 232 <widget row="0" column="1" >
234 <class>QLabel</class> 233 <class>QLabel</class>
235 <property stdset="1"> 234 <property stdset="1">
@@ -249,57 +248,48 @@
249 <string>All</string> 248 <string>All</string>
250 </property> 249 </property>
251 </widget> 250 </widget>
252 <spacer row="0" column="2" > 251 <widget row="3" column="2" >
253 <property> 252 <class>QPushButton</class>
253 <property stdset="1">
254 <name>name</name> 254 <name>name</name>
255 <cstring>Spacer2</cstring> 255 <cstring>setCurrentProfileButton</cstring>
256 </property> 256 </property>
257 <property stdset="1"> 257 <property stdset="1">
258 <name>orientation</name> 258 <name>text</name>
259 <enum>Horizontal</enum> 259 <string>&amp;Set Current</string>
260 </property> 260 </property>
261 </widget>
262 <widget row="5" column="0" rowspan="1" colspan="3" >
263 <class>Line</class>
261 <property stdset="1"> 264 <property stdset="1">
262 <name>sizeType</name>
263 <enum>Expanding</enum>
264 </property>
265 <property>
266 <name>sizeHint</name>
267 <size>
268 <width>20</width>
269 <height>20</height>
270 </size>
271 </property>
272 </spacer>
273 <spacer row="6" column="2" >
274 <property>
275 <name>name</name> 265 <name>name</name>
276 <cstring>Spacer16</cstring> 266 <cstring>Line6</cstring>
277 </property> 267 </property>
278 <property stdset="1"> 268 <property stdset="1">
279 <name>orientation</name> 269 <name>orientation</name>
280 <enum>Vertical</enum> 270 <enum>Horizontal</enum>
281 </property> 271 </property>
272 </widget>
273 <widget row="1" column="0" rowspan="1" colspan="3" >
274 <class>Line</class>
282 <property stdset="1"> 275 <property stdset="1">
283 <name>sizeType</name> 276 <name>name</name>
284 <enum>Expanding</enum> 277 <cstring>Line1</cstring>
285 </property> 278 </property>
286 <property> 279 <property stdset="1">
287 <name>sizeHint</name> 280 <name>orientation</name>
288 <size> 281 <enum>Horizontal</enum>
289 <width>20</width>
290 <height>20</height>
291 </size>
292 </property> 282 </property>
293 </spacer> 283 </widget>
294 <widget row="5" column="2" > 284 <widget row="0" column="0" >
295 <class>QPushButton</class> 285 <class>QLabel</class>
296 <property stdset="1"> 286 <property stdset="1">
297 <name>name</name> 287 <name>name</name>
298 <cstring>PushButton7</cstring> 288 <cstring>TextLabel1</cstring>
299 </property> 289 </property>
300 <property stdset="1"> 290 <property stdset="1">
301 <name>text</name> 291 <name>text</name>
302 <string>&amp;Set Current</string> 292 <string>Current Profile</string>
303 </property> 293 </property>
304 </widget> 294 </widget>
305 <widget row="4" column="2" > 295 <widget row="4" column="2" >
@@ -313,17 +303,34 @@
313 <string>&amp;Remove</string> 303 <string>&amp;Remove</string>
314 </property> 304 </property>
315 </widget> 305 </widget>
316 <widget row="3" column="2" > 306 <widget row="3" column="0" rowspan="2" colspan="2" >
317 <class>QPushButton</class> 307 <class>QListBox</class>
318 <property stdset="1"> 308 <property stdset="1">
319 <name>name</name> 309 <name>name</name>
320 <cstring>newProfileButton</cstring> 310 <cstring>profilesList</cstring>
311 </property>
312 </widget>
313 <spacer row="0" column="2" >
314 <property>
315 <name>name</name>
316 <cstring>Spacer2</cstring>
321 </property> 317 </property>
322 <property stdset="1"> 318 <property stdset="1">
323 <name>text</name> 319 <name>orientation</name>
324 <string>&amp;New</string> 320 <enum>Horizontal</enum>
325 </property> 321 </property>
326 </widget> 322 <property stdset="1">
323 <name>sizeType</name>
324 <enum>Expanding</enum>
325 </property>
326 <property>
327 <name>sizeHint</name>
328 <size>
329 <width>20</width>
330 <height>20</height>
331 </size>
332 </property>
333 </spacer>
327 <widget row="2" column="0" > 334 <widget row="2" column="0" >
328 <class>QLabel</class> 335 <class>QLabel</class>
329 <property stdset="1"> 336 <property stdset="1">
@@ -335,12 +342,55 @@
335 <string>Profiles</string> 342 <string>Profiles</string>
336 </property> 343 </property>
337 </widget> 344 </widget>
338 <widget row="3" column="0" rowspan="3" colspan="2" > 345 <widget row="6" column="0" rowspan="1" colspan="3" >
339 <class>QListBox</class> 346 <class>QLayoutWidget</class>
340 <property stdset="1"> 347 <property stdset="1">
341 <name>name</name> 348 <name>name</name>
342 <cstring>profilesList</cstring> 349 <cstring>Layout6</cstring>
343 </property> 350 </property>
351 <hbox>
352 <property stdset="1">
353 <name>margin</name>
354 <number>0</number>
355 </property>
356 <property stdset="1">
357 <name>spacing</name>
358 <number>6</number>
359 </property>
360 <widget>
361 <class>QLabel</class>
362 <property stdset="1">
363 <name>name</name>
364 <cstring>TextLabel1_3</cstring>
365 </property>
366 <property stdset="1">
367 <name>text</name>
368 <string>New Profile</string>
369 </property>
370 </widget>
371 <widget>
372 <class>QLineEdit</class>
373 <property stdset="1">
374 <name>name</name>
375 <cstring>newProfile</cstring>
376 </property>
377 </widget>
378 <widget>
379 <class>QPushButton</class>
380 <property stdset="1">
381 <name>name</name>
382 <cstring>newProfileButton</cstring>
383 </property>
384 <property stdset="1">
385 <name>enabled</name>
386 <bool>false</bool>
387 </property>
388 <property stdset="1">
389 <name>text</name>
390 <string>&amp;Add</string>
391 </property>
392 </widget>
393 </hbox>
344 </widget> 394 </widget>
345 </grid> 395 </grid>
346 </widget> 396 </widget>
@@ -369,4 +419,17 @@
369 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> 419 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
370 </image> 420 </image>
371</images> 421</images>
422<tabstops>
423 <tabstop>tabWidget</tabstop>
424 <tabstop>connectionList</tabstop>
425 <tabstop>informationConnectionButton</tabstop>
426 <tabstop>configureConnectionButton</tabstop>
427 <tabstop>addConnectionButton</tabstop>
428 <tabstop>removeConnectionButton</tabstop>
429 <tabstop>profilesList</tabstop>
430 <tabstop>setCurrentProfileButton</tabstop>
431 <tabstop>removeProfileButton</tabstop>
432 <tabstop>newProfile</tabstop>
433 <tabstop>newProfileButton</tabstop>
434</tabstops>
372</UI> 435</UI>
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index e9429e3..e895971 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -5,11 +5,11 @@
5#include "module.h" 5#include "module.h"
6 6
7#include "kprocess.h" 7#include "kprocess.h"
8#include "namedialog.h"
9 8
10#include <qpushbutton.h> 9#include <qpushbutton.h>
11#include <qtabwidget.h> 10#include <qtabwidget.h>
12#include <qlistbox.h> 11#include <qlistbox.h>
12#include <qlineedit.h>
13#include <qlistview.h> 13#include <qlistview.h>
14#include <qheader.h> 14#include <qheader.h>
15#include <qlabel.h> 15#include <qlabel.h>
@@ -37,8 +37,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
37 37
38 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); 38 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
39 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); 39 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
40 connect(profilesList, SIGNAL(highlighted(const QString&)), this, SLOT(changeProfile(const QString&))); 40 connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
41 41
42 connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
42 // Load connections. 43 // Load connections.
43 loadModules(QDir::homeDirPath() + "/.networksetup/plugins"); 44 loadModules(QDir::homeDirPath() + "/.networksetup/plugins");
44 getInterfaceList(); 45 getInterfaceList();
@@ -59,6 +60,7 @@ MainWindowImp::~MainWindowImp(){
59 // Save profiles. 60 // Save profiles.
60 if(profiles.count() > 1){ 61 if(profiles.count() > 1){
61 Config cfg("NetworkSetup"); 62 Config cfg("NetworkSetup");
63 cfg.setGroup("General");
62 cfg.writeEntry("Profiles", profiles.join(" ")); 64 cfg.writeEntry("Profiles", profiles.join(" "));
63 } 65 }
64 // Delete Modules and Libraries 66 // Delete Modules and Libraries
@@ -372,17 +374,20 @@ void MainWindowImp::updateInterface(Interface *i){
372 item->setText(3, (i->getStatus()) ? i->getIp() : QString("")); 374 item->setText(3, (i->getStatus()) ? i->getIp() : QString(""));
373} 375}
374 376
377void MainWindowImp::newProfileChanged(const QString& newText){
378 if(newText.length() > 0)
379 newProfileButton->setEnabled(true);
380 else
381 newProfileButton->setEnabled(false);
382}
383
375/** 384/**
376 * Adds a new profile to the list of profiles. 385 * Adds a new profile to the list of profiles.
377 * Don't add profiles that already exists. 386 * Don't add profiles that already exists.
378 * Appends to the list and QStringList 387 * Appends to the list and QStringList
379 */ 388 */
380void MainWindowImp::addProfile(){ 389void MainWindowImp::addProfile(){
381 NameDialog foo(this, "namedialog", true); 390 QString newProfileName = newProfile->text();
382 QString newProfileName = foo.go();
383 if(newProfileName.length() == 0)
384 return;
385
386 if(profiles.grep(newProfileName).count() > 0){ 391 if(profiles.grep(newProfileName).count() > 0){
387 QMessageBox::information(this, "Can't Add","Profile already exists.", "Ok"); 392 QMessageBox::information(this, "Can't Add","Profile already exists.", "Ok");
388 return; 393 return;
@@ -414,8 +419,8 @@ void MainWindowImp::removeProfile(){
414 * A new profile has been selected, change. 419 * A new profile has been selected, change.
415 * @param newProfile the new profile. 420 * @param newProfile the new profile.
416 */ 421 */
417void MainWindowImp::changeProfile(const QString& newProfile){ 422void MainWindowImp::changeProfile(){
418 currentProfileLabel->setText(newProfile); 423 currentProfileLabel->setText(profilesList->text(profilesList->currentItem()));
419} 424}
420 425
421// mainwindowimp.cpp 426// mainwindowimp.cpp
diff --git a/noncore/settings/networksettings/mainwindowimp.h b/noncore/settings/networksettings/mainwindowimp.h
index 629b758..c67c161 100644
--- a/noncore/settings/networksettings/mainwindowimp.h
+++ b/noncore/settings/networksettings/mainwindowimp.h
@@ -28,9 +28,10 @@ private slots:
28 28
29 void addProfile(); 29 void addProfile();
30 void removeProfile(); 30 void removeProfile();
31 void changeProfile(const QString&); 31 void changeProfile();
32 32
33 void updateInterface(Interface *i); 33 void updateInterface(Interface *i);
34 void newProfileChanged(const QString& newText);
34 35
35private: 36private:
36 void loadModules(QString path); 37 void loadModules(QString path);
diff --git a/noncore/settings/networksettings/namedialog.cpp b/noncore/settings/networksettings/namedialog.cpp
deleted file mode 100644
index c5efa37..0000000
--- a/noncore/settings/networksettings/namedialog.cpp
+++ b/dev/null
@@ -1,61 +0,0 @@
1/****************************************************************************
2** Form implementation generated from reading ui file 'namedialog.ui'
3**
4** Created: Sat Dec 15 04:36:20 2001
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#include "namedialog.h"
10
11#include <qlineedit.h>
12#include <qpushbutton.h>
13#include <qlayout.h>
14#include <qvariant.h>
15#include <qtooltip.h>
16#include <qwhatsthis.h>
17
18/*
19 * Constructs a NameDialog which is a child of 'parent', with the
20 * name 'name' and widget flags set to 'f'
21 *
22 * The dialog will by default be modeless, unless you set 'modal' to
23 * TRUE to construct a modal dialog.
24 */
25NameDialog::NameDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
26 : QDialog( parent, name, modal, fl )
27{
28 if ( !name )
29 setName( "NameDialog" );
30 resize( 176, 65 );
31 setCaption( tr( "Enter A Name" ) );
32 NameDialogLayout = new QGridLayout( this );
33 NameDialogLayout->setSpacing( 6 );
34 NameDialogLayout->setMargin( 5 );
35
36 Name = new QLineEdit( this, "Name" );
37
38 NameDialogLayout->addMultiCellWidget( Name, 0, 0, 0, 1 );
39
40 cancel = new QPushButton( this, "Cancel" );
41 cancel->setText( tr( "&Cancel" ) );
42
43 NameDialogLayout->addWidget( cancel, 1, 1 );
44
45 ok = new QPushButton( this, "ok" );
46 ok->setText( tr( "&Ok" ) );
47
48 NameDialogLayout->addWidget( ok, 1, 0 );
49
50 connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
51 connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
52 connect( Name, SIGNAL(returnPressed () ), this, SLOT(accept() ) );
53}
54
55QString NameDialog::go(){
56 if( exec() ) //pressed OK
57 return (Name->text());
58 else //pressed cancel
59 return QString();
60}
61
diff --git a/noncore/settings/networksettings/namedialog.h b/noncore/settings/networksettings/namedialog.h
deleted file mode 100644
index 4c4e149..0000000
--- a/noncore/settings/networksettings/namedialog.h
+++ b/dev/null
@@ -1,36 +0,0 @@
1/****************************************************************************
2** Form interface generated from reading ui file 'namedialog.ui'
3**
4** Created: Sat Dec 15 04:36:14 2001
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#ifndef NAMEDIALOG_H
10#define NAMEDIALOG_H
11
12#include <qvariant.h>
13#include <qdialog.h>
14class QVBoxLayout;
15class QHBoxLayout;
16class QGridLayout;
17class QLineEdit;
18class QPushButton;
19
20class NameDialog : public QDialog
21{
22 Q_OBJECT
23
24public:
25 NameDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
26
27 QLineEdit* Name;
28 QPushButton* cancel;
29 QPushButton* ok;
30 QString go();
31
32protected:
33 QGridLayout* NameDialogLayout;
34};
35
36#endif // NAMEDIALOG_H
diff --git a/noncore/settings/networksettings/networksetup.pro b/noncore/settings/networksettings/networksetup.pro
index e146eb4..ba70180 100644
--- a/noncore/settings/networksettings/networksetup.pro
+++ b/noncore/settings/networksettings/networksetup.pro
@@ -1,8 +1,8 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 #CONFIG = qt warn_on debug 2 #CONFIG = qt warn_on debug
3 CONFIG = qt warn_on release 3 CONFIG = qt warn_on release
4 HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h namedialog.h 4 HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h
5 SOURCES = main.cpp namedialog.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp 5 SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp
6 #INCLUDEPATH+= $(QPEDIR)/include 6 #INCLUDEPATH+= $(QPEDIR)/include
7 #DEPENDPATH+= $(QPEDIR)/include 7 #DEPENDPATH+= $(QPEDIR)/include
8LIBS += -lqpe 8LIBS += -lqpe
diff --git a/noncore/settings/networksettings/systemadvanced.ui b/noncore/settings/networksettings/systemadvanced.ui
index 6ea192c..cd7ac61 100644
--- a/noncore/settings/networksettings/systemadvanced.ui
+++ b/noncore/settings/networksettings/systemadvanced.ui
@@ -11,7 +11,7 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>222</width> 14 <width>218</width>
15 <height>289</height> 15 <height>289</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -393,51 +393,4 @@
393 </property> 393 </property>
394 </widget> 394 </widget>
395 <spacer row="2" column="1" > 395 <spacer row="2" column="1" >
396 <property> 396 \ No newline at end of file
397 <name>name</name>
398 <cstring>Spacer15</cstring>
399 </property>
400 <property stdset="1">
401 <name>orientation</name>
402 <enum>Vertical</enum>
403 </property>
404 <property stdset="1">
405 <name>sizeType</name>
406 <enum>Expanding</enum>
407 </property>
408 <property>
409 <name>sizeHint</name>
410 <size>
411 <width>20</width>
412 <height>20</height>
413 </size>
414 </property>
415 </spacer>
416 </grid>
417 </widget>
418 </widget>
419 </vbox>
420</widget>
421<customwidgets>
422 <customwidget>
423 <class>QWidget</class>
424 <header location="local">qwidget.h</header>
425 <sizehint>
426 <width>100</width>
427 <height>100</height>
428 </sizehint>
429 <container>0</container>
430 <sizepolicy>
431 <hordata>7</hordata>
432 <verdata>7</verdata>
433 </sizepolicy>
434 <pixmap>image0</pixmap>
435 </customwidget>
436</customwidgets>
437<images>
438 <image>
439 <name>image0</name>
440 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
441 </image>
442</images>
443</UI>