KDEDModule Class Reference

#include <kdedmodule.h>

Inheritance diagram for KDEDModule:

QObject List of all members.

Detailed Description

The base class for KDED modules.

In KDE 2 and KDE 3, KDED modules are realized as shared libraries that are loaded on-demand into kded at runtime.

To write a config module, you have to create a library that contains at least one factory function like this:

   extern "C" {
     KDE_EXPORT KDEDModule *create_xyz(QCString *name)
     {
       return new XYZ(name);
     }
   }

See kdelibs/kded/HOWTO for more detailed documentation.

Author:
Waldo Bastian <bastian@kde.org>

Definition at line 55 of file kdedmodule.h.


Public Slots

virtual void idle ()

Signals

void moduleDeleted (KDEDModule *)
void windowRegistered (long windowId)
void windowUnregistered (long windowId)

Public Member Functions

 KDEDModule (const QCString &name)
virtual ~KDEDModule ()
void setIdleTimeout (int secs)
void resetIdle ()
void insert (const QCString &app, const QCString &key, KShared *obj)
KShared * find (const QCString &app, const QCString &key)
void remove (const QCString &app, const QCString &key)
void removeAll (const QCString &app)
bool isWindowRegistered (long windowId)

Friends

class Kded

Constructor & Destructor Documentation

KDEDModule::KDEDModule ( const QCString name  ) 

Create a DCOPObject named name.

Definition at line 39 of file kdedmodule.cpp.


Member Function Documentation

void KDEDModule::setIdleTimeout ( int  secs  ) 

Specifies the idle timeout in seconds.

The default is 0.

This will call the idle slot secs seconds after the last reference was removed.

Definition at line 53 of file kdedmodule.cpp.

void KDEDModule::resetIdle (  ) 

Reset the idle timeout counter.

(re)starts the timeout counter if no objects are being referenced.

Definition at line 58 of file kdedmodule.cpp.

void KDEDModule::insert ( const QCString app,
const QCString key,
KShared *  obj 
)

Insert obj indexed with app and key.

The object will be automatically deleted when the application app unregisters with DCOP.

Any previous object inserted with the same values for app and key will be removed.

Definition at line 65 of file kdedmodule.cpp.

KShared * KDEDModule::find ( const QCString app,
const QCString key 
)

Lookup object indexed with app and key.

Definition at line 83 of file kdedmodule.cpp.

void KDEDModule::remove ( const QCString app,
const QCString key 
)

remove object indexed with app and key.

The object will be deleted when it is no more referenced.

Definition at line 96 of file kdedmodule.cpp.

void KDEDModule::removeAll ( const QCString app  ) 

remove all objects indexed with app.

The objects will be deleted when they are no more referenced.

Definition at line 106 of file kdedmodule.cpp.

bool KDEDModule::isWindowRegistered ( long  windowId  ) 

Returns whether a certain mainwindow has registered itself with KDED.

Definition at line 125 of file kdedmodule.cpp.

virtual void KDEDModule::idle (  )  [inline, virtual, slot]

Called whenever the last referenced object gets dereferenced.

See also setIdleTimeout()

You may delete the module from this slot.

Definition at line 126 of file kdedmodule.h.

void KDEDModule::moduleDeleted ( KDEDModule  )  [signal]

Emitted when the module is being deleted.

void KDEDModule::windowRegistered ( long  windowId  )  [signal]

Emitted when a mainwindow registers itself.

void KDEDModule::windowUnregistered ( long  windowId  )  [signal]

Emitted when a mainwindow unregisters itself.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys