KInstance Class Reference
Access to KDE global objects for use in shared libraries. More...
#include <kinstance.h>
Inheritance diagram for KInstance:

Public Methods | |
KInstance (const QCString &instanceName) | |
Constructor. | |
KInstance (const KAboutData *aboutData) | |
Constructor. | |
virtual | ~KInstance () |
Destructor. | |
KStandardDirs * | dirs () const |
Returns the application standard dirs object. | |
KConfig * | config () const |
Returns the general config object ("appnamerc"). | |
KIconLoader * | iconLoader () const |
Returns an iconloader object. | |
void | newIconLoader () const |
Re-allocate the global iconloader. | |
const KAboutData * | aboutData () const |
Returns the about data of this instance Warning, can be 0L. | |
QCString | instanceName () const |
Returns the name of the instance. | |
KMimeSourceFactory * | mimeSourceFactory () const |
Returns the KMimeSourceFactory of the instance. | |
Protected Methods | |
KInstance (const KInstance &) | |
Copy Constructor is not allowed. | |
void | setConfigName (const QString &name) |
Set name of default config file. |
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
- Version:
- Id:
- kinstance.h,v 1.26 2002/09/28 12:28:47 tjansen Exp
Definition at line 42 of file kinstance.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 50 of file kinstance.cpp. References KGlobal::setActiveInstance(). |
|
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).
Definition at line 67 of file kinstance.cpp. References QCString::isEmpty(), and KGlobal::setActiveInstance(). |
|
Destructor.
Definition at line 109 of file kinstance.cpp. References KGlobal::setActiveInstance(). |
|
Copy Constructor is not allowed.
|
Member Function Documentation
|
Returns the application standard dirs object.
Definition at line 132 of file kinstance.cpp. References KStandardDirs::addCustomized(), and KConfig::reparseConfiguration(). Referenced by KGlobal::dirs(), KLibLoader::findLibrary(), iconLoader(), KStandardDirs::locate(), KStandardDirs::locateLocal(), and newIconLoader(). |
|
Returns the general config object ("appnamerc").
Definition at line 144 of file kinstance.cpp. References KStandardDirs::addCustomized(), QCString::isEmpty(), KConfigBase::readBoolEntry(), KConfig::reparseConfiguration(), and KConfigBase::setGroup(). Referenced by KGlobal::config(), KCmdLineArgs::enable_i18n(), KNotifyClient::Instance::Instance(), KApplication::invokeMailer(), and KLocale::KLocale(). |
|
Returns an iconloader object.
Definition at line 184 of file kinstance.cpp. References dirs(), and KIconLoader::enableDelayedIconSetLoading(). Referenced by KWin::icon(), KGlobal::iconLoader(), and mimeSourceFactory(). |
|
Re-allocate the global iconloader.
Definition at line 194 of file kinstance.cpp. References dirs(), KIconLoader::reconfigure(), and KIconTheme::reconfigure(). |
|
Returns the about data of this instance Warning, can be 0L.
Definition at line 200 of file kinstance.cpp. Referenced by KApplication::caption(), and KCrash::defaultCrashHandler(). |
|
Returns the name of the instance.
Definition at line 205 of file kinstance.cpp. Referenced by KApplication::icon(), KApplication::iconName(), KApplication::KApplication(), KApplication::miniIcon(), KApplication::miniIconName(), and KGlobal::setActiveInstance(). |
|
Returns the KMimeSourceFactory of the instance. Mainly added for API completeness and future extensibility.
Definition at line 210 of file kinstance.cpp. References iconLoader(). |
|
Set name of default config file.
Definition at line 179 of file kinstance.cpp. |
The documentation for this class was generated from the following files: