class KDEDModule

# class KDEDModule | The base class for KDED modules. More...
Definition | `#include <kdedmodule.h>`
Inherits | DCOPObject (dcop) [public ], QObject (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- 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)

#### Public Slots

- virtual void idle ()

#### Signals

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

## 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" {
         KDEDModule *create_xyz(QCString *name)
         {
           return new XYZ(name);
         }
       }

See kdelibs/kded/HOWTO for more detailed documentation.

KDEDModule (const QCString &name) | ### KDEDModule

Create a DCOPObject named `name`

~KDEDModule () | ### ~KDEDModule

[virtual]

void setIdleTimeout (int secs) | ### setIdleTimeout

Specifies the idle timeout in seconds. The default is 0.

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

void resetIdle () | ### resetIdle

Reset the idle timeout counter.

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

void insert (const QCString &app, const QCString &key, KShared *obj) | ### insert

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.

KShared * find (const QCString &app, const QCString &key) | ### find

Lookup object indexed with `app` and `key`

Reimplemented from DCOPObject.

void remove (const QCString &app, const QCString &key) | ### remove

remove object indexed with `app` and `key`. The object will be deleted when it is no more referenced.

void removeAll (const QCString &app) | ### removeAll

remove all objects indexed with `app`. The objects will be deleted when they are no more referenced.

bool isWindowRegistered (long windowId) | ### isWindowRegistered

Returns whether a certain mainwindow has registered itself with KDED

void idle () | ### idle

[virtual slot]

Called whenever the last referenced object gets dereferenced.

See also setIdleTimeout()

You may delete the module from this slot.

void moduleDeleted (KDEDModule *) | ### moduleDeleted

[signal]

Emitted when the module is being deleted.

void windowRegistered (long windowId) | ### windowRegistered

[signal]

Emitted when a mainwindow registers itself.

void windowUnregistered (long windowId) | ### windowUnregistered

[signal]

Emitted when a mainwindow unregisters itself.

- Author: Waldo Bastian
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:37:05 2003, using kdoc 2.0a54.