# class KInstance | Access to KDE global objects for use in shared libraries. More...
Definition | `#include <kinstance.h>`
Inherited by | KApplication, KUniqueApplication
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KInstance ( const QCString& instanceName)
- KInstance ( const KAboutData * aboutData )
- virtual ~KInstance ()
- KStandardDirs * dirs () const
- KConfig * config () const
- KIconLoader * iconLoader () const
- void newIconLoader () const
- KCharsets * charsets () const
- const KAboutData * aboutData () const
- QCString instanceName () const
- KMimeSourceFactory* mimeSourceFactory () const

#### Protected Methods

- KInstance ( const KInstance& )

## Detailed Description

Access to KDE global objects for use in shared libraries. In practical terms, this class is used in KDE components. This allows components to store things that normally would be accessed by KGlobal.

KInstance ( const QCString& instanceName) | ### KInstance

Constructor

Parameters:

instanceName | the name of the instance

KInstance ( const KAboutData * aboutData ) | ### KInstance

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:

aboutData | data about this instance (see KAboutData)

~KInstance () | ### ~KInstance

[virtual]

Destructor.

KStandardDirs * dirs () | ### dirs

[const]

Retrieve the application standard dirs object.

KConfig * config () | ### config

[const]

Retrieve the general config object.

KIconLoader * iconLoader () | ### iconLoader

[const]

Retrieve an iconloader object.

void newIconLoader () | ### newIconLoader

[const]

Re-allocate the global iconloader.

KCharsets * charsets () | ### charsets

[const]

const KAboutData * aboutData () | ### aboutData

[const]

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

QCString instanceName () | ### instanceName

[const]

Returns: the instance name

KMimeSourceFactory* mimeSourceFactory () | ### mimeSourceFactory

[const]

Mainly added for API completeness and future extensibility.

Returns: the KMimeSourceFactory set as default for this application.

KInstance ( const KInstance& ) | ### KInstance

[protected]

Copy Constructor is not allowed

- Version: $Id: kinstance.h,v 1.19 2001/01/20 10:42:07 coolo Exp $
- Author: Torben Weis
- Generated: root@i386.ports.openbsd.org on Wed Apr 25 13:58:13 2001, using kdoc 2.0a53.