summaryrefslogtreecommitdiffstats
path: root/kmahjongg/Editor.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-15 15:47:36 -0600
committerTimothy Pearson <[email protected]>2011-12-15 15:47:36 -0600
commit97d1732e257f8700488d7ca1660ae7eba8fc6065 (patch)
tree4c6397ed2c1dd6f7c3354b5b87f313547d92a35f /kmahjongg/Editor.cpp
parent9c27a1a03e02fd53aedc1a182444b35fd8e14967 (diff)
downloadtdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.tar.gz
tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmahjongg/Editor.cpp')
-rw-r--r--kmahjongg/Editor.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kmahjongg/Editor.cpp b/kmahjongg/Editor.cpp
index cc80831c..323ccb24 100644
--- a/kmahjongg/Editor.cpp
+++ b/kmahjongg/Editor.cpp
@@ -1,7 +1,7 @@
#include <stdlib.h>
#include <kapplication.h>
-#include <tqlayout.h>
+#include <layout.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 tqlayout look more
+// table, wrapping on the tile number. It makes the tile layout look more
// random.
@@ -69,10 +69,10 @@ Editor::Editor
// setup the tool bar
setupToolbar();
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this, 1);
- tqlayout->addWidget(topToolbar,0);
- tqlayout->addWidget(drawFrame,1);
- tqlayout->activate();
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 1);
+ layout->addWidget(topToolbar,0);
+ layout->addWidget(drawFrame,1);
+ layout->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->tqsizeHint().width();
+ int lWidth = theLabel->sizeHint().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();
- tqrepaint(false);
+ repaint(false);
break;
case ID_TOOL_RIGHT:
theBoard.shiftRight();
- tqrepaint(false);
+ repaint(false);
break;
case ID_TOOL_UP:
theBoard.shiftUp();
- tqrepaint(false);
+ repaint(false);
break;
case ID_TOOL_DOWN:
theBoard.shiftDown();
- tqrepaint(false);
+ repaint(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").tqarg(numTiles).tqarg(x).tqarg(y).tqarg(z);
+ buf = i18n("Tiles: %1 Pos: %2,%3,%4").arg(numTiles).arg(x).arg(y).arg(z);
return buf;
}
@@ -272,7 +272,7 @@ void Editor::loadBoard() {
KURL url = KFileDialog::getOpenURL(
NULL,
- i18n("*.tqlayout|Board Layout (*.tqlayout)\n"
+ i18n("*.layout|Board Layout (*.layout)\n"
"*|All Files"),
this,
i18n("Open Board Layout" ));
@@ -283,7 +283,7 @@ void Editor::loadBoard() {
theBoard.loadBoardLayout( url.path() );
- tqrepaint(false);
+ repaint(false);
}
@@ -302,14 +302,14 @@ void Editor::newBoard() {
clean=true;
numTiles=0;
statusChanged();
- tqrepaint(false);
+ repaint(false);
}
bool Editor::saveBoard() {
// get a save file name
KURL url = KFileDialog::getSaveURL(
NULL,
- i18n("*.tqlayout|Board Layout (*.tqlayout)\n"
+ i18n("*.layout|Board Layout (*.layout)\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 tqlayout.
+// the tiles as specified by the layout.
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->tqrepaint(false);
+ drawFrame->repaint(false);
}
void Editor::drawBackground(TQPixmap *pixmap) {
@@ -564,7 +564,7 @@ void Editor::drawFrameMousePressEvent( TQMouseEvent* e )
numTiles--;
statusChanged();
drawFrameMouseMovedEvent(e);
- tqrepaint(false);
+ repaint(false);
}
break;
case insert: {
@@ -577,7 +577,7 @@ void Editor::drawFrameMousePressEvent( TQMouseEvent* e )
theBoard.insertTile(n);
numTiles++;
statusChanged();
- tqrepaint(false);
+ repaint(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->tqrepaint(false);
+ drawFrame->repaint(false);