diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /knetwalk/src/cell.cpp | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip |
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knetwalk/src/cell.cpp')
-rw-r--r-- | knetwalk/src/cell.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/knetwalk/src/cell.cpp b/knetwalk/src/cell.cpp index a08b0d78..7df96806 100644 --- a/knetwalk/src/cell.cpp +++ b/knetwalk/src/cell.cpp @@ -52,16 +52,16 @@ void Cell::initPixmaps() TQImage image = connectedpixmap[it.key()]->convertToImage(); for(int y = 0; y < image.height(); y++) { - QRgb* line = (QRgb*)image.scanLine(y); + TQRgb* line = (TQRgb*)image.scanLine(y); for(int x = 0; x < image.width(); x++) { - QRgb pix = line[x]; - if(qAlpha(pix) == 255) + TQRgb pix = line[x]; + if(tqAlpha(pix) == 255) { - int g = (255 + 4 * qGreen(pix)) / 5; - int b = (255 + 4 * qBlue(pix)) / 5; - int r = (255 + 4 * qRed(pix)) / 5; - line[x] = qRgb(r, g, b); + int g = (255 + 4 * tqGreen(pix)) / 5; + int b = (255 + 4 * tqBlue(pix)) / 5; + int r = (255 + 4 * tqRed(pix)) / 5; + line[x] = tqRgb(r, g, b); } } } @@ -69,7 +69,7 @@ void Cell::initPixmaps() } } -Cell::Cell(TQWidget* parent, int i) : TQWidget(parent, 0, WNoAutoErase) +Cell::Cell(TQWidget* tqparent, int i) : TQWidget(tqparent, 0, WNoAutoErase) { angle = 0; light = 0; @@ -203,11 +203,11 @@ void Cell::paintEvent(TQPaintEvent*) void Cell::mousePressEvent(TQMouseEvent* e) { - if(e->button() == LeftButton) + if(e->button() == Qt::LeftButton) emit lClicked(iindex); - else if(e->button() == RightButton) + else if(e->button() == Qt::RightButton) emit rClicked(iindex); - else if(e->button() == MidButton) + else if(e->button() == Qt::MidButton) emit mClicked(iindex); } |