diff options
Diffstat (limited to 'kmahjongg/Editor.cpp')
-rw-r--r-- | kmahjongg/Editor.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kmahjongg/Editor.cpp b/kmahjongg/Editor.cpp index 323ccb24..cc80831c 100644 --- a/kmahjongg/Editor.cpp +++ b/kmahjongg/Editor.cpp @@ -1,7 +1,7 @@ #include <stdlib.h> #include <kapplication.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include "Editor.h" @@ -35,7 +35,7 @@ // When we assign a tile to draw in a slot we do it in order from te following -// table, wrapping on the tile number. It makes the tile layout look more +// table, wrapping on the tile number. It makes the tile tqlayout look more // random. @@ -69,10 +69,10 @@ Editor::Editor // setup the tool bar setupToolbar(); - TQVBoxLayout *layout = new TQVBoxLayout(this, 1); - layout->addWidget(topToolbar,0); - layout->addWidget(drawFrame,1); - layout->activate(); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 1); + tqlayout->addWidget(topToolbar,0); + tqlayout->addWidget(drawFrame,1); + tqlayout->activate(); resize( sWidth+60, sHeight+60); setMinimumSize( sWidth+60, sHeight+60); @@ -170,7 +170,7 @@ void Editor::setupToolbar() // status in the toolbar for now (ick) theLabel = new TQLabel(statusText(), topToolbar); - int lWidth = theLabel->sizeHint().width(); + int lWidth = theLabel->tqsizeHint().width(); topToolbar->insertWidget(ID_TOOL_STATUS,lWidth, theLabel ); topToolbar->alignItemRight( ID_TOOL_STATUS, true ); @@ -209,19 +209,19 @@ void Editor::topToolbarOption(int option) { break; case ID_TOOL_LEFT: theBoard.shiftLeft(); - repaint(false); + tqrepaint(false); break; case ID_TOOL_RIGHT: theBoard.shiftRight(); - repaint(false); + tqrepaint(false); break; case ID_TOOL_UP: theBoard.shiftUp(); - repaint(false); + tqrepaint(false); break; case ID_TOOL_DOWN: theBoard.shiftDown(); - repaint(false); + tqrepaint(false); break; case ID_TOOL_DEL: mode=remove; @@ -260,7 +260,7 @@ TQString Editor::statusText() { if (x >=BoardLayout::width || x <0 || y >=BoardLayout::height || y <0) x = y = z = 0; - buf = i18n("Tiles: %1 Pos: %2,%3,%4").arg(numTiles).arg(x).arg(y).arg(z); + buf = i18n("Tiles: %1 Pos: %2,%3,%4").tqarg(numTiles).tqarg(x).tqarg(y).tqarg(z); return buf; } @@ -272,7 +272,7 @@ void Editor::loadBoard() { KURL url = KFileDialog::getOpenURL( NULL, - i18n("*.layout|Board Layout (*.layout)\n" + i18n("*.tqlayout|Board Layout (*.tqlayout)\n" "*|All Files"), this, i18n("Open Board Layout" )); @@ -283,7 +283,7 @@ void Editor::loadBoard() { theBoard.loadBoardLayout( url.path() ); - repaint(false); + tqrepaint(false); } @@ -302,14 +302,14 @@ void Editor::newBoard() { clean=true; numTiles=0; statusChanged(); - repaint(false); + tqrepaint(false); } bool Editor::saveBoard() { // get a save file name KURL url = KFileDialog::getSaveURL( NULL, - i18n("*.layout|Board Layout (*.layout)\n" + i18n("*.tqlayout|Board Layout (*.tqlayout)\n" "*|All Files"), this, i18n("Save Board Layout" )); @@ -373,7 +373,7 @@ bool Editor::testSave() // The main paint event, draw in the grid and blit in -// the tiles as specified by the layout. +// the tiles as specified by the tqlayout. void Editor::paintEvent( TQPaintEvent* ) { @@ -386,7 +386,7 @@ void Editor::paintEvent( TQPaintEvent* ) { drawTiles(&buff); bitBlt(dest, 0,0,&buff, 0,0,buff.width(), buff.height(), CopyROP); - drawFrame->repaint(false); + drawFrame->tqrepaint(false); } void Editor::drawBackground(TQPixmap *pixmap) { @@ -564,7 +564,7 @@ void Editor::drawFrameMousePressEvent( TQMouseEvent* e ) numTiles--; statusChanged(); drawFrameMouseMovedEvent(e); - repaint(false); + tqrepaint(false); } break; case insert: { @@ -577,7 +577,7 @@ void Editor::drawFrameMousePressEvent( TQMouseEvent* e ) theBoard.insertTile(n); numTiles++; statusChanged(); - repaint(false); + tqrepaint(false); } } break; @@ -599,7 +599,7 @@ void Editor::drawCursor(POSITION &p, bool visible) if (p.e==100 || !visible) x = -1; drawFrame->setRect(x,y,w,h, tiles.shadowSize(), mode-remove); - drawFrame->repaint(false); + drawFrame->tqrepaint(false); |