class KInstance


Definition#include <kinstance.h>
Inherited byKApplication, KUniqueApplication
Annotated List
Files
Globals
Hierarchy
Index
Main

Public Methods


Detailed Description

This class implements a very simple IPC mechanism for KDE. You can send a message of a predefined type to either a specific application, or to all KDE application on the current display. The message can carry one integer of data.

KIPC is mainly used in KDE for sending "Change Messages", i.e. a message to all KDE apps that a certain setting (the font, for example) has changed. For anything more complex it is recommended to use DCOP -- the Desktop Communications Protocol.

Messages with id code < 32 are called "System Messages". These are directly handled by KApplication. Examples are: PaletteChanged and StyleChanged. Messages with id code >= 32 are user messages. KApplication emits the signal kipcMessage(id,arg) for each user message it receives.

KIPC is implemented using X11 ClientMessage events.

 KInstance ( const QCString& instanceName)

Constructor

Parameters:
instanceNamethe name of the instance

 KInstance ( const KAboutData * aboutData = 0L )

Constructor

When building a KInstance that is not your KApplication, make sure that the KAboutData and the KInstance have the same life time. You have to destroy both, since the instance doesn't own the about data. Don't build a KAboutData on the stack in this case ! Building a KAboutData on the stack is only ok for usage with KCmdLineArgs and KApplication (not destroyed until the app exits).

Parameters:
aboutDatadata about this instance (see KAboutData)

KInstance ()

[virtual]

Destructor.

KStandardDirsdirs ()

[const]

Retrieve the application standard dirs object.

KConfigconfig ()

[const]

Retrieve the general config object.

KIconLoadericonLoader ()

[const]

Retrieve an iconloader object.

void  newIconLoader ()

[const]

Re-allocate the global iconloader.

KCharsets * charsets ()

[const]

const KAboutDataaboutData ()

[const]

Returns: the about data of this instance Warning, can be 0L

QCString  instanceName ()

[const]

Returns: the instance name

KMimeSourceFactory*  mimeSourceFactory ()

[const]

Mainly added for API completeness and future extensibility.

Returns: the KMimeSourceFactory set as default for this application.

protected: /** * Copy Constructor is not allowed */  KInstance ( const KInstance& )