summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2002-10-02 19:23:45 (UTC)
committer benmeyer <benmeyer>2002-10-02 19:23:45 (UTC)
commit2d0c6327dd40ab6847ce055c40ca59893bc8b9b2 (patch) (side-by-side diff)
tree260222139bb322f24d058cba10db0f7d1c43858f
parentc997983c6917885f6c487b942a9b294fa50ae618 (diff)
downloadopie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.zip
opie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.tar.gz
opie-2d0c6327dd40ab6847ce055c40ca59893bc8b9b2.tar.bz2
Fixes
Diffstat (more/less context) (show 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.ui171
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp23
-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.ui171
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp23
-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, 314 insertions, 432 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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>203</width>
+ <width>199</width>
<height>244</height>
@@ -335,4 +335,9 @@
</images>
-<connections>
-</connections>
+<tabstops>
+ <tabstop>startButton</tabstop>
+ <tabstop>stopButton</tabstop>
+ <tabstop>refreshButton</tabstop>
+ <tabstop>restartButton</tabstop>
+ <tabstop>advancedButton</tabstop>
+</tabstops>
</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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>271</width>
+ <width>267</width>
<height>280</height>
@@ -335,2 +335,13 @@
</connections>
+<tabstops>
+ <tabstop>autoStart</tabstop>
+ <tabstop>profileCombo</tabstop>
+ <tabstop>dhcpCheckBox</tabstop>
+ <tabstop>leaseTime</tabstop>
+ <tabstop>ipAddressEdit</tabstop>
+ <tabstop>subnetMaskEdit</tabstop>
+ <tabstop>gatewayEdit</tabstop>
+ <tabstop>firstDNSLineEdit</tabstop>
+ <tabstop>secondDNSLineEdit</tabstop>
+</tabstops>
</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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>217</width>
+ <width>230</width>
<height>289</height>
@@ -210,7 +210,6 @@
</property>
- <widget row="1" column="0" rowspan="1" colspan="3" >
- <class>Line</class>
- <property stdset="1">
+ <spacer row="7" column="2" >
+ <property>
<name>name</name>
- <cstring>Line1</cstring>
+ <cstring>Spacer16</cstring>
</property>
@@ -218,16 +217,16 @@
<name>orientation</name>
- <enum>Horizontal</enum>
+ <enum>Vertical</enum>
</property>
- </widget>
- <widget row="0" column="0" >
- <class>QLabel</class>
<property stdset="1">
- <name>name</name>
- <cstring>TextLabel1</cstring>
+ <name>sizeType</name>
+ <enum>Expanding</enum>
</property>
- <property stdset="1">
- <name>text</name>
- <string>Current Profile</string>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
</property>
- </widget>
+ </spacer>
<widget row="0" column="1" >
@@ -251,6 +250,18 @@
</widget>
- <spacer row="0" column="2" >
- <property>
+ <widget row="3" column="2" >
+ <class>QPushButton</class>
+ <property stdset="1">
<name>name</name>
- <cstring>Spacer2</cstring>
+ <cstring>setCurrentProfileButton</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Set Current</string>
+ </property>
+ </widget>
+ <widget row="5" column="0" rowspan="1" colspan="3" >
+ <class>Line</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Line6</cstring>
</property>
@@ -260,18 +271,47 @@
</property>
+ </widget>
+ <widget row="1" column="0" rowspan="1" colspan="3" >
+ <class>Line</class>
<property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
+ <name>name</name>
+ <cstring>Line1</cstring>
</property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
</property>
- </spacer>
- <spacer row="6" column="2" >
+ </widget>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Current Profile</string>
+ </property>
+ </widget>
+ <widget row="4" column="2" >
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>removeProfileButton</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ <widget row="3" column="0" rowspan="2" colspan="2" >
+ <class>QListBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>profilesList</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="2" >
<property>
<name>name</name>
- <cstring>Spacer16</cstring>
+ <cstring>Spacer2</cstring>
</property>
@@ -279,3 +319,3 @@
<name>orientation</name>
- <enum>Vertical</enum>
+ <enum>Horizontal</enum>
</property>
@@ -293,7 +333,7 @@
</spacer>
- <widget row="5" column="2" >
- <class>QPushButton</class>
+ <widget row="2" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>PushButton7</cstring>
+ <cstring>TextLabel1_2</cstring>
</property>
@@ -301,21 +341,25 @@
<name>text</name>
- <string>&amp;Set Current</string>
+ <string>Profiles</string>
</property>
</widget>
- <widget row="4" column="2" >
- <class>QPushButton</class>
+ <widget row="6" column="0" rowspan="1" colspan="3" >
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>removeProfileButton</cstring>
+ <cstring>Layout6</cstring>
</property>
+ <hbox>
<property stdset="1">
- <name>text</name>
- <string>&amp;Remove</string>
+ <name>margin</name>
+ <number>0</number>
</property>
- </widget>
- <widget row="3" column="2" >
- <class>QPushButton</class>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>newProfileButton</cstring>
+ <cstring>TextLabel1_3</cstring>
</property>
@@ -323,23 +367,29 @@
<name>text</name>
- <string>&amp;New</string>
+ <string>New Profile</string>
</property>
</widget>
- <widget row="2" column="0" >
- <class>QLabel</class>
+ <widget>
+ <class>QLineEdit</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel1_2</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Profiles</string>
+ <cstring>newProfile</cstring>
</property>
</widget>
- <widget row="3" column="0" rowspan="3" colspan="2" >
- <class>QListBox</class>
+ <widget>
+ <class>QPushButton</class>
<property stdset="1">
<name>name</name>
- <cstring>profilesList</cstring>
+ <cstring>newProfileButton</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Add</string>
</property>
</widget>
+ </hbox>
+ </widget>
</grid>
@@ -371,2 +421,15 @@
</images>
+<tabstops>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>connectionList</tabstop>
+ <tabstop>informationConnectionButton</tabstop>
+ <tabstop>configureConnectionButton</tabstop>
+ <tabstop>addConnectionButton</tabstop>
+ <tabstop>removeConnectionButton</tabstop>
+ <tabstop>profilesList</tabstop>
+ <tabstop>setCurrentProfileButton</tabstop>
+ <tabstop>removeProfileButton</tabstop>
+ <tabstop>newProfile</tabstop>
+ <tabstop>newProfileButton</tabstop>
+</tabstops>
</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
@@ -7,3 +7,2 @@
#include "kprocess.h"
-#include "namedialog.h"
@@ -12,2 +11,3 @@
#include <qlistbox.h>
+#include <qlineedit.h>
#include <qlistview.h>
@@ -39,4 +39,5 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
- connect(profilesList, SIGNAL(highlighted(const QString&)), this, SLOT(changeProfile(const QString&)));
+ connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
+ connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
// Load connections.
@@ -61,2 +62,3 @@ MainWindowImp::~MainWindowImp(){
Config cfg("NetworkSetup");
+ cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
@@ -374,2 +376,9 @@ void MainWindowImp::updateInterface(Interface *i){
+void MainWindowImp::newProfileChanged(const QString& newText){
+ if(newText.length() > 0)
+ newProfileButton->setEnabled(true);
+ else
+ newProfileButton->setEnabled(false);
+}
+
/**
@@ -380,7 +389,3 @@ void MainWindowImp::updateInterface(Interface *i){
void MainWindowImp::addProfile(){
- NameDialog foo(this, "namedialog", true);
- QString newProfileName = foo.go();
- if(newProfileName.length() == 0)
- return;
-
+ QString newProfileName = newProfile->text();
if(profiles.grep(newProfileName).count() > 0){
@@ -416,4 +421,4 @@ void MainWindowImp::removeProfile(){
*/
-void MainWindowImp::changeProfile(const QString& newProfile){
- currentProfileLabel->setText(newProfile);
+void MainWindowImp::changeProfile(){
+ currentProfileLabel->setText(profilesList->text(profilesList->currentItem()));
}
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
@@ -30,5 +30,6 @@ private slots:
void removeProfile();
- void changeProfile(const QString&);
+ void changeProfile();
void updateInterface(Interface *i);
+ void newProfileChanged(const QString& newText);
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 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'namedialog.ui'
-**
-** Created: Sat Dec 15 04:36:20 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "namedialog.h"
-
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-
-/*
- * Constructs a NameDialog which is a child of 'parent', with the
- * name 'name' and widget flags set to 'f'
- *
- * The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
- */
-NameDialog::NameDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl )
-{
- if ( !name )
- setName( "NameDialog" );
- resize( 176, 65 );
- setCaption( tr( "Enter A Name" ) );
- NameDialogLayout = new QGridLayout( this );
- NameDialogLayout->setSpacing( 6 );
- NameDialogLayout->setMargin( 5 );
-
- Name = new QLineEdit( this, "Name" );
-
- NameDialogLayout->addMultiCellWidget( Name, 0, 0, 0, 1 );
-
- cancel = new QPushButton( this, "Cancel" );
- cancel->setText( tr( "&Cancel" ) );
-
- NameDialogLayout->addWidget( cancel, 1, 1 );
-
- ok = new QPushButton( this, "ok" );
- ok->setText( tr( "&Ok" ) );
-
- NameDialogLayout->addWidget( ok, 1, 0 );
-
- connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( Name, SIGNAL(returnPressed () ), this, SLOT(accept() ) );
-}
-
-QString NameDialog::go(){
- if( exec() ) //pressed OK
- return (Name->text());
- else //pressed cancel
- return QString();
-}
-
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 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'namedialog.ui'
-**
-** Created: Sat Dec 15 04:36:14 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef NAMEDIALOG_H
-#define NAMEDIALOG_H
-
-#include <qvariant.h>
-#include <qdialog.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QLineEdit;
-class QPushButton;
-
-class NameDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- NameDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
-
- QLineEdit* Name;
- QPushButton* cancel;
- QPushButton* ok;
- QString go();
-
-protected:
- QGridLayout* NameDialogLayout;
-};
-
-#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
@@ -3,4 +3,4 @@ TEMPLATE = app
CONFIG = qt warn_on release
-HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h namedialog.h
-SOURCES = main.cpp namedialog.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp
+HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h
+SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp
#INCLUDEPATH += $(QPEDIR)/include
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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>222</width>
+ <width>218</width>
<height>289</height>
@@ -395,49 +395,2 @@
<spacer row="2" column="1" >
- <property>
- <name>name</name>
- <cstring>Spacer15</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</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>
- </grid>
- </widget>
- </widget>
- </vbox>
-</widget>
-<customwidgets>
- <customwidget>
- <class>QWidget</class>
- <header location="local">qwidget.h</header>
- <sizehint>
- <width>100</width>
- <height>100</height>
- </sizehint>
- <container>0</container>
- <sizepolicy>
- <hordata>7</hordata>
- <verdata>7</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- </customwidget>
-</customwidgets>
-<images>
- <image>
- <name>image0</name>
- <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
- </image>
-</images>
-</UI>
+ \ No newline at end of file
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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>203</width>
+ <width>199</width>
<height>244</height>
@@ -335,4 +335,9 @@
</images>
-<connections>
-</connections>
+<tabstops>
+ <tabstop>startButton</tabstop>
+ <tabstop>stopButton</tabstop>
+ <tabstop>refreshButton</tabstop>
+ <tabstop>restartButton</tabstop>
+ <tabstop>advancedButton</tabstop>
+</tabstops>
</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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>271</width>
+ <width>267</width>
<height>280</height>
@@ -335,2 +335,13 @@
</connections>
+<tabstops>
+ <tabstop>autoStart</tabstop>
+ <tabstop>profileCombo</tabstop>
+ <tabstop>dhcpCheckBox</tabstop>
+ <tabstop>leaseTime</tabstop>
+ <tabstop>ipAddressEdit</tabstop>
+ <tabstop>subnetMaskEdit</tabstop>
+ <tabstop>gatewayEdit</tabstop>
+ <tabstop>firstDNSLineEdit</tabstop>
+ <tabstop>secondDNSLineEdit</tabstop>
+</tabstops>
</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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>217</width>
+ <width>230</width>
<height>289</height>
@@ -210,7 +210,6 @@
</property>
- <widget row="1" column="0" rowspan="1" colspan="3" >
- <class>Line</class>
- <property stdset="1">
+ <spacer row="7" column="2" >
+ <property>
<name>name</name>
- <cstring>Line1</cstring>
+ <cstring>Spacer16</cstring>
</property>
@@ -218,16 +217,16 @@
<name>orientation</name>
- <enum>Horizontal</enum>
+ <enum>Vertical</enum>
</property>
- </widget>
- <widget row="0" column="0" >
- <class>QLabel</class>
<property stdset="1">
- <name>name</name>
- <cstring>TextLabel1</cstring>
+ <name>sizeType</name>
+ <enum>Expanding</enum>
</property>
- <property stdset="1">
- <name>text</name>
- <string>Current Profile</string>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
</property>
- </widget>
+ </spacer>
<widget row="0" column="1" >
@@ -251,6 +250,18 @@
</widget>
- <spacer row="0" column="2" >
- <property>
+ <widget row="3" column="2" >
+ <class>QPushButton</class>
+ <property stdset="1">
<name>name</name>
- <cstring>Spacer2</cstring>
+ <cstring>setCurrentProfileButton</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Set Current</string>
+ </property>
+ </widget>
+ <widget row="5" column="0" rowspan="1" colspan="3" >
+ <class>Line</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Line6</cstring>
</property>
@@ -260,18 +271,47 @@
</property>
+ </widget>
+ <widget row="1" column="0" rowspan="1" colspan="3" >
+ <class>Line</class>
<property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
+ <name>name</name>
+ <cstring>Line1</cstring>
</property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
</property>
- </spacer>
- <spacer row="6" column="2" >
+ </widget>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Current Profile</string>
+ </property>
+ </widget>
+ <widget row="4" column="2" >
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>removeProfileButton</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ <widget row="3" column="0" rowspan="2" colspan="2" >
+ <class>QListBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>profilesList</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="2" >
<property>
<name>name</name>
- <cstring>Spacer16</cstring>
+ <cstring>Spacer2</cstring>
</property>
@@ -279,3 +319,3 @@
<name>orientation</name>
- <enum>Vertical</enum>
+ <enum>Horizontal</enum>
</property>
@@ -293,7 +333,7 @@
</spacer>
- <widget row="5" column="2" >
- <class>QPushButton</class>
+ <widget row="2" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>PushButton7</cstring>
+ <cstring>TextLabel1_2</cstring>
</property>
@@ -301,21 +341,25 @@
<name>text</name>
- <string>&amp;Set Current</string>
+ <string>Profiles</string>
</property>
</widget>
- <widget row="4" column="2" >
- <class>QPushButton</class>
+ <widget row="6" column="0" rowspan="1" colspan="3" >
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>removeProfileButton</cstring>
+ <cstring>Layout6</cstring>
</property>
+ <hbox>
<property stdset="1">
- <name>text</name>
- <string>&amp;Remove</string>
+ <name>margin</name>
+ <number>0</number>
</property>
- </widget>
- <widget row="3" column="2" >
- <class>QPushButton</class>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>newProfileButton</cstring>
+ <cstring>TextLabel1_3</cstring>
</property>
@@ -323,23 +367,29 @@
<name>text</name>
- <string>&amp;New</string>
+ <string>New Profile</string>
</property>
</widget>
- <widget row="2" column="0" >
- <class>QLabel</class>
+ <widget>
+ <class>QLineEdit</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel1_2</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Profiles</string>
+ <cstring>newProfile</cstring>
</property>
</widget>
- <widget row="3" column="0" rowspan="3" colspan="2" >
- <class>QListBox</class>
+ <widget>
+ <class>QPushButton</class>
<property stdset="1">
<name>name</name>
- <cstring>profilesList</cstring>
+ <cstring>newProfileButton</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Add</string>
</property>
</widget>
+ </hbox>
+ </widget>
</grid>
@@ -371,2 +421,15 @@
</images>
+<tabstops>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>connectionList</tabstop>
+ <tabstop>informationConnectionButton</tabstop>
+ <tabstop>configureConnectionButton</tabstop>
+ <tabstop>addConnectionButton</tabstop>
+ <tabstop>removeConnectionButton</tabstop>
+ <tabstop>profilesList</tabstop>
+ <tabstop>setCurrentProfileButton</tabstop>
+ <tabstop>removeProfileButton</tabstop>
+ <tabstop>newProfile</tabstop>
+ <tabstop>newProfileButton</tabstop>
+</tabstops>
</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
@@ -7,3 +7,2 @@
#include "kprocess.h"
-#include "namedialog.h"
@@ -12,2 +11,3 @@
#include <qlistbox.h>
+#include <qlineedit.h>
#include <qlistview.h>
@@ -39,4 +39,5 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
- connect(profilesList, SIGNAL(highlighted(const QString&)), this, SLOT(changeProfile(const QString&)));
+ connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile()));
+ connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&)));
// Load connections.
@@ -61,2 +62,3 @@ MainWindowImp::~MainWindowImp(){
Config cfg("NetworkSetup");
+ cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
@@ -374,2 +376,9 @@ void MainWindowImp::updateInterface(Interface *i){
+void MainWindowImp::newProfileChanged(const QString& newText){
+ if(newText.length() > 0)
+ newProfileButton->setEnabled(true);
+ else
+ newProfileButton->setEnabled(false);
+}
+
/**
@@ -380,7 +389,3 @@ void MainWindowImp::updateInterface(Interface *i){
void MainWindowImp::addProfile(){
- NameDialog foo(this, "namedialog", true);
- QString newProfileName = foo.go();
- if(newProfileName.length() == 0)
- return;
-
+ QString newProfileName = newProfile->text();
if(profiles.grep(newProfileName).count() > 0){
@@ -416,4 +421,4 @@ void MainWindowImp::removeProfile(){
*/
-void MainWindowImp::changeProfile(const QString& newProfile){
- currentProfileLabel->setText(newProfile);
+void MainWindowImp::changeProfile(){
+ currentProfileLabel->setText(profilesList->text(profilesList->currentItem()));
}
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
@@ -30,5 +30,6 @@ private slots:
void removeProfile();
- void changeProfile(const QString&);
+ void changeProfile();
void updateInterface(Interface *i);
+ void newProfileChanged(const QString& newText);
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 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'namedialog.ui'
-**
-** Created: Sat Dec 15 04:36:20 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#include "namedialog.h"
-
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-
-/*
- * Constructs a NameDialog which is a child of 'parent', with the
- * name 'name' and widget flags set to 'f'
- *
- * The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
- */
-NameDialog::NameDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl )
-{
- if ( !name )
- setName( "NameDialog" );
- resize( 176, 65 );
- setCaption( tr( "Enter A Name" ) );
- NameDialogLayout = new QGridLayout( this );
- NameDialogLayout->setSpacing( 6 );
- NameDialogLayout->setMargin( 5 );
-
- Name = new QLineEdit( this, "Name" );
-
- NameDialogLayout->addMultiCellWidget( Name, 0, 0, 0, 1 );
-
- cancel = new QPushButton( this, "Cancel" );
- cancel->setText( tr( "&Cancel" ) );
-
- NameDialogLayout->addWidget( cancel, 1, 1 );
-
- ok = new QPushButton( this, "ok" );
- ok->setText( tr( "&Ok" ) );
-
- NameDialogLayout->addWidget( ok, 1, 0 );
-
- connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( Name, SIGNAL(returnPressed () ), this, SLOT(accept() ) );
-}
-
-QString NameDialog::go(){
- if( exec() ) //pressed OK
- return (Name->text());
- else //pressed cancel
- return QString();
-}
-
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 @@
-/****************************************************************************
-** Form interface generated from reading ui file 'namedialog.ui'
-**
-** Created: Sat Dec 15 04:36:14 2001
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-#ifndef NAMEDIALOG_H
-#define NAMEDIALOG_H
-
-#include <qvariant.h>
-#include <qdialog.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QLineEdit;
-class QPushButton;
-
-class NameDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- NameDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
-
- QLineEdit* Name;
- QPushButton* cancel;
- QPushButton* ok;
- QString go();
-
-protected:
- QGridLayout* NameDialogLayout;
-};
-
-#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
@@ -3,4 +3,4 @@ TEMPLATE = app
CONFIG = qt warn_on release
-HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h namedialog.h
-SOURCES = main.cpp namedialog.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp
+HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h
+SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp
#INCLUDEPATH += $(QPEDIR)/include
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
@@ -13,3 +13,3 @@
<y>0</y>
- <width>222</width>
+ <width>218</width>
<height>289</height>
@@ -395,49 +395,2 @@
<spacer row="2" column="1" >
- <property>
- <name>name</name>
- <cstring>Spacer15</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</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>
- </grid>
- </widget>
- </widget>
- </vbox>
-</widget>
-<customwidgets>
- <customwidget>
- <class>QWidget</class>
- <header location="local">qwidget.h</header>
- <sizehint>
- <width>100</width>
- <height>100</height>
- </sizehint>
- <container>0</container>
- <sizepolicy>
- <hordata>7</hordata>
- <verdata>7</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- </customwidget>
-</customwidgets>
-<images>
- <image>
- <name>image0</name>
- <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
- </image>
-</images>
-</UI>
+ \ No newline at end of file