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 /klickety/piece.cpp | |
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 'klickety/piece.cpp')
-rw-r--r-- | klickety/piece.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/klickety/piece.cpp b/klickety/piece.cpp index 4a33910b..fcc2fdff 100644 --- a/klickety/piece.cpp +++ b/klickety/piece.cpp @@ -1,6 +1,6 @@ #include "piece.h" -#include <qpainter.h> +#include <tqpainter.h> #include <klocale.h> #include "base/board.h" @@ -9,26 +9,26 @@ const char *KLPieceInfo::DEFAULT_COLORS[NB_BLOCK_TYPES] = { "#C86464", "#64C864", "#6464C8", "#C8C864", "#C864C8" }; -QColor KLPieceInfo::defaultColor(uint i) const +TQColor KLPieceInfo::defaultColor(uint i) const { - if ( i>=nbColors() ) return QColor(); - return QColor(DEFAULT_COLORS[i]); + if ( i>=nbColors() ) return TQColor(); + return TQColor(DEFAULT_COLORS[i]); } -QString KLPieceInfo::colorLabel(uint i) const +TQString KLPieceInfo::colorLabel(uint i) const { return i18n("Color #%1:").arg(i+1); } -void KLPieceInfo::draw(QPixmap *pixmap, uint blockType, uint bMode, +void KLPieceInfo::draw(TQPixmap *pixmap, uint blockType, uint bMode, bool lighted) const { - QColor col = color(blockType); + TQColor col = color(blockType); if (lighted) col = col.light(); pixmap->fill(col); - QPainter p(pixmap); - QRect r = pixmap->rect(); + TQPainter p(pixmap); + TQRect r = pixmap->rect(); p.setPen(col.dark()); if ( !(bMode & BaseBoard::Up) ) @@ -42,11 +42,11 @@ void KLPieceInfo::draw(QPixmap *pixmap, uint blockType, uint bMode, p.setPen(col.dark(110)); if (bMode & BaseBoard::Up) - p.drawLine(r.topLeft()+QPoint(1,0), r.topRight()+QPoint(-1,0)); + p.drawLine(r.topLeft()+TQPoint(1,0), r.topRight()+TQPoint(-1,0)); if (bMode & BaseBoard::Down) - p.drawLine(r.bottomLeft()+QPoint(1,0), r.bottomRight()+QPoint(-1,0)); + p.drawLine(r.bottomLeft()+TQPoint(1,0), r.bottomRight()+TQPoint(-1,0)); if (bMode & BaseBoard::Left) - p.drawLine(r.topLeft()+QPoint(0,1), r.bottomLeft()+QPoint(0,-1)); + p.drawLine(r.topLeft()+TQPoint(0,1), r.bottomLeft()+TQPoint(0,-1)); if (bMode & BaseBoard::Right) - p.drawLine(r.topRight()+QPoint(0,1), r.bottomRight()+QPoint(0,-1)); + p.drawLine(r.topRight()+TQPoint(0,1), r.bottomRight()+TQPoint(0,-1)); } |