diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /libksirtet/base/piece.h | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libksirtet/base/piece.h')
-rw-r--r-- | libksirtet/base/piece.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libksirtet/base/piece.h b/libksirtet/base/piece.h index 4c0486a8..6cdd667c 100644 --- a/libksirtet/base/piece.h +++ b/libksirtet/base/piece.h @@ -1,8 +1,8 @@ #ifndef BASE_PIECE_H #define BASE_PIECE_H -#include <qcanvas.h> -#include <qptrvector.h> +#include <tqcanvas.h> +#include <tqptrvector.h> #include <kgrid2d.h> @@ -29,7 +29,7 @@ class GPieceInfo KGrid2D::Coord maxSize() const; - QPixmap *pixmap(uint blockSize, uint blockType, uint blockMode, + TQPixmap *pixmap(uint blockSize, uint blockType, uint blockMode, bool lighted) const; virtual uint nbNormalBlockTypes() const = 0; @@ -39,23 +39,23 @@ class GPieceInfo uint generateGarbageBlockType(KRandomSequence *) const; virtual uint nbColors() const = 0; - virtual QString colorLabel(uint i) const = 0; - QCString colorKey(uint i) const; - virtual QColor defaultColor(uint i) const = 0; + virtual TQString colorLabel(uint i) const = 0; + TQCString colorKey(uint i) const; + virtual TQColor defaultColor(uint i) const = 0; void loadColors(); protected: - QColor color(uint i) const { return _colors[i]; } + TQColor color(uint i) const { return _colors[i]; } - virtual void draw(QPixmap *, uint blockType, uint blockMode, + virtual void draw(TQPixmap *, uint blockType, uint blockMode, bool lighted) const = 0; - virtual void setMask(QPixmap *, uint /*blockMode*/) const {} + virtual void setMask(TQPixmap *, uint /*blockMode*/) const {} private: - QValueVector<QColor> _colors; + TQValueVector<TQColor> _colors; }; -class SequenceArray : public QMemArray<QCanvasPixmapArray *> +class SequenceArray : public TQMemArray<TQCanvasPixmapArray *> { public: SequenceArray(); @@ -75,7 +75,7 @@ class BlockInfo : public QCanvas BlockInfo(const SequenceArray &); const SequenceArray &sequences() const { return _sequences; } - QPoint toPoint(const KGrid2D::Coord &) const; + TQPoint toPoint(const KGrid2D::Coord &) const; private: const SequenceArray &_sequences; @@ -92,11 +92,11 @@ class Block uint value() const { return _value; } bool isGarbage() const; void toggleLight(); - QCanvasSprite *sprite() const { return _sprite; } + TQCanvasSprite *sprite() const { return _sprite; } private: uint _value; - QCanvasSprite *_sprite; + TQCanvasSprite *_sprite; Block(const Block &); // disabled Block &operator =(const Block &); // disabled @@ -125,8 +125,8 @@ class Piece KGrid2D::Coord size() const { return max() - min() + KGrid2D::Coord(1, 1); } void generateNext(int type = -1); - void rotate(bool left, const QPoint &); - void move(const QPoint &); + void rotate(bool left, const TQPoint &); + void move(const TQPoint &); void moveCenter(); void show(bool show); @@ -136,7 +136,7 @@ class Piece Block *takeBlock(uint k); private: - QPtrVector<Block> _blocks; + TQPtrVector<Block> _blocks; uint _type; KRandomSequence *_random; static GPieceInfo *_info; @@ -149,7 +149,7 @@ class Piece Piece &operator =(const Piece &); // disabled KGrid2D::Coord coord(uint k) const { return KGrid2D::Coord(_i[k], _j[k]); } - void moveBlock(uint k, const QPoint &); + void moveBlock(uint k, const TQPoint &); }; #endif |