diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | c90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch) | |
tree | 6d8391395bce9eaea4ad78958617edb20c6a7573 /libksirtet/base/factory.h | |
download | tdegames-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.h')
-rw-r--r-- | libksirtet/base/factory.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/libksirtet/base/factory.h b/libksirtet/base/factory.h new file mode 100644 index 00000000..b542205e --- /dev/null +++ b/libksirtet/base/factory.h @@ -0,0 +1,60 @@ +#ifndef BASE_FACTORY_H +#define BASE_FACTORY_H + +#include <qglobal.h> + +#include <kdemacros.h> + +struct MainData { + const char *appName, *trName, *description, *homepage, *removedLabel, + *version, *longVersion; +}; + +struct BaseBoardInfo { + uint width, height; + bool withPieces; + + uint beforeRemoveTime, afterRemoveTime; + uint nbToggles, nbFallStages; + + uint nbArcadeStages; + + const uint *histogram; + uint histogramSize; + bool scoreBound; +}; + +class BaseBoard; +class BaseInterface; +class QWidget; +class KAboutData; + +#define bfactory BaseFactory::self() + +class KDE_EXPORT BaseFactory +{ + public: + BaseFactory(const MainData &, const BaseBoardInfo &); + virtual ~BaseFactory(); + void init(int argc, char **argv); + + static BaseFactory *self() { return _self; } + + const MainData &mainData; + const BaseBoardInfo &bbi; + + virtual BaseBoard *createBoard(bool graphic, QWidget *parent) = 0; + virtual BaseInterface *createInterface(QWidget *parent) = 0; + + virtual QWidget *createAppearanceConfig(); + virtual QWidget *createColorConfig(); + virtual QWidget *createGameConfig() { return 0; } + + protected: + KAboutData *_aboutData; + + private: + static BaseFactory *_self; +}; + +#endif |