org.kde.koala

Class KGlobal

public class KGlobal extends Object implements QtSupport

Access to the KDE global objects. KGlobal provides you with pointers of many central objects that exist only once in the process. It is also responsible for managing instances of KStaticDeleterBase.

Author: Sirtaj Singh Kang (taj@kde.org)

See Also: KStaticDeleterBase

UNKNOWN: Access to the KDE global objects.

Constructor Summary
protected KGlobal(Class dummy)
KGlobal()
Method Summary
static KInstanceInterfaceactiveInstance()
static KCharsetscharsets()
The global charset manager.
static KConfigconfig()
Returns the general config object.
static voiddeleteStaticDeleters()
Calls KStaticDeleterBase.destructObject() on all registered static deleters and unregisters them all.
static KStandardDirsdirs()
Returns the application standard dirs object.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
static KIconLoadericonLoader()
Returns an iconloader object.
static KInstanceInterfaceinstance()
Returns the global instance.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
static KLocalelocale()
Returns the global locale object.
static voidregisterStaticDeleter(KStaticDeleterBase d)
Registers a static deleter.
static voidsetActiveInstance(KInstanceInterface d)
The instance currently active (useful in a multi-instance application, such as a KParts application).
static KSharedConfigsharedConfig()
Returns the general config object.
static StringstaticQString(String str)
Creates a static String.
static voidunregisterStaticDeleter(KStaticDeleterBase d)
Unregisters a static deleter.

Constructor Detail

KGlobal

protected KGlobal(Class dummy)

KGlobal

public KGlobal()

Method Detail

activeInstance

public static KInstanceInterface activeInstance()

charsets

public static KCharsets charsets()
The global charset manager.

Returns: the global charset manager

UNKNOWN: The global charset manager.

config

public static KConfig config()
Returns the general config object.

Returns: the global configuration object.

UNKNOWN: Returns the general config object.

deleteStaticDeleters

public static void deleteStaticDeleters()
Calls KStaticDeleterBase.destructObject() on all registered static deleters and unregisters them all.

See Also: KStaticDeleterBase KStaticDeleter

UNKNOWN: Calls KStaticDeleterBase.destructObject() on all registered static deleters and unregisters them all.

dirs

public static KStandardDirs dirs()
Returns the application standard dirs object.

Returns: the global standard dir object

UNKNOWN: Returns the application standard dirs object.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

iconLoader

public static KIconLoader iconLoader()
Returns an iconloader object.

Returns: the global iconloader object

UNKNOWN: Returns an iconloader object.

instance

public static KInstanceInterface instance()
Returns the global instance. There is always at least one instance of a component in one application (in most cases the application itself).

Returns: the global instance

UNKNOWN: Returns the global instance.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

locale

public static KLocale locale()
Returns the global locale object.

Returns: the global locale object

UNKNOWN: Returns the global locale object.

registerStaticDeleter

public static void registerStaticDeleter(KStaticDeleterBase d)
Registers a static deleter.

Parameters: d the static deleter to register

See Also: KStaticDeleterBase KStaticDeleter

UNKNOWN: Registers a static deleter.

setActiveInstance

public static void setActiveInstance(KInstanceInterface d)
The instance currently active (useful in a multi-instance application, such as a KParts application). Don't use this - it's mainly for KAboutDialog and KBugReport.

UNKNOWN: The instance currently active (useful in a multi-instance application, such as a KParts application).

sharedConfig

public static KSharedConfig sharedConfig()
Returns the general config object.

Returns: the global configuration object.

UNKNOWN: Returns the general config object.

staticQString

public static String staticQString(String str)
Creates a static String. To be used inside functions(!) like:
		 static StringmyString = KGlobal.staticString("myText");
		 
!!! Do _NOT_ use: !!!
		 static String myString = KGlobal.staticString("myText");
		 
This creates a static object (instead of a static reference) and as you know static objects are EVIL.

Parameters: str the string to create

Returns: the static string

UNKNOWN: Creates a static String.

unregisterStaticDeleter

public static void unregisterStaticDeleter(KStaticDeleterBase d)
Unregisters a static deleter.

Parameters: d the static deleter to unregister

See Also: KStaticDeleterBase KStaticDeleter

UNKNOWN: Unregisters a static deleter.