Replaced various '#define' with actual strings - part 5

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/29/head
Michele Calgaro 1 year ago
parent 6022ab632c
commit 2d872f6fb6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -114,7 +114,7 @@ void EstateDetails::paintEvent(TQPaintEvent *)
TQColor greenHouse(0, 255, 0); TQColor greenHouse(0, 255, 0);
TQColor redHotel(255, 51, 51); TQColor redHotel(255, 51, 51);
TQPainter painter; TQPainter painter;
painter.begin(TQT_TQPAINTDEVICE(m_pixmap), this); painter.begin(m_pixmap, this);
painter.setPen(TQt::black); painter.setPen(TQt::black);
@ -136,7 +136,7 @@ void EstateDetails::paintEvent(TQPaintEvent *)
quartzBuffer->resize(25, (height()/4)-2); quartzBuffer->resize(25, (height()/4)-2);
TQPainter quartzPainter; TQPainter quartzPainter;
quartzPainter.begin(TQT_TQPAINTDEVICE(quartzBuffer), this); quartzPainter.begin(quartzBuffer, this);
painter.setBrush(titleColor); painter.setBrush(titleColor);
painter.drawRect(0, 0, width(), titleHeight); painter.drawRect(0, 0, width(), titleHeight);

@ -255,7 +255,7 @@ void EstateView::paintEvent(TQPaintEvent *)
TQColor greenHouse(0, 255, 0); TQColor greenHouse(0, 255, 0);
TQColor redHotel(255, 51, 51); TQColor redHotel(255, 51, 51);
TQPainter painter; TQPainter painter;
painter.begin(TQT_TQPAINTDEVICE(qpixmap), this); painter.begin(qpixmap, this);
painter.setPen(TQt::black); painter.setPen(TQt::black);
@ -281,7 +281,7 @@ void EstateView::paintEvent(TQPaintEvent *)
quartzBuffer->resize(m_titleWidth-2, 25); quartzBuffer->resize(m_titleWidth-2, 25);
TQPainter quartzPainter; TQPainter quartzPainter;
quartzPainter.begin(TQT_TQPAINTDEVICE(quartzBuffer), this); quartzPainter.begin(quartzBuffer, this);
painter.setBrush(m_estate->color()); painter.setBrush(m_estate->color());
switch(m_orientation) switch(m_orientation)

@ -196,7 +196,7 @@ void PortfolioView::paintEvent(TQPaintEvent *)
qpixmap = new TQPixmap(width(), height()); qpixmap = new TQPixmap(width(), height());
TQPainter painter; TQPainter painter;
painter.begin(TQT_TQPAINTDEVICE(qpixmap), this); painter.begin(qpixmap, this);
painter.setPen(TQt::white); painter.setPen(TQt::white);
painter.setBrush(TQt::white); painter.setBrush(TQt::white);

@ -127,7 +127,7 @@ void Token::paintEvent(TQPaintEvent *)
qpixmap = new TQPixmap(width(), height()); qpixmap = new TQPixmap(width(), height());
TQPainter painter; TQPainter painter;
painter.begin(TQT_TQPAINTDEVICE(qpixmap), this); painter.begin(qpixmap, this);
if (m_image) if (m_image)
{ {

@ -314,7 +314,7 @@ void BallWidget::resizeEvent(TQResizeEvent *)
void BallWidget::paintEvent(TQPaintEvent *) void BallWidget::paintEvent(TQPaintEvent *)
{ {
paint(TQT_TQPAINTDEVICE(this)); paint(this);
} }

@ -164,7 +164,7 @@ void BoardWidget::paintEvent(TQPaintEvent *)
{ {
if (renderMode) { if (renderMode) {
pm = boardPM; pm = boardPM;
BallWidget::paint(TQT_TQPAINTDEVICE(&pm)); BallWidget::paint(&pm);
} }
else else
draw(); draw();

@ -1335,7 +1335,7 @@ void Dealer::drawPile(KPixmap &pixmap, Pile *pile, bool selected)
sy = -dy; sy = -dy;
dy = 0; dy = 0;
} }
bitBlt(TQT_TQPAINTDEVICE(&pixmap), dx, dy, TQT_TQPAINTDEVICE(&bg), bitBlt(&pixmap, dx, dy, &bg,
sx, sy, w, h, TQt::CopyROP, true); sx, sy, w, h, TQt::CopyROP, true);
} }
} }

@ -72,8 +72,8 @@ StoneWidget::StoneWidget( TQWidget *parent, int x, int y )
for (int s = 0; s < maxslices; s++) { for (int s = 0; s < maxslices; s++) {
map[c][s].stone.resize(stone_width, stone_height); map[c][s].stone.resize(stone_width, stone_height);
assert(!map[c][s].stone.isNull()); assert(!map[c][s].stone.isNull());
bitBlt(TQT_TQPAINTDEVICE(&map[c][s].stone), 0, 0, bitBlt(&map[c][s].stone, 0, 0,
TQT_TQPAINTDEVICE(&stonemap), stone_width * s, &stonemap, stone_width * s,
c*stone_height, c*stone_height,
stone_width,stone_height,CopyROP,false); stone_width,stone_height,CopyROP,false);
TQImage im = map[c][s].stone.convertToImage(); TQImage im = map[c][s].stone.convertToImage();
@ -276,8 +276,8 @@ StoneWidget::paintEvent( TQPaintEvent *e ) {
if (stone->color) { if (stone->color) {
int tslice = stone->marked?slice:0; int tslice = stone->marked?slice:0;
bitBlt(TQT_TQPAINTDEVICE(this),cx,cy, bitBlt(this,cx,cy,
TQT_TQPAINTDEVICE(&map[stone->color-1][tslice].stone), &map[stone->color-1][tslice].stone,
0, 0, 0, 0,
stone_width,stone_height,CopyROP,FALSE); stone_width,stone_height,CopyROP,FALSE);

@ -100,7 +100,7 @@ void PixServer::initPixmaps()
pm.convertFromImage(qi,TQPixmap::AvoidDither); pm.convertFromImage(qi,TQPixmap::AvoidDither);
for (int x = 0 ; x < 18; x++){ for (int x = 0 ; x < 18; x++){
compuSnakePix[x].resize(BRICKSIZE, BRICKSIZE); compuSnakePix[x].resize(BRICKSIZE, BRICKSIZE);
bitBlt(TQT_TQPAINTDEVICE(&compuSnakePix[x]) ,0,0, TQT_TQPAINTDEVICE(&pm),x*BRICKSIZE, 0, BRICKSIZE, BRICKSIZE, TQt::CopyROP, true); bitBlt(&compuSnakePix[x] ,0,0, &pm,x*BRICKSIZE, 0, BRICKSIZE, BRICKSIZE, TQt::CopyROP, true);
compuSnakePix[x].setMask(compuSnakePix[x].createHeuristicMask()); compuSnakePix[x].setMask(compuSnakePix[x].createHeuristicMask());
} }
@ -110,7 +110,7 @@ void PixServer::initPixmaps()
pm.convertFromImage(qi,TQPixmap::AvoidDither); pm.convertFromImage(qi,TQPixmap::AvoidDither);
for (int x = 0 ; x < 18; x++){ for (int x = 0 ; x < 18; x++){
samyPix[x].resize(BRICKSIZE, BRICKSIZE); samyPix[x].resize(BRICKSIZE, BRICKSIZE);
bitBlt(TQT_TQPAINTDEVICE(&samyPix[x]) ,0,0, TQT_TQPAINTDEVICE(&pm),x*BRICKSIZE, 0, BRICKSIZE, BRICKSIZE, TQt::CopyROP, true); bitBlt(&samyPix[x] ,0,0, &pm,x*BRICKSIZE, 0, BRICKSIZE, BRICKSIZE, TQt::CopyROP, true);
samyPix[x].setMask(samyPix[x].createHeuristicMask()); samyPix[x].setMask(samyPix[x].createHeuristicMask());
} }
@ -120,7 +120,7 @@ void PixServer::initPixmaps()
pm.convertFromImage(qi,TQPixmap::AvoidDither); pm.convertFromImage(qi,TQPixmap::AvoidDither);
for (int x = 0 ; x < 4; x++){ for (int x = 0 ; x < 4; x++){
ballPix[x].resize(BRICKSIZE, BRICKSIZE); ballPix[x].resize(BRICKSIZE, BRICKSIZE);
bitBlt(TQT_TQPAINTDEVICE(&ballPix[x]) ,0,0, TQT_TQPAINTDEVICE(&pm),x*BRICKSIZE, 0, BRICKSIZE, BRICKSIZE, TQt::CopyROP, true); bitBlt(&ballPix[x] ,0,0, &pm,x*BRICKSIZE, 0, BRICKSIZE, BRICKSIZE, TQt::CopyROP, true);
ballPix[x].setMask(ballPix[x].createHeuristicMask()); ballPix[x].setMask(ballPix[x].createHeuristicMask());
} }
@ -130,7 +130,7 @@ void PixServer::initPixmaps()
pm.convertFromImage(qi,TQPixmap::AvoidDither); pm.convertFromImage(qi,TQPixmap::AvoidDither);
for (int x = 0 ; x < 2; x++){ for (int x = 0 ; x < 2; x++){
applePix[x].resize(BRICKSIZE, BRICKSIZE); applePix[x].resize(BRICKSIZE, BRICKSIZE);
bitBlt(TQT_TQPAINTDEVICE(&applePix[x]) ,0,0, TQT_TQPAINTDEVICE(&pm),x*BRICKSIZE, 0, BRICKSIZE, BRICKSIZE, TQt::CopyROP, true); bitBlt(&applePix[x] ,0,0, &pm,x*BRICKSIZE, 0, BRICKSIZE, BRICKSIZE, TQt::CopyROP, true);
applePix[x].setMask(applePix[x].createHeuristicMask()); applePix[x].setMask(applePix[x].createHeuristicMask());
} }
} }

@ -187,7 +187,7 @@ void Stream::setArray(TQByteArray a)
bool ReadingStream::readOk() bool ReadingStream::readOk()
{ {
return ( TQT_TQIODEVICE(&buf)->status()==IO_Ok ); return ( buf.status()==IO_Ok );
} }
void ReadingStream::clearRead() void ReadingStream::clearRead()

@ -155,7 +155,7 @@ void KMessageClient::sendBroadcast (const TQByteArray &msg)
TQDataStream stream (&buffer); TQDataStream stream (&buffer);
stream << static_cast<TQ_UINT32> ( KMessageServer::REQ_BROADCAST ); stream << static_cast<TQ_UINT32> ( KMessageServer::REQ_BROADCAST );
TQT_TQIODEVICE(&buffer)->writeBlock (msg); buffer.writeBlock (msg);
sendServerMessage (sendBuffer); sendServerMessage (sendBuffer);
} }
@ -167,7 +167,7 @@ void KMessageClient::sendForward (const TQByteArray &msg, const TQValueList <TQ_
TQDataStream stream (&buffer); TQDataStream stream (&buffer);
stream << static_cast<TQ_UINT32>( KMessageServer::REQ_FORWARD ) << clients; stream << static_cast<TQ_UINT32>( KMessageServer::REQ_FORWARD ) << clients;
TQT_TQIODEVICE(&buffer)->writeBlock (msg); buffer.writeBlock (msg);
sendServerMessage (sendBuffer); sendServerMessage (sendBuffer);
} }

@ -415,10 +415,7 @@ void KMessageServer::processOneMessage ()
{ {
case REQ_BROADCAST: case REQ_BROADCAST:
out_stream << TQ_UINT32 (MSG_BROADCAST) << clientID; out_stream << TQ_UINT32 (MSG_BROADCAST) << clientID;
// FIXME, compiler bug? out_buffer.writeBlock (in_buffer.readAll());
// this should be okay, since TQBuffer is subclass of TQIODevice! :
// out_buffer.writeBlock (in_buffer.readAll());
TQT_TQIODEVICE(&out_buffer)->writeBlock (in_buffer.readAll());
broadcastMessage (out_msg); broadcastMessage (out_msg);
break; break;
@ -427,8 +424,7 @@ void KMessageServer::processOneMessage ()
TQValueList <TQ_UINT32> clients; TQValueList <TQ_UINT32> clients;
in_stream >> clients; in_stream >> clients;
out_stream << TQ_UINT32 (MSG_FORWARD) << clientID << clients; out_stream << TQ_UINT32 (MSG_FORWARD) << clientID << clients;
// see above! out_buffer.writeBlock (in_buffer.readAll());
TQT_TQIODEVICE(&out_buffer)->writeBlock (in_buffer.readAll());
sendMessage (clients, out_msg); sendMessage (clients, out_msg);
} }
break; break;

@ -760,7 +760,7 @@ void LSkatView::paintEvent( TQPaintEvent * e)
TQPixmap pm(this->rect().size()); TQPixmap pm(this->rect().size());
TQPainter p; TQPainter p;
TQBrush brush; TQBrush brush;
p.begin(TQT_TQPAINTDEVICE(&pm),this); p.begin(&pm,this);
brush.setPixmap( getDocument()->mPixBackground ); brush.setPixmap( getDocument()->mPixBackground );
p.fillRect(0,0,this->rect().width(),this->rect().height(),brush); p.fillRect(0,0,this->rect().width(),this->rect().height(),brush);
drawIntro(&p); drawIntro(&p);

Loading…
Cancel
Save