Diffstat (limited to 'noncore/apps/tinykate/libkate/microkde/kglobal.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/microkde/kglobal.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/libkate/microkde/kglobal.cpp b/noncore/apps/tinykate/libkate/microkde/kglobal.cpp new file mode 100644 index 0000000..572768d --- a/dev/null +++ b/noncore/apps/tinykate/libkate/microkde/kglobal.cpp | |||
@@ -0,0 +1,49 @@ | |||
1 | #include "kglobal.h" | ||
2 | |||
3 | KLocale *KGlobal::mLocale = 0; | ||
4 | KConfig *KGlobal::mConfig = 0; | ||
5 | KIconLoader *KGlobal::mIconLoader = 0; | ||
6 | KStandardDirs *KGlobal::mDirs = 0; | ||
7 | |||
8 | QString KGlobal::mAppName = "godot"; | ||
9 | |||
10 | KLocale *KGlobal::locale() | ||
11 | { | ||
12 | if ( !mLocale ) { | ||
13 | mLocale = new KLocale(); | ||
14 | } | ||
15 | |||
16 | return mLocale; | ||
17 | } | ||
18 | |||
19 | KConfig *KGlobal::config() | ||
20 | { | ||
21 | if ( !mConfig ) { | ||
22 | mConfig = new KConfig( KStandardDirs::appDir() + mAppName + "rc" ); | ||
23 | } | ||
24 | |||
25 | return mConfig; | ||
26 | } | ||
27 | |||
28 | KIconLoader *KGlobal::iconLoader() | ||
29 | { | ||
30 | if ( !mIconLoader ) { | ||
31 | mIconLoader = new KIconLoader(); | ||
32 | } | ||
33 | |||
34 | return mIconLoader; | ||
35 | } | ||
36 | |||
37 | KStandardDirs *KGlobal::dirs() | ||
38 | { | ||
39 | if ( !mDirs ) { | ||
40 | mDirs = new KStandardDirs(); | ||
41 | } | ||
42 | |||
43 | return mDirs; | ||
44 | } | ||
45 | |||
46 | void KGlobal::setAppName( const QString &appName ) | ||
47 | { | ||
48 | mAppName = appName; | ||
49 | } | ||