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/lib/mp_simple_board.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/lib/mp_simple_board.h')
-rw-r--r-- | libksirtet/lib/mp_simple_board.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libksirtet/lib/mp_simple_board.h b/libksirtet/lib/mp_simple_board.h new file mode 100644 index 00000000..2131feb2 --- /dev/null +++ b/libksirtet/lib/mp_simple_board.h @@ -0,0 +1,45 @@ +#ifndef MP_SIMPLE_BOARD_H +#define MP_SIMPLE_BOARD_H + +#include "mp_board.h" +#include "mp_simple_types.h" + +#include <kdemacros.h> + +class KDE_EXPORT MPSimpleBoard : public MPBoard +{ + Q_OBJECT + + public: + MPSimpleBoard(QWidget *parent = 0, const char *name = 0) + : MPBoard(parent, name) {} + virtual ~MPSimpleBoard() {} + + void init(bool AI, bool multiplayers, bool server, bool first, + const QString &name); + void dataOut(QDataStream &s); + void dataIn(QDataStream &s); + + protected: + virtual void _init(bool AI, bool multiplayers, bool server, bool first, + const QString &name) = 0; + virtual void _initFlag(QDataStream &s) = 0; + virtual void _playFlag(QDataStream &s) = 0; + virtual void _pauseFlag(bool pause) = 0; + virtual void _stopFlag(bool gameover) = 0; + virtual void _dataOut(QDataStream &s) = 0; + virtual void _gameOverDataOut(QDataStream &s) = 0; + virtual void _initDataOut(QDataStream &s) = 0; + + private: + BoardState state; + + void initFlag(QDataStream &s); + void playFlag(QDataStream &s); + void pauseFlag(); + void stopFlag(); + void gameOverFlag(); + void _stop(bool button); +}; + +#endif // MP_SIMPLE_BOARD_H |