summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2002-12-11 22:08:02 (UTC)
committer benmeyer <benmeyer>2002-12-11 22:08:02 (UTC)
commit6523ee46d49203d11f34a3dbbf966a318cef7def (patch) (side-by-side diff)
tree2a51a44e1fb114c3f4d8f3965d5106c8930fba16
parentc5737bbbe357ea7481a9f6a406ef81bbeba0d541 (diff)
downloadopie-6523ee46d49203d11f34a3dbbf966a318cef7def.zip
opie-6523ee46d49203d11f34a3dbbf966a318cef7def.tar.gz
opie-6523ee46d49203d11f34a3dbbf966a318cef7def.tar.bz2
New cleaner layout
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/wlan/wlan.ui173
-rw-r--r--noncore/net/networksetup/wlan/wlanimp.cpp45
-rw-r--r--noncore/net/networksetup/wlan/wlanimp.h3
-rw-r--r--noncore/settings/networksettings/wlan/wlan.ui173
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp45
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.h3
6 files changed, 212 insertions, 230 deletions
diff --git a/noncore/net/networksetup/wlan/wlan.ui b/noncore/net/networksetup/wlan/wlan.ui
index 47d6db6..09593b3 100644
--- a/noncore/net/networksetup/wlan/wlan.ui
+++ b/noncore/net/networksetup/wlan/wlan.ui
@@ -13,4 +13,4 @@
<y>0</y>
- <width>237</width>
- <height>286</height>
+ <width>239</width>
+ <height>277</height>
</rect>
@@ -67,6 +67,21 @@
<widget>
- <class>QButtonGroup</class>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>essAny</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Sepecify Access Point</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QGroupBox</class>
<property stdset="1">
<name>name</name>
- <cstring>ButtonGroup45</cstring>
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
</property>
@@ -74,5 +89,5 @@
<name>title</name>
- <string>ESS ID</string>
+ <string>Settings</string>
</property>
- <vbox>
+ <grid>
<property stdset="1">
@@ -85,7 +100,7 @@
</property>
- <widget>
- <class>QRadioButton</class>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>essNon</cstring>
+ <cstring>TextLabel1</cstring>
</property>
@@ -93,14 +108,10 @@
<name>text</name>
- <string>Non-Spec ESSID: "ANY"</string>
- </property>
- <property stdset="1">
- <name>checked</name>
- <bool>true</bool>
+ <string>ESS-ID</string>
</property>
</widget>
- <widget>
- <class>QRadioButton</class>
+ <widget row="1" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>essSpecific</cstring>
+ <cstring>TextLabel2_2</cstring>
</property>
@@ -108,6 +119,6 @@
<name>text</name>
- <string>Specific ESSID</string>
+ <string>Network Type</string>
</property>
</widget>
- <widget>
+ <widget row="0" column="1" rowspan="1" colspan="2" >
<class>QLineEdit</class>
@@ -117,41 +128,20 @@
</property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
</widget>
- </vbox>
- </widget>
- <widget>
- <class>QButtonGroup</class>
- <property stdset="1">
- <name>name</name>
- <cstring>ButtonGroup46</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Network Type</string>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="0" column="0" rowspan="1" colspan="3" >
- <class>QRadioButton</class>
+ <widget row="1" column="1" rowspan="1" colspan="2" >
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Infrastructure</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Ad-Hoc</string>
+ </property>
+ </item>
<property stdset="1">
<name>name</name>
- <cstring>networkInfrastructure</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Infrastructure</string>
- </property>
- <property stdset="1">
- <name>checked</name>
- <bool>true</bool>
+ <cstring>networkType</cstring>
</property>
@@ -162,7 +152,3 @@
<name>name</name>
- <cstring>TextLabel2</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
+ <cstring>channelLabel</cstring>
</property>
@@ -173,13 +159,2 @@
</widget>
- <widget row="1" column="0" rowspan="1" colspan="2" >
- <class>QRadioButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>network802</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Ad-Hoc</string>
- </property>
- </widget>
<widget row="2" column="1" >
@@ -196,3 +171,3 @@
<name>maxValue</name>
- <number>11</number>
+ <number>15</number>
</property>
@@ -210,3 +185,3 @@
<name>name</name>
- <cstring>Spacer32</cstring>
+ <cstring>Spacer4</cstring>
</property>
@@ -338,3 +313,3 @@
<name>name</name>
- <cstring>ButtonGroup44</cstring>
+ <cstring>KeyButtonGroup</cstring>
</property>
@@ -363,2 +338,6 @@
</property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
</widget>
@@ -370,2 +349,6 @@
</property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
</widget>
@@ -377,2 +360,6 @@
</property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
</widget>
@@ -384,2 +371,6 @@
</property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
</widget>
@@ -463,23 +454,5 @@
<connection>
- <sender>essSpecific</sender>
- <signal>toggled(bool)</signal>
- <receiver>essSpecificLineEdit</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>network802</sender>
- <signal>clicked()</signal>
- <receiver>essSpecific</receiver>
- <slot>animateClick()</slot>
- </connection>
- <connection>
- <sender>network802</sender>
- <signal>toggled(bool)</signal>
- <receiver>TextLabel2</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>network802</sender>
+ <sender>wepEnabled</sender>
<signal>toggled(bool)</signal>
- <receiver>networkChannel</receiver>
+ <receiver>ButtonGroup43</receiver>
<slot>setEnabled(bool)</slot>
@@ -489,3 +462,3 @@
<signal>toggled(bool)</signal>
- <receiver>ButtonGroup43</receiver>
+ <receiver>KeyButtonGroup</receiver>
<slot>setEnabled(bool)</slot>
@@ -493,5 +466,5 @@
<connection>
- <sender>wepEnabled</sender>
+ <sender>essAny</sender>
<signal>toggled(bool)</signal>
- <receiver>ButtonGroup44</receiver>
+ <receiver>GroupBox1</receiver>
<slot>setEnabled(bool)</slot>
@@ -501,7 +474,5 @@
<tabstop>tabWidget</tabstop>
- <tabstop>essNon</tabstop>
- <tabstop>essSpecific</tabstop>
+ <tabstop>essAny</tabstop>
<tabstop>essSpecificLineEdit</tabstop>
- <tabstop>networkInfrastructure</tabstop>
- <tabstop>network802</tabstop>
+ <tabstop>networkType</tabstop>
<tabstop>networkChannel</tabstop>
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp
index 6a56358..ef7329e 100644
--- a/noncore/net/networksetup/wlan/wlanimp.cpp
+++ b/noncore/net/networksetup/wlan/wlanimp.cpp
@@ -8,2 +8,3 @@
#include <qlineedit.h>
+#include <qlabel.h>
#include <qspinbox.h>
@@ -12,2 +13,3 @@
#include <qtabwidget.h>
+#include <qcombobox.h>
@@ -41,2 +43,9 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1());
+ connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int)));
+
+}
+
+void WLANImp::typeChanged(int mod){
+ networkChannel->setEnabled(mod);
+ channelLabel->setEnabled(mod);
}
@@ -73,8 +82,6 @@ void WLANImp::parseSettingFile(){
if(id == "any"){
- essNon->setChecked(true);
- essSpecific->setChecked(false);
+ essAny->setChecked(false);
}else{
- essSpecific->setChecked(true);
+ essAny->setChecked(true);
essSpecificLineEdit->setText(id);
- essNon->setChecked(false);
}
@@ -84,8 +91,6 @@ void WLANImp::parseSettingFile(){
if(mode == "Managed"){
- network802->setChecked( false );
- networkInfrastructure->setChecked( true );
+ networkType->setCurrentItem(0);
}
else{
- network802->setChecked( true );
- networkInfrastructure->setChecked( false );
+ networkType->setCurrentItem(0);
}
@@ -156,6 +161,13 @@ void WLANImp::changeAndSaveSettingFile(){
stream << line << "\n";
-
- stream << "\tESSID=" << (essNon->isChecked() == true ? QString("any") : essSpecificLineEdit->text()) << '\n';
- stream << "\tMODE=" << (networkInfrastructure->isChecked() == true ? "Managed" : "ad-hoc") << '\n';
-
+ if(!essAny->isChecked() == true){
+ stream << "\tESSID=any\n";
+ stream << "\tMODE=Managed\n";
+ stream << "\tCHANNEL=6\n";
+ }
+ else{
+ stream << "\tESSID=" << essSpecificLineEdit->text() << '\n';
+ stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n';
+ stream << "\tCHANNEL=" << networkChannel->value() << "\n";
+ }
+
stream << "\tKEY0=" << keyLineEdit0->text() << "\n";
@@ -177,3 +189,2 @@ void WLANImp::changeAndSaveSettingFile(){
}
- stream << "\tCHANNEL=" << networkChannel->value() << "\n";
stream << "\tRATE=auto\n";
@@ -198,3 +209,3 @@ void WLANImp::accept(){
{
- QMessageBox::information(this, "", "Please enter a key for WEP.", QMessageBox::Ok);
+ QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok);
return;
@@ -203,2 +214,7 @@ void WLANImp::accept(){
+ if(essSpecificLineEdit->text().isEmpty()){
+ QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok);
+ return;
+ }
+
// Ok settings are good here, save
@@ -210,2 +226,3 @@ void WLANImp::accept(){
+ return;
// Restart the device now that the settings have changed
diff --git a/noncore/net/networksetup/wlan/wlanimp.h b/noncore/net/networksetup/wlan/wlanimp.h
index df599af..310836c 100644
--- a/noncore/net/networksetup/wlan/wlanimp.h
+++ b/noncore/net/networksetup/wlan/wlanimp.h
@@ -20,2 +20,5 @@ protected:
+private slots:
+ void typeChanged(int);
+
private:
diff --git a/noncore/settings/networksettings/wlan/wlan.ui b/noncore/settings/networksettings/wlan/wlan.ui
index 47d6db6..09593b3 100644
--- a/noncore/settings/networksettings/wlan/wlan.ui
+++ b/noncore/settings/networksettings/wlan/wlan.ui
@@ -13,4 +13,4 @@
<y>0</y>
- <width>237</width>
- <height>286</height>
+ <width>239</width>
+ <height>277</height>
</rect>
@@ -67,6 +67,21 @@
<widget>
- <class>QButtonGroup</class>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>essAny</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Sepecify Access Point</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QGroupBox</class>
<property stdset="1">
<name>name</name>
- <cstring>ButtonGroup45</cstring>
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
</property>
@@ -74,5 +89,5 @@
<name>title</name>
- <string>ESS ID</string>
+ <string>Settings</string>
</property>
- <vbox>
+ <grid>
<property stdset="1">
@@ -85,7 +100,7 @@
</property>
- <widget>
- <class>QRadioButton</class>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>essNon</cstring>
+ <cstring>TextLabel1</cstring>
</property>
@@ -93,14 +108,10 @@
<name>text</name>
- <string>Non-Spec ESSID: "ANY"</string>
- </property>
- <property stdset="1">
- <name>checked</name>
- <bool>true</bool>
+ <string>ESS-ID</string>
</property>
</widget>
- <widget>
- <class>QRadioButton</class>
+ <widget row="1" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>essSpecific</cstring>
+ <cstring>TextLabel2_2</cstring>
</property>
@@ -108,6 +119,6 @@
<name>text</name>
- <string>Specific ESSID</string>
+ <string>Network Type</string>
</property>
</widget>
- <widget>
+ <widget row="0" column="1" rowspan="1" colspan="2" >
<class>QLineEdit</class>
@@ -117,41 +128,20 @@
</property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
</widget>
- </vbox>
- </widget>
- <widget>
- <class>QButtonGroup</class>
- <property stdset="1">
- <name>name</name>
- <cstring>ButtonGroup46</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Network Type</string>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="0" column="0" rowspan="1" colspan="3" >
- <class>QRadioButton</class>
+ <widget row="1" column="1" rowspan="1" colspan="2" >
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Infrastructure</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Ad-Hoc</string>
+ </property>
+ </item>
<property stdset="1">
<name>name</name>
- <cstring>networkInfrastructure</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Infrastructure</string>
- </property>
- <property stdset="1">
- <name>checked</name>
- <bool>true</bool>
+ <cstring>networkType</cstring>
</property>
@@ -162,7 +152,3 @@
<name>name</name>
- <cstring>TextLabel2</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
+ <cstring>channelLabel</cstring>
</property>
@@ -173,13 +159,2 @@
</widget>
- <widget row="1" column="0" rowspan="1" colspan="2" >
- <class>QRadioButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>network802</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Ad-Hoc</string>
- </property>
- </widget>
<widget row="2" column="1" >
@@ -196,3 +171,3 @@
<name>maxValue</name>
- <number>11</number>
+ <number>15</number>
</property>
@@ -210,3 +185,3 @@
<name>name</name>
- <cstring>Spacer32</cstring>
+ <cstring>Spacer4</cstring>
</property>
@@ -338,3 +313,3 @@
<name>name</name>
- <cstring>ButtonGroup44</cstring>
+ <cstring>KeyButtonGroup</cstring>
</property>
@@ -363,2 +338,6 @@
</property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
</widget>
@@ -370,2 +349,6 @@
</property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
</widget>
@@ -377,2 +360,6 @@
</property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
</widget>
@@ -384,2 +371,6 @@
</property>
+ <property stdset="1">
+ <name>echoMode</name>
+ <enum>Password</enum>
+ </property>
</widget>
@@ -463,23 +454,5 @@
<connection>
- <sender>essSpecific</sender>
- <signal>toggled(bool)</signal>
- <receiver>essSpecificLineEdit</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>network802</sender>
- <signal>clicked()</signal>
- <receiver>essSpecific</receiver>
- <slot>animateClick()</slot>
- </connection>
- <connection>
- <sender>network802</sender>
- <signal>toggled(bool)</signal>
- <receiver>TextLabel2</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>network802</sender>
+ <sender>wepEnabled</sender>
<signal>toggled(bool)</signal>
- <receiver>networkChannel</receiver>
+ <receiver>ButtonGroup43</receiver>
<slot>setEnabled(bool)</slot>
@@ -489,3 +462,3 @@
<signal>toggled(bool)</signal>
- <receiver>ButtonGroup43</receiver>
+ <receiver>KeyButtonGroup</receiver>
<slot>setEnabled(bool)</slot>
@@ -493,5 +466,5 @@
<connection>
- <sender>wepEnabled</sender>
+ <sender>essAny</sender>
<signal>toggled(bool)</signal>
- <receiver>ButtonGroup44</receiver>
+ <receiver>GroupBox1</receiver>
<slot>setEnabled(bool)</slot>
@@ -501,7 +474,5 @@
<tabstop>tabWidget</tabstop>
- <tabstop>essNon</tabstop>
- <tabstop>essSpecific</tabstop>
+ <tabstop>essAny</tabstop>
<tabstop>essSpecificLineEdit</tabstop>
- <tabstop>networkInfrastructure</tabstop>
- <tabstop>network802</tabstop>
+ <tabstop>networkType</tabstop>
<tabstop>networkChannel</tabstop>
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp
index 6a56358..ef7329e 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp.cpp
@@ -8,2 +8,3 @@
#include <qlineedit.h>
+#include <qlabel.h>
#include <qspinbox.h>
@@ -12,2 +13,3 @@
#include <qtabwidget.h>
+#include <qcombobox.h>
@@ -41,2 +43,9 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1());
+ connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int)));
+
+}
+
+void WLANImp::typeChanged(int mod){
+ networkChannel->setEnabled(mod);
+ channelLabel->setEnabled(mod);
}
@@ -73,8 +82,6 @@ void WLANImp::parseSettingFile(){
if(id == "any"){
- essNon->setChecked(true);
- essSpecific->setChecked(false);
+ essAny->setChecked(false);
}else{
- essSpecific->setChecked(true);
+ essAny->setChecked(true);
essSpecificLineEdit->setText(id);
- essNon->setChecked(false);
}
@@ -84,8 +91,6 @@ void WLANImp::parseSettingFile(){
if(mode == "Managed"){
- network802->setChecked( false );
- networkInfrastructure->setChecked( true );
+ networkType->setCurrentItem(0);
}
else{
- network802->setChecked( true );
- networkInfrastructure->setChecked( false );
+ networkType->setCurrentItem(0);
}
@@ -156,6 +161,13 @@ void WLANImp::changeAndSaveSettingFile(){
stream << line << "\n";
-
- stream << "\tESSID=" << (essNon->isChecked() == true ? QString("any") : essSpecificLineEdit->text()) << '\n';
- stream << "\tMODE=" << (networkInfrastructure->isChecked() == true ? "Managed" : "ad-hoc") << '\n';
-
+ if(!essAny->isChecked() == true){
+ stream << "\tESSID=any\n";
+ stream << "\tMODE=Managed\n";
+ stream << "\tCHANNEL=6\n";
+ }
+ else{
+ stream << "\tESSID=" << essSpecificLineEdit->text() << '\n';
+ stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n';
+ stream << "\tCHANNEL=" << networkChannel->value() << "\n";
+ }
+
stream << "\tKEY0=" << keyLineEdit0->text() << "\n";
@@ -177,3 +189,2 @@ void WLANImp::changeAndSaveSettingFile(){
}
- stream << "\tCHANNEL=" << networkChannel->value() << "\n";
stream << "\tRATE=auto\n";
@@ -198,3 +209,3 @@ void WLANImp::accept(){
{
- QMessageBox::information(this, "", "Please enter a key for WEP.", QMessageBox::Ok);
+ QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok);
return;
@@ -203,2 +214,7 @@ void WLANImp::accept(){
+ if(essSpecificLineEdit->text().isEmpty()){
+ QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok);
+ return;
+ }
+
// Ok settings are good here, save
@@ -210,2 +226,3 @@ void WLANImp::accept(){
+ return;
// Restart the device now that the settings have changed
diff --git a/noncore/settings/networksettings/wlan/wlanimp.h b/noncore/settings/networksettings/wlan/wlanimp.h
index df599af..310836c 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.h
+++ b/noncore/settings/networksettings/wlan/wlanimp.h
@@ -20,2 +20,5 @@ protected:
+private slots:
+ void typeChanged(int);
+
private: