author | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
---|---|---|
committer | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
commit | e97a6da57804aa14907dec327fbae71bff9b383e (patch) (side-by-side diff) | |
tree | 15f6ee292dba24bdda72f5c72f6d2224c3516763 /noncore/apps/tinykate/libkate/microkde/kglobal.cpp | |
parent | 7c012ee8cd16d8befacc6f6750711443fac0fd5e (diff) | |
download | opie-e97a6da57804aa14907dec327fbae71bff9b383e.zip opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.gz opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.bz2 |
import of tiny kate. (saving not possible yet)
Diffstat (limited to 'noncore/apps/tinykate/libkate/microkde/kglobal.cpp') (more/less context) (ignore 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 @@ +#include "kglobal.h" + +KLocale *KGlobal::mLocale = 0; +KConfig *KGlobal::mConfig = 0; +KIconLoader *KGlobal::mIconLoader = 0; +KStandardDirs *KGlobal::mDirs = 0; + +QString KGlobal::mAppName = "godot"; + +KLocale *KGlobal::locale() +{ + if ( !mLocale ) { + mLocale = new KLocale(); + } + + return mLocale; +} + +KConfig *KGlobal::config() +{ + if ( !mConfig ) { + mConfig = new KConfig( KStandardDirs::appDir() + mAppName + "rc" ); + } + + return mConfig; +} + +KIconLoader *KGlobal::iconLoader() +{ + if ( !mIconLoader ) { + mIconLoader = new KIconLoader(); + } + + return mIconLoader; +} + +KStandardDirs *KGlobal::dirs() +{ + if ( !mDirs ) { + mDirs = new KStandardDirs(); + } + + return mDirs; +} + +void KGlobal::setAppName( const QString &appName ) +{ + mAppName = appName; +} |