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/common/misc_ui.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/common/misc_ui.h')
-rw-r--r-- | libksirtet/common/misc_ui.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/libksirtet/common/misc_ui.h b/libksirtet/common/misc_ui.h new file mode 100644 index 00000000..3a89acaa --- /dev/null +++ b/libksirtet/common/misc_ui.h @@ -0,0 +1,81 @@ +#ifndef COMMON_MISC_UI_H +#define COMMON_MISC_UI_H + +#include <qcanvas.h> +#include <qptrvector.h> +#include <qhbox.h> + +#include <kgameprogress.h> +#include "lib/libksirtet_export.h" + +#include "base/board.h" + +/*****************************************************************************/ +class LIBKSIRTET_EXPORT ShowNextPiece : public FixedCanvasView +{ + Q_OBJECT + public: + ShowNextPiece(BaseBoard *, QWidget *parent); +}; + +/*****************************************************************************/ +class LIBKSIRTET_EXPORT Shadow : public QWidget +{ + Q_OBJECT + public: + Shadow(BaseBoard *, QWidget *parent); + + virtual QSize sizeHint() const; + virtual QSizePolicy sizePolicy() const; + void setDisplay(bool show); + + private: + int _xOffset; + const BaseBoard *_board; + bool _show; + + void paintEvent(QPaintEvent *); +}; + +/*****************************************************************************/ +class Led; + +class LIBKSIRTET_EXPORT GiftPool : public QHBox +{ + Q_OBJECT + public: + GiftPool(QWidget *parent); + + virtual QSize sizeHint() const; + virtual QSizePolicy sizePolicy() const; + + void reset(); + void put(uint); + uint take(); + bool pending() const { return ready; } + + private slots: + void timeout() { ready = true; } + + private: + QPtrVector<Led> leds; + uint _timeout, nb; + bool ready; +}; + + +/*****************************************************************************/ +class LIBKSIRTET_EXPORT PlayerProgress : public KGameProgress +{ + Q_OBJECT +public: + PlayerProgress(BaseBoard *board, QWidget *parent = 0, const char *name = 0); + + virtual QSize sizeHint() const; + virtual QSizePolicy sizePolicy() const; + +private: + BaseBoard *_board; +}; + +#endif |