From e483d88ee4158ba13d8c28b020d0e93b62e86d85 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 03 Jan 2003 21:24:40 +0000 Subject: - these have been renamed to networksettings --- (limited to 'noncore/net/networksetup/interfaces/interfaceinformationimp.cpp') diff --git a/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp b/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp deleted file mode 100644 index 1fa5d38..0000000 --- a/noncore/net/networksetup/interfaces/interfaceinformationimp.cpp +++ b/dev/null @@ -1,76 +0,0 @@ -#include "interfaceinformationimp.h" -#include "interfaceadvanced.h" - -#include -#include -#include -#include - -/** - * Constructor for the InterfaceInformationImp class. This class pretty much - * just display's information about the interface that is passed to it. - */ -InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *name, Interface *i, WFlags f):InterfaceInformation(parent, name, f), interface(i){ - connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *))); - connect(i, SIGNAL(updateMessage(const QString &)), this, SLOT(showMessage(const QString &))); - updateInterface(interface); - connect(startButton, SIGNAL(clicked()), interface, SLOT(start())); - connect(stopButton, SIGNAL(clicked()), interface, SLOT(stop())); - connect(restartButton, SIGNAL(clicked()), interface, SLOT(restart())); - connect(refreshButton, SIGNAL(clicked()), interface, SLOT(refresh())); - connect(advancedButton, SIGNAL(clicked()), this, SLOT(advanced())); -} - -/** - * 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 *){ - if(interface->getStatus()){ - startButton->setEnabled(false); - stopButton->setEnabled(true); - restartButton->setEnabled(true); - } - else{ - startButton->setEnabled(true); - stopButton->setEnabled(false); - restartButton->setEnabled(false); - } - macAddressLabel->setText(interface->getMacAddress()); - ipAddressLabel->setText(interface->getIp()); - subnetMaskLabel->setText(interface->getSubnetMask()); - broadcastLabel->setText(interface->getBroadcast()); -} - -/** - * Create the advanced widget. Fill it with the current interface's information. - * Display it. - */ -void InterfaceInformationImp::advanced(){ - InterfaceAdvanced *a = new InterfaceAdvanced(0, "InterfaceAdvanced"); - a->interfaceName->setText(interface->getInterfaceName()); - a->macAddressLabel->setText(interface->getMacAddress()); - a->ipAddressLabel->setText(interface->getIp()); - a->subnetMaskLabel->setText(interface->getSubnetMask()); - a->broadcastLabel->setText(interface->getBroadcast()); - a->dhcpServerLabel->setText(interface->getDhcpServerIp()); - a->leaseObtainedLabel->setText(interface->getLeaseObtained()); - a->leaseExpiresLabel->setText(interface->getLeaseExpires()); - a->dhcpInformation->setEnabled(interface->isDhcp()); - - a->showMaximized(); - a->show(); -} - -/** - * Messages from the interface if start/stop went as planned. - * Purly for user feedback. - * @param message the message to display. - */ -void InterfaceInformationImp::showMessage(const QString &message){ - QMessageBox::information(this, "Message", message, QMessageBox::Ok); -} - -// infoimp.cpp - -- cgit v0.9.0.2