22 #include <tdeconfig.h> 23 #include <tdeglobal.h> 24 #include <kstaticdeleter.h> 28 #include "networkstatus.h" 32 static KStaticDeleter<NetworkStatus> networkStatusDeleter; 36 : TQObject( 0, "NetworkStatus" ), DCOPObject( "NetworkStatus" ) 38 TDEConfigGroup group( TDEGlobal::config(), "NetworkStatus" ); 39 if ( group.readBoolEntry( "Online", true ) == true ) 44 connectDCOPSignal( 0, 0, "onlineStatusChanged()", "onlineStatusChanged()", false ); 49 TDEConfigGroup group( TDEGlobal::config(), "NetworkStatus" ); 50 group.writeEntry( "Online", mStatus == Online ); 67 DCOPRef dcopCall( "kded", "networkstatus" ); 68 DCOPReply reply = dcopCall.call( "onlineStatus()", true ); 69 if ( reply.isValid() ) { 74 if ( mStatus != Offline ) 88 #include "networkstatus.moc" static NetworkStatus * self() Returns the only instance of this class.
Status status() const Returns the current status.
~NetworkStatus() Destructor.
This is a class for monitoring network status – basically, the machine KDE is running on going from...
void statusChanged(Status status) Emitted whenever the status has changed.
void onlineStatusChanged() Called by the network interface watcher in KDED.
KPIM holds all kinds of functions specific to KDE PIM.
NetworkStatus() Constructor.
Status The possible states.
void setStatus(Status status) Sets a new status.
|