author | benmeyer <benmeyer> | 2002-10-17 16:30:44 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-17 16:30:44 (UTC) |
commit | 18cc7321db186865629a5c4702074211e42b92fd (patch) (side-by-side diff) | |
tree | beb15112009c1cc966115904a322b32d465e47e6 /noncore/settings/networksettings/interfaceinformationimp.cpp | |
parent | 75f078ec92376db2c90a327bbc50d9bb5c1fb57a (diff) | |
download | opie-18cc7321db186865629a5c4702074211e42b92fd.zip opie-18cc7321db186865629a5c4702074211e42b92fd.tar.gz opie-18cc7321db186865629a5c4702074211e42b92fd.tar.bz2 |
interface is now a qobject
Diffstat (limited to 'noncore/settings/networksettings/interfaceinformationimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaceinformationimp.cpp | 51 |
1 files changed, 12 insertions, 39 deletions
diff --git a/noncore/settings/networksettings/interfaceinformationimp.cpp b/noncore/settings/networksettings/interfaceinformationimp.cpp index e37e0f8..59a6400 100644 --- a/noncore/settings/networksettings/interfaceinformationimp.cpp +++ b/noncore/settings/networksettings/interfaceinformationimp.cpp @@ -14,14 +14,20 @@ InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *na interface = i; - updateInterface(); - connect(startButton, SIGNAL(clicked()), this, SLOT(start())); - connect(stopButton, SIGNAL(clicked()), this, SLOT(stop())); - connect(restartButton, SIGNAL(clicked()), this, SLOT(restart())); - connect(refreshButton, SIGNAL(clicked()), this, SLOT(refresh())); + connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *))); + 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())); } -void InterfaceInformationImp::updateInterface(){ +/** + * 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){ if(interface->getStatus()){ startButton->setEnabled(false); @@ -41,37 +47,4 @@ void InterfaceInformationImp::updateInterface(){ /** - * Start the interface. Update the information if successfull - */ -void InterfaceInformationImp::start(){ - if(interface->start()){ - updateInterface(); - } -} - -/** - * Stop the interface. - */ -void InterfaceInformationImp::stop(){ - if(interface->stop()){ - updateInterface(); - } -} - -/*** - * Tell the interface to refresh its information. - **/ -void InterfaceInformationImp::refresh(){ - if(interface->refresh()) - updateInterface(); -} - -void InterfaceInformationImp::restart(){ - if(interface->restart()){ - updateInterface(); - } -} - - -/** * Create the advanced widget. Fill it with the current interface's information. * Display it. |