summaryrefslogtreecommitdiffstats
path: root/ksame/StoneWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksame/StoneWidget.cpp')
-rw-r--r--ksame/StoneWidget.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/ksame/StoneWidget.cpp b/ksame/StoneWidget.cpp
index 81fafca9..3109c33e 100644
--- a/ksame/StoneWidget.cpp
+++ b/ksame/StoneWidget.cpp
@@ -46,8 +46,8 @@ struct StoneSlice {
};
-StoneWidget::StoneWidget( TQWidget *parent, int x, int y )
- : TQWidget(parent,"StoneWidget"), stonefield(x,y)
+StoneWidget::StoneWidget( TQWidget *tqparent, int x, int y )
+ : TQWidget(tqparent,"StoneWidget"), stonefield(x,y)
{
setBackgroundPixmap(TQPixmap(locate("wallpaper", "Time-For-Lunch-2.jpg")));
TQPixmap stonemap(locate("appdata", "stones.png"));
@@ -65,20 +65,20 @@ StoneWidget::StoneWidget( TQWidget *parent, int x, int y )
stone_height=stonemap.height()/maxcolors;
map = new StoneSlice*[maxcolors];
- TQBitmap mask;
+ TQBitmap tqmask;
for (int c = 0; c < maxcolors; c++) {
map[c] = new StoneSlice[maxslices];
for (int s = 0; s < maxslices; s++) {
map[c][s].stone.resize(stone_width, stone_height);
assert(!map[c][s].stone.isNull());
- bitBlt(&map[c][s].stone, 0, 0,
- &stonemap, stone_width * s,
+ bitBlt(TQT_TQPAINTDEVICE(&map[c][s].stone), 0, 0,
+ TQT_TQPAINTDEVICE(&stonemap), stone_width * s,
c*stone_height,
stone_width,stone_height,CopyROP,false);
TQImage im = map[c][s].stone.convertToImage();
- mask = im.createHeuristicMask();
- map[c][s].stone.setMask(mask);
+ tqmask.convertFromImage(im.createHeuristicMask());
+ map[c][s].stone.setMask(tqmask);
}
}
@@ -102,7 +102,7 @@ StoneWidget::~StoneWidget() {
delete [] map;
setMouseTracking(false);
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
}
unsigned int
@@ -125,7 +125,7 @@ StoneWidget::marked() {
return stonefield.getMarked();
}
-QSize
+TQSize
StoneWidget::size() {
return TQSize(sizex,sizey);
}
@@ -135,8 +135,8 @@ StoneWidget::colors() {
return stonefield.getColors();
}
-QSize
-StoneWidget::sizeHint () const {
+TQSize
+StoneWidget::tqsizeHint () const {
return TQSize(field_width,field_height);
}
@@ -276,8 +276,8 @@ StoneWidget::paintEvent( TQPaintEvent *e ) {
if (stone->color) {
int tslice = stone->marked?slice:0;
- bitBlt(this,cx,cy,
- &map[stone->color-1][tslice].stone,
+ bitBlt(TQT_TQPAINTDEVICE(this),cx,cy,
+ TQT_TQPAINTDEVICE(&map[stone->color-1][tslice].stone),
0, 0,
stone_width,stone_height,CopyROP,FALSE);