summaryrefslogtreecommitdiffstats
path: root/libksirtet/base/factory.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /libksirtet/base/factory.cpp
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libksirtet/base/factory.cpp')
-rw-r--r--libksirtet/base/factory.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/libksirtet/base/factory.cpp b/libksirtet/base/factory.cpp
new file mode 100644
index 00000000..55850f0b
--- /dev/null
+++ b/libksirtet/base/factory.cpp
@@ -0,0 +1,52 @@
+#include "factory.h"
+
+#include <kaboutdata.h>
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kglobal.h>
+#include <klocale.h>
+
+#include "settings.h"
+
+
+BaseFactory *BaseFactory::_self = 0;
+
+BaseFactory::BaseFactory(const MainData &md, const BaseBoardInfo &bi)
+ : mainData(md), bbi(bi)
+{
+ Q_ASSERT( _self==0 );
+ _self = this;
+ _aboutData =
+ new KAboutData(md.appName, md.trName, md.longVersion, md.description,
+ KAboutData::License_GPL,
+ "(c) 1995, Eirik Eng\n(c) 1996-2004, Nicolas Hadacek",
+ 0, md.homepage);
+ _aboutData->addAuthor("Nicolas Hadacek", 0, "hadacek@kde.org");
+ _aboutData->addCredit("Eirik Eng", I18N_NOOP("Core engine"));
+}
+
+void BaseFactory::init(int argc, char **argv)
+{
+ KCmdLineArgs::init(argc, argv, _aboutData);
+ (void)new KApplication;
+ KGlobal::locale()->insertCatalogue("libkdegames");
+ KGlobal::locale()->insertCatalogue("libksirtet");
+}
+
+BaseFactory::~BaseFactory()
+{
+ delete kapp;
+ delete _aboutData;
+ Q_ASSERT(_self);
+ _self = 0;
+}
+
+QWidget *BaseFactory::createAppearanceConfig()
+{
+ return new BaseAppearanceConfig;
+}
+
+QWidget *BaseFactory::createColorConfig()
+{
+ return new ColorConfig;
+}