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

Public Member Functions | |
KInstance (const QCString &instanceName) | |
KInstance (const KAboutData *aboutData) | |
KInstance (KInstance *src) | |
virtual | ~KInstance () |
KStandardDirs * | dirs () const |
KConfig * | config () const |
KSharedConfig * | sharedConfig () const |
KIconLoader * | iconLoader () const |
void | newIconLoader () const |
const KAboutData * | aboutData () const |
QCString | instanceName () const |
KMimeSourceFactory * | mimeSourceFactory () const |
Protected Member Functions | |
KInstance (const KInstance &) | |
void | setConfigName (const QString &name) |
virtual void | virtual_hook (int id, void *data) |
Friends | |
class | KStandardDirs |
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.29 2003/09/24 13:05:09 waba Exp
Definition at line 44 of file kinstance.h.
Constructor & Destructor Documentation
|
Constructor.
Definition at line 69 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 87 of file kinstance.cpp. References QCString::isEmpty(), and KGlobal::setActiveInstance(). |
|
Destructor.
Definition at line 132 of file kinstance.cpp. References KGlobal::setActiveInstance(). |
|
Copy Constructor is not allowed.
|
Member Function Documentation
|
Returns the application standard dirs object.
Definition at line 159 of file kinstance.cpp. References KConfig::reparseConfiguration(). Referenced by KGlobal::dirs(), KLibLoader::findLibrary(), iconLoader(), KStandardDirs::locate(), KStandardDirs::locateLocal(), and newIconLoader(). |
|
Returns the general config object ("appnamerc").
Definition at line 174 of file kinstance.cpp. References KStandardDirs::addCustomized(), QString::find(), QString::isEmpty(), QCString::isEmpty(), QString::left(), KUser::loginName(), and QString::mid(). Referenced by KGlobal::config(), KCmdLineArgs::enable_i18n(), KNotifyClient::Instance::Instance(), KApplication::invokeMailer(), KLocale::KLocale(), and sharedConfig(). |
|
Returns the general config object ("appnamerc").
Definition at line 236 of file kinstance.cpp. References config(). Referenced by KGlobal::sharedConfig(). |
|
Returns an iconloader object.
Definition at line 251 of file kinstance.cpp. References dirs(). Referenced by KIconLoader::BarIcon(), KIconLoader::BarIconSet(), KIconLoader::DesktopIcon(), KIconLoader::DesktopIconSet(), KWin::icon(), KGlobal::iconLoader(), KIconLoader::IconSize(), KIconLoader::MainBarIcon(), KIconLoader::MainBarIconSet(), mimeSourceFactory(), KIconLoader::SmallIcon(), KIconLoader::SmallIconSet(), KIconLoader::UserIcon(), and KIconLoader::UserIconSet(). |
|
Re-allocate the global iconloader.
Definition at line 262 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 269 of file kinstance.cpp. Referenced by KApplication::caption(), and KCrash::defaultCrashHandler(). |
|
Returns the name of the instance.
Definition at line 275 of file kinstance.cpp. Referenced by KConfigBackEnd::checkConfigFilesWritable(), KApplication::icon(), KApplication::iconName(), KApplication::KApplication(), KApplication::miniIcon(), and KApplication::miniIconName(). |
|
Returns the KMimeSourceFactory of the instance. Mainly added for API completeness and future extensibility.
Definition at line 281 of file kinstance.cpp. References iconLoader(). |
|
Set name of default config file.
Definition at line 245 of file kinstance.cpp. |
The documentation for this class was generated from the following files: