author | benmeyer <benmeyer> | 2002-10-25 19:34:32 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-25 19:34:32 (UTC) |
commit | f16dd7fc272f3f8354dc696fcc881dfe74755a21 (patch) (unidiff) | |
tree | edaab125b322744d8684e6aee4d2c5955b68689b /noncore/net/networksetup/interfaceinformationimp.cpp | |
parent | 77347ba522a5913ff17561e6fd2c15981d42e86b (diff) | |
download | opie-f16dd7fc272f3f8354dc696fcc881dfe74755a21.zip opie-f16dd7fc272f3f8354dc696fcc881dfe74755a21.tar.gz opie-f16dd7fc272f3f8354dc696fcc881dfe74755a21.tar.bz2 |
Moved Interfaces into a library
Diffstat (limited to 'noncore/net/networksetup/interfaceinformationimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interfaceinformationimp.cpp | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/noncore/net/networksetup/interfaceinformationimp.cpp b/noncore/net/networksetup/interfaceinformationimp.cpp deleted file mode 100644 index 43483fb..0000000 --- a/noncore/net/networksetup/interfaceinformationimp.cpp +++ b/dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | #include "interfaceinformationimp.h" | ||
2 | #include "interfaceadvanced.h" | ||
3 | |||
4 | #include <qpushbutton.h> | ||
5 | #include <qlabel.h> | ||
6 | #include <qgroupbox.h> | ||
7 | #include <assert.h> | ||
8 | |||
9 | /** | ||
10 | * Constructor for the InterfaceInformationImp class. This class pretty much | ||
11 | * just display's information about the interface that is passed to it. | ||
12 | */ | ||
13 | InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *name, Interface *i, WFlags f):InterfaceInformation(parent, name, f){ | ||
14 | assert(i); | ||
15 | |||
16 | interface = i; | ||
17 | connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *))); | ||
18 | updateInterface(interface); | ||
19 | connect(startButton, SIGNAL(clicked()), interface, SLOT(start())); | ||
20 | connect(stopButton, SIGNAL(clicked()), interface, SLOT(stop())); | ||
21 | connect(restartButton, SIGNAL(clicked()), interface, SLOT(restart())); | ||
22 | connect(refreshButton, SIGNAL(clicked()), interface, SLOT(refresh())); | ||
23 | connect(advancedButton, SIGNAL(clicked()), this, SLOT(advanced())); | ||
24 | |||
25 | } | ||
26 | |||
27 | /** | ||
28 | * Update the interface information and buttons. | ||
29 | * @param Intarface *i the interface to update (should be the one we already | ||
30 | * know about). | ||
31 | */ | ||
32 | void InterfaceInformationImp::updateInterface(Interface *i){ | ||
33 | if(interface->getStatus()){ | ||
34 | startButton->setEnabled(false); | ||
35 | stopButton->setEnabled(true); | ||
36 | restartButton->setEnabled(true); | ||
37 | } | ||
38 | else{ | ||
39 | startButton->setEnabled(true); | ||
40 | stopButton->setEnabled(false); | ||
41 | restartButton->setEnabled(false); | ||
42 | } | ||
43 | macAddressLabel->setText(interface->getMacAddress()); | ||
44 | ipAddressLabel->setText(interface->getIp()); | ||
45 | subnetMaskLabel->setText(interface->getSubnetMask()); | ||
46 | broadcastLabel->setText(interface->getBroadcast()); | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * Create the advanced widget. Fill it with the current interface's information. | ||
51 | * Display it. | ||
52 | */ | ||
53 | void InterfaceInformationImp::advanced(){ | ||
54 | InterfaceAdvanced *a = new InterfaceAdvanced(0, "InterfaceAdvanced"); | ||
55 | a->interfaceName->setText(interface->getInterfaceName()); | ||
56 | a->macAddressLabel->setText(interface->getMacAddress()); | ||
57 | a->ipAddressLabel->setText(interface->getIp()); | ||
58 | a->subnetMaskLabel->setText(interface->getSubnetMask()); | ||
59 | a->broadcastLabel->setText(interface->getBroadcast()); | ||
60 | a->dhcpServerLabel->setText(interface->getDhcpServerIp()); | ||
61 | a->leaseObtainedLabel->setText(interface->getLeaseObtained()); | ||
62 | a->leaseExpiresLabel->setText(interface->getLeaseExpires()); | ||
63 | a->dhcpInformation->setEnabled(interface->isDhcp()); | ||
64 | |||
65 | a->showMaximized(); | ||
66 | a->show(); | ||
67 | } | ||
68 | |||
69 | // infoimp.cpp | ||
70 | |||