summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/interfaces/interfaceinformationimp.cpp2
-rw-r--r--noncore/net/networksetup/interfaces/interfacesetup.ui90
-rw-r--r--noncore/net/networksetup/interfaces/interfacesetupimp.cpp11
-rw-r--r--noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp2
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetup.ui90
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp11
6 files changed, 26 insertions, 180 deletions
diff --git a/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp b/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp
index cf3dba1..1fa5d38 100644
--- a/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp
+++ b/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp
@@ -23,13 +23,13 @@ InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *na
/**
* Update the interface information and buttons.
* @param Intarface *i the interface to update (should be the one we already
* know about).
*/
-void InterfaceInformationImp::updateInterface(Interface *i){
+void InterfaceInformationImp::updateInterface(Interface *){
if(interface->getStatus()){
startButton->setEnabled(false);
stopButton->setEnabled(true);
restartButton->setEnabled(true);
}
else{
diff --git a/noncore/net/networksetup/interfaces/interfacesetup.ui b/noncore/net/networksetup/interfaces/interfacesetup.ui
index df55d25..2b45d49 100644
--- a/noncore/net/networksetup/interfaces/interfacesetup.ui
+++ b/noncore/net/networksetup/interfaces/interfacesetup.ui
@@ -8,13 +8,13 @@
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>290</width>
+ <width>286</width>
<height>280</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>Interface Configuration</string>
@@ -37,80 +37,25 @@
<property stdset="1">
<name>text</name>
<string>Automatically bring up</string>
</property>
</widget>
<widget>
- <class>QLayoutWidget</class>
+ <class>QCheckBox</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout9</cstring>
+ <cstring>dhcpCheckBox</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>DHCP</string>
+ </property>
+ <property stdset="1">
+ <name>checked</name>
+ <bool>true</bool>
</property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>dhcpCheckBox</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>DHCP</string>
- </property>
- <property stdset="1">
- <name>checked</name>
- <bool>true</bool>
- </property>
- </widget>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>leaseHoursLabel</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Requested Lease</string>
- </property>
- </widget>
- <widget>
- <class>QSpinBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>leaseTime</cstring>
- </property>
- <property stdset="1">
- <name>suffix</name>
- <string> hours</string>
- </property>
- <property stdset="1">
- <name>maxValue</name>
- <number>87600</number>
- </property>
- <property stdset="1">
- <name>minValue</name>
- <number>1</number>
- </property>
- <property stdset="1">
- <name>lineStep</name>
- <number>24</number>
- </property>
- <property stdset="1">
- <name>value</name>
- <number>168</number>
- </property>
- </widget>
- </hbox>
</widget>
<widget>
<class>QGroupBox</class>
<property stdset="1">
<name>name</name>
<cstring>staticGroupBox</cstring>
@@ -278,32 +223,19 @@
</image>
</images>
<connections>
<connection>
<sender>dhcpCheckBox</sender>
<signal>toggled(bool)</signal>
- <receiver>leaseHoursLabel</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>dhcpCheckBox</sender>
- <signal>toggled(bool)</signal>
- <receiver>leaseTime</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>dhcpCheckBox</sender>
- <signal>toggled(bool)</signal>
<receiver>staticGroupBox</receiver>
<slot>setDisabled(bool)</slot>
</connection>
</connections>
<tabstops>
<tabstop>autoStart</tabstop>
<tabstop>dhcpCheckBox</tabstop>
- <tabstop>leaseTime</tabstop>
<tabstop>ipAddressEdit</tabstop>
<tabstop>subnetMaskEdit</tabstop>
<tabstop>gatewayEdit</tabstop>
<tabstop>firstDNSLineEdit</tabstop>
<tabstop>secondDNSLineEdit</tabstop>
</tabstops>
diff --git a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp
index 4818e37..56bbe93 100644
--- a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp
+++ b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp
@@ -47,17 +47,14 @@ bool InterfaceSetupImp::saveSettings(){
QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok);
return false;
}
interfaces.removeAllInterfaceOptions();
// DHCP
- if(dhcpCheckBox->isChecked()){
+ if(dhcpCheckBox->isChecked())
interfaces.setInterfaceMethod(INTERFACES_METHOD_DHCP);
- interfaces.setInterfaceOption("leasehours", QString("%1").arg(leaseTime->value()));
- interfaces.setInterfaceOption("leasetime", QString("%1").arg(leaseTime->value()*60*60));
- }
else{
interfaces.setInterfaceMethod("static");
interfaces.setInterfaceOption("address", ipAddressEdit->text());
interfaces.setInterfaceOption("netmask", subnetMaskEdit->text());
interfaces.setInterfaceOption("gateway", gatewayEdit->text());
if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){
@@ -119,27 +116,21 @@ void InterfaceSetupImp::setProfile(const QString &profile){
// DHCP
bool error = false;
if(interfaces.getInterfaceMethod(error) == INTERFACES_METHOD_DHCP)
dhcpCheckBox->setChecked(true);
else
dhcpCheckBox->setChecked(false);
- leaseTime->setValue(interfaces.getInterfaceOption("leasehours", error).toInt());
- if(error)
- leaseTime->setValue(interfaces.getInterfaceOption("leasetime", error).toInt()/60/60);
- if(error)
- leaseTime->setValue(24);
// IP Information
autoStart->setChecked(interfaces.isAuto(interface->getInterfaceName()));
QString dns = interfaces.getInterfaceOption("up "DNSSCRIPT" -a", error);
if(dns.contains(" ")){
firstDNSLineEdit->setText(dns.mid(0, dns.find(" ")));
secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length()));
}
ipAddressEdit->setText(interfaces.getInterfaceOption("address", error));
subnetMaskEdit->setText(interfaces.getInterfaceOption("netmask", error));
gatewayEdit->setText(interfaces.getInterfaceOption("gateway", error));
-
}
// interfacesetup.cpp
diff --git a/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp b/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp
index cf3dba1..1fa5d38 100644
--- a/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp
@@ -23,13 +23,13 @@ InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *na
/**
* Update the interface information and buttons.
* @param Intarface *i the interface to update (should be the one we already
* know about).
*/
-void InterfaceInformationImp::updateInterface(Interface *i){
+void InterfaceInformationImp::updateInterface(Interface *){
if(interface->getStatus()){
startButton->setEnabled(false);
stopButton->setEnabled(true);
restartButton->setEnabled(true);
}
else{
diff --git a/noncore/settings/networksettings/interfaces/interfacesetup.ui b/noncore/settings/networksettings/interfaces/interfacesetup.ui
index df55d25..2b45d49 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetup.ui
+++ b/noncore/settings/networksettings/interfaces/interfacesetup.ui
@@ -8,13 +8,13 @@
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>290</width>
+ <width>286</width>
<height>280</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>Interface Configuration</string>
@@ -37,80 +37,25 @@
<property stdset="1">
<name>text</name>
<string>Automatically bring up</string>
</property>
</widget>
<widget>
- <class>QLayoutWidget</class>
+ <class>QCheckBox</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout9</cstring>
+ <cstring>dhcpCheckBox</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>DHCP</string>
+ </property>
+ <property stdset="1">
+ <name>checked</name>
+ <bool>true</bool>
</property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>dhcpCheckBox</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>DHCP</string>
- </property>
- <property stdset="1">
- <name>checked</name>
- <bool>true</bool>
- </property>
- </widget>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>leaseHoursLabel</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Requested Lease</string>
- </property>
- </widget>
- <widget>
- <class>QSpinBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>leaseTime</cstring>
- </property>
- <property stdset="1">
- <name>suffix</name>
- <string> hours</string>
- </property>
- <property stdset="1">
- <name>maxValue</name>
- <number>87600</number>
- </property>
- <property stdset="1">
- <name>minValue</name>
- <number>1</number>
- </property>
- <property stdset="1">
- <name>lineStep</name>
- <number>24</number>
- </property>
- <property stdset="1">
- <name>value</name>
- <number>168</number>
- </property>
- </widget>
- </hbox>
</widget>
<widget>
<class>QGroupBox</class>
<property stdset="1">
<name>name</name>
<cstring>staticGroupBox</cstring>
@@ -278,32 +223,19 @@
</image>
</images>
<connections>
<connection>
<sender>dhcpCheckBox</sender>
<signal>toggled(bool)</signal>
- <receiver>leaseHoursLabel</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>dhcpCheckBox</sender>
- <signal>toggled(bool)</signal>
- <receiver>leaseTime</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>dhcpCheckBox</sender>
- <signal>toggled(bool)</signal>
<receiver>staticGroupBox</receiver>
<slot>setDisabled(bool)</slot>
</connection>
</connections>
<tabstops>
<tabstop>autoStart</tabstop>
<tabstop>dhcpCheckBox</tabstop>
- <tabstop>leaseTime</tabstop>
<tabstop>ipAddressEdit</tabstop>
<tabstop>subnetMaskEdit</tabstop>
<tabstop>gatewayEdit</tabstop>
<tabstop>firstDNSLineEdit</tabstop>
<tabstop>secondDNSLineEdit</tabstop>
</tabstops>
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 4818e37..56bbe93 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -47,17 +47,14 @@ bool InterfaceSetupImp::saveSettings(){
QMessageBox::information(this, "Not Saved.", "Please fill in the IP address and\n subnet entries.", QMessageBox::Ok);
return false;
}
interfaces.removeAllInterfaceOptions();
// DHCP
- if(dhcpCheckBox->isChecked()){
+ if(dhcpCheckBox->isChecked())
interfaces.setInterfaceMethod(INTERFACES_METHOD_DHCP);
- interfaces.setInterfaceOption("leasehours", QString("%1").arg(leaseTime->value()));
- interfaces.setInterfaceOption("leasetime", QString("%1").arg(leaseTime->value()*60*60));
- }
else{
interfaces.setInterfaceMethod("static");
interfaces.setInterfaceOption("address", ipAddressEdit->text());
interfaces.setInterfaceOption("netmask", subnetMaskEdit->text());
interfaces.setInterfaceOption("gateway", gatewayEdit->text());
if(!firstDNSLineEdit->text().isEmpty() || !secondDNSLineEdit->text().isEmpty()){
@@ -119,27 +116,21 @@ void InterfaceSetupImp::setProfile(const QString &profile){
// DHCP
bool error = false;
if(interfaces.getInterfaceMethod(error) == INTERFACES_METHOD_DHCP)
dhcpCheckBox->setChecked(true);
else
dhcpCheckBox->setChecked(false);
- leaseTime->setValue(interfaces.getInterfaceOption("leasehours", error).toInt());
- if(error)
- leaseTime->setValue(interfaces.getInterfaceOption("leasetime", error).toInt()/60/60);
- if(error)
- leaseTime->setValue(24);
// IP Information
autoStart->setChecked(interfaces.isAuto(interface->getInterfaceName()));
QString dns = interfaces.getInterfaceOption("up "DNSSCRIPT" -a", error);
if(dns.contains(" ")){
firstDNSLineEdit->setText(dns.mid(0, dns.find(" ")));
secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length()));
}
ipAddressEdit->setText(interfaces.getInterfaceOption("address", error));
subnetMaskEdit->setText(interfaces.getInterfaceOption("netmask", error));
gatewayEdit->setText(interfaces.getInterfaceOption("gateway", error));
-
}
// interfacesetup.cpp