From 838baf3f99ec5ab81b063eb5449a3381d860f377 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:58:26 +0000 Subject: 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 --- knetwalk/src/cell.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'knetwalk/src/cell.cpp') 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); } -- cgit v1.2.1