summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>203</width>
+ <width>199</width>
<height>244</height>
</rect>
@@ -334,5 +334,10 @@
</image>
</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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>271</width>
+ <width>267</width>
<height>280</height>
</rect>
@@ -334,3 +334,14 @@
</connection>
</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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>217</width>
+ <width>230</width>
<height>289</height>
</rect>
@@ -209,26 +209,25 @@
<number>6</number>
</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>
<property stdset="1">
<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" >
<class>QLabel</class>
@@ -250,55 +249,46 @@
</property>
</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>orientation</name>
- <enum>Horizontal</enum>
+ <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>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <spacer row="6" column="2" >
- <property>
<name>name</name>
- <cstring>Spacer16</cstring>
+ <cstring>Line6</cstring>
</property>
<property stdset="1">
<name>orientation</name>
- <enum>Vertical</enum>
+ <enum>Horizontal</enum>
</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>
- <widget row="5" column="2" >
- <class>QPushButton</class>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>PushButton7</cstring>
+ <cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>&amp;Set Current</string>
+ <string>Current Profile</string>
</property>
</widget>
@@ -314,15 +304,32 @@
</property>
</widget>
- <widget row="3" column="2" >
- <class>QPushButton</class>
+ <widget row="3" column="0" rowspan="2" colspan="2" >
+ <class>QListBox</class>
<property stdset="1">
<name>name</name>
- <cstring>newProfileButton</cstring>
+ <cstring>profilesList</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="2" >
+ <property>
+ <name>name</name>
+ <cstring>Spacer2</cstring>
</property>
<property stdset="1">
- <name>text</name>
- <string>&amp;New</string>
+ <name>orientation</name>
+ <enum>Horizontal</enum>
</property>
- </widget>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
<widget row="2" column="0" >
<class>QLabel</class>
@@ -336,10 +343,53 @@
</property>
</widget>
- <widget row="3" column="0" rowspan="3" colspan="2" >
- <class>QListBox</class>
+ <widget row="6" column="0" rowspan="1" colspan="3" >
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>profilesList</cstring>
+ <cstring>Layout6</cstring>
</property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>New Profile</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>newProfile</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <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>
@@ -370,3 +420,16 @@
</image>
</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
@@ -6,9 +6,9 @@
#include "kprocess.h"
-#include "namedialog.h"
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qlistbox.h>
+#include <qlineedit.h>
#include <qlistview.h>
#include <qheader.h>
@@ -38,6 +38,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
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.
loadModules(QDir::homeDirPath() + "/.networksetup/plugins");
@@ -60,4 +61,5 @@ MainWindowImp::~MainWindowImp(){
if(profiles.count() > 1){
Config cfg("NetworkSetup");
+ cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
}
@@ -373,4 +375,11 @@ void MainWindowImp::updateInterface(Interface *i){
}
+void MainWindowImp::newProfileChanged(const QString& newText){
+ if(newText.length() > 0)
+ newProfileButton->setEnabled(true);
+ else
+ newProfileButton->setEnabled(false);
+}
+
/**
* Adds a new profile to the list of profiles.
@@ -379,9 +388,5 @@ 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){
QMessageBox::information(this, "Can't Add","Profile already exists.", "Ok");
@@ -415,6 +420,6 @@ void MainWindowImp::removeProfile(){
* @param newProfile the new profile.
*/
-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
@@ -29,7 +29,8 @@ private slots:
void addProfile();
void removeProfile();
- void changeProfile(const QString&);
+ void changeProfile();
void updateInterface(Interface *i);
+ void newProfileChanged(const QString& newText);
private:
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
@@ -2,6 +2,6 @@ TEMPLATE = app
#CONFIG = qt warn_on debug
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
#DEPENDPATH += $(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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>222</width>
+ <width>218</width>
<height>289</height>
</rect>
@@ -394,50 +394,3 @@
</widget>
<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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>203</width>
+ <width>199</width>
<height>244</height>
</rect>
@@ -334,5 +334,10 @@
</image>
</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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>271</width>
+ <width>267</width>
<height>280</height>
</rect>
@@ -334,3 +334,14 @@
</connection>
</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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>217</width>
+ <width>230</width>
<height>289</height>
</rect>
@@ -209,26 +209,25 @@
<number>6</number>
</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>
<property stdset="1">
<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" >
<class>QLabel</class>
@@ -250,55 +249,46 @@
</property>
</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>orientation</name>
- <enum>Horizontal</enum>
+ <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>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <spacer row="6" column="2" >
- <property>
<name>name</name>
- <cstring>Spacer16</cstring>
+ <cstring>Line6</cstring>
</property>
<property stdset="1">
<name>orientation</name>
- <enum>Vertical</enum>
+ <enum>Horizontal</enum>
</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>
- <widget row="5" column="2" >
- <class>QPushButton</class>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>PushButton7</cstring>
+ <cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>&amp;Set Current</string>
+ <string>Current Profile</string>
</property>
</widget>
@@ -314,15 +304,32 @@
</property>
</widget>
- <widget row="3" column="2" >
- <class>QPushButton</class>
+ <widget row="3" column="0" rowspan="2" colspan="2" >
+ <class>QListBox</class>
<property stdset="1">
<name>name</name>
- <cstring>newProfileButton</cstring>
+ <cstring>profilesList</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="2" >
+ <property>
+ <name>name</name>
+ <cstring>Spacer2</cstring>
</property>
<property stdset="1">
- <name>text</name>
- <string>&amp;New</string>
+ <name>orientation</name>
+ <enum>Horizontal</enum>
</property>
- </widget>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
<widget row="2" column="0" >
<class>QLabel</class>
@@ -336,10 +343,53 @@
</property>
</widget>
- <widget row="3" column="0" rowspan="3" colspan="2" >
- <class>QListBox</class>
+ <widget row="6" column="0" rowspan="1" colspan="3" >
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>profilesList</cstring>
+ <cstring>Layout6</cstring>
</property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>New Profile</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>newProfile</cstring>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <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>
@@ -370,3 +420,16 @@
</image>
</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
@@ -6,9 +6,9 @@
#include "kprocess.h"
-#include "namedialog.h"
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qlistbox.h>
+#include <qlineedit.h>
#include <qlistview.h>
#include <qheader.h>
@@ -38,6 +38,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
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.
loadModules(QDir::homeDirPath() + "/.networksetup/plugins");
@@ -60,4 +61,5 @@ MainWindowImp::~MainWindowImp(){
if(profiles.count() > 1){
Config cfg("NetworkSetup");
+ cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
}
@@ -373,4 +375,11 @@ void MainWindowImp::updateInterface(Interface *i){
}
+void MainWindowImp::newProfileChanged(const QString& newText){
+ if(newText.length() > 0)
+ newProfileButton->setEnabled(true);
+ else
+ newProfileButton->setEnabled(false);
+}
+
/**
* Adds a new profile to the list of profiles.
@@ -379,9 +388,5 @@ 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){
QMessageBox::information(this, "Can't Add","Profile already exists.", "Ok");
@@ -415,6 +420,6 @@ void MainWindowImp::removeProfile(){
* @param newProfile the new profile.
*/
-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
@@ -29,7 +29,8 @@ private slots:
void addProfile();
void removeProfile();
- void changeProfile(const QString&);
+ void changeProfile();
void updateInterface(Interface *i);
+ void newProfileChanged(const QString& newText);
private:
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
@@ -2,6 +2,6 @@ TEMPLATE = app
#CONFIG = qt warn_on debug
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
#DEPENDPATH += $(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
@@ -12,5 +12,5 @@
<x>0</x>
<y>0</y>
- <width>222</width>
+ <width>218</width>
<height>289</height>
</rect>
@@ -394,50 +394,3 @@
</widget>
<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