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/net/networksetup/interface.h | |
parent | 75f078ec92376db2c90a327bbc50d9bb5c1fb57a (diff) | |
download | opie-18cc7321db186865629a5c4702074211e42b92fd.zip opie-18cc7321db186865629a5c4702074211e42b92fd.tar.gz opie-18cc7321db186865629a5c4702074211e42b92fd.tar.bz2 |
interface is now a qobject
Diffstat (limited to 'noncore/net/networksetup/interface.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interface.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/noncore/net/networksetup/interface.h b/noncore/net/networksetup/interface.h index 1406e99..980171a 100644 --- a/noncore/net/networksetup/interface.h +++ b/noncore/net/networksetup/interface.h @@ -1,54 +1,59 @@ #ifndef INTERFACE_H #define INTERFACE_H #include <qstring.h> +#include <qobject.h> class Module; -class Interface { +class Interface : public QObject{ + Q_OBJECT +signals: + void updateInterface(Interface *i); + public: - Interface(QString name = "unknown", bool status = false); + Interface(QObject * parent=0, const char * name= "unknown", bool status = false); virtual ~Interface(){}; + virtual QString getInterfaceName(){ QString n(this->name()); return n; }; + virtual bool getStatus(){ return status; }; - virtual void setStatus(bool newSatus){ status = newSatus; refresh(); }; + virtual void setStatus(bool newStatus); virtual bool isAttached(){ return attached; }; - virtual void setAttached(bool isAttached=false){ attached = isAttached; }; - - virtual QString getInterfaceName(){ return interfaceName; }; - virtual void setInterfaceName(QString name="unknown"){ interfaceName = name; }; + virtual void setAttached(bool isAttached=false); virtual QString getHardwareName(){ return hardareName; }; - virtual void setHardwareName(QString name="Unknown"){ hardareName = name; }; + virtual void setHardwareName(QString name="Unknown"); virtual Module* getModuleOwner(){ return moduleOwner; }; - virtual void setModuleOwner(Module *owner=NULL){ moduleOwner = owner; }; + virtual void setModuleOwner(Module *owner=NULL); // inet information. QString getMacAddress(){ return macAddress; }; QString getIp(){ return ip; }; QString getSubnetMask(){ return subnetMask; }; QString getBroadcast(){ return broadcast; }; bool isDhcp(){ return dhcp; }; QString getDhcpServerIp(){ return dhcpServerIp; }; QString getLeaseObtained(){ return leaseObtained; }; QString getLeaseExpires(){ return leaseExpires; }; - + +public slots: bool refresh(); - bool start(); - bool stop(); - bool restart(); + void start(); + void stop(); + void restart(); private: // Interface information bool status; bool attached; QString interfaceName; QString hardareName; Module *moduleOwner; // Network information QString macAddress; QString ip; |