• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KDECore

KInstance Class Reference

Access to KDE global objects for use in shared libraries. More...

#include <kinstance.h>

Inheritance diagram for KInstance:

Inheritance graph
[legend]

List of all members.


Public Member Functions

const KAboutData * aboutData () const
KConfig * config () const
KStandardDirs * dirs () const
KIconLoader * iconLoader () const
QCString instanceName () const
 KInstance (KInstance *src)
 KInstance (const KAboutData *aboutData)
 KInstance (const QCString &instanceName)
KMimeSourceFactory * mimeSourceFactory () const
void newIconLoader () const
KSharedConfig * sharedConfig () const
virtual ~KInstance ()

Protected Member Functions

 KInstance (const KInstance &)
void setConfigName (const QString &name)
virtual void virtual_hook (int id, void *data)

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.

Author:
Torben Weis

Definition at line 43 of file kinstance.h.


Constructor & Destructor Documentation

KInstance::KInstance ( const QCString &  instanceName  ) 

Constructor.

Parameters:
instanceName the name of the instance

Definition at line 69 of file kinstance.cpp.

KInstance::KInstance ( const KAboutData *  aboutData  ) 

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)

Definition at line 87 of file kinstance.cpp.

KInstance::KInstance ( KInstance *  src  ) 

Definition at line 106 of file kinstance.cpp.

KInstance::~KInstance (  )  [virtual]

Destructor.

Definition at line 132 of file kinstance.cpp.

KInstance::KInstance ( const KInstance &   )  [protected]

Copy Constructor is not allowed.


Member Function Documentation

const KAboutData * KInstance::aboutData (  )  const

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

Returns:
the about data of the instance, or 0 if it has not been set yet

Definition at line 257 of file kinstance.cpp.

KConfig * KInstance::config (  )  const

Returns the general config object ("appnamerc").

Returns:
the KConfig object for the instance.

Definition at line 177 of file kinstance.cpp.

KStandardDirs * KInstance::dirs (  )  const

Returns the application standard dirs object.

Returns:
The KStandardDirs of the application.

Definition at line 159 of file kinstance.cpp.

KIconLoader * KInstance::iconLoader (  )  const

Returns an iconloader object.

Returns:
the iconloader object.

Definition at line 239 of file kinstance.cpp.

QCString KInstance::instanceName (  )  const

Returns the name of the instance.

Returns:
the instance name, can be null if the KInstance has been created with a null name

Definition at line 263 of file kinstance.cpp.

KMimeSourceFactory * KInstance::mimeSourceFactory (  )  const

Returns the KMimeSourceFactory of the instance.

Mainly added for API completeness and future extensibility.

Returns:
the KMimeSourceFactory set as default for this application.

Definition at line 269 of file kinstance.cpp.

void KInstance::newIconLoader (  )  const

Re-allocate the global iconloader.

Definition at line 250 of file kinstance.cpp.

void KInstance::setConfigName ( const QString &  name  )  [protected]

Set name of default config file.

Parameters:
name the name of the default config file
Since:
3.1

Definition at line 233 of file kinstance.cpp.

KSharedConfig * KInstance::sharedConfig (  )  const

Returns the general config object ("appnamerc").

Returns:
the KConfig object for the instance.

Definition at line 224 of file kinstance.cpp.

void KInstance::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented in KApplication, and KUniqueApplication.

Definition at line 281 of file kinstance.cpp.


The documentation for this class was generated from the following files:
  • kinstance.h
  • kinstance.cpp

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal