summaryrefslogtreecommitdiffstats
path: root/ktron/tron.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /ktron/tron.cpp
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
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
Diffstat (limited to 'ktron/tron.cpp')
-rw-r--r--ktron/tron.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/ktron/tron.cpp b/ktron/tron.cpp
index 1c7bf72c..92a5d296 100644
--- a/ktron/tron.cpp
+++ b/ktron/tron.cpp
@@ -41,8 +41,8 @@
* init-functions
**/
-Tron::Tron(TQWidget *parent,const char *name)
- : TQWidget(parent,name)
+Tron::Tron(TQWidget *tqparent,const char *name)
+ : TQWidget(tqparent,name)
{
pixmap=0;
playfield=0;
@@ -51,7 +51,7 @@ Tron::Tron(TQWidget *parent,const char *name)
random.setSeed(0);
- setFocusPolicy(TQWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
setBackgroundMode(NoBackground);
gameBlocked=false;
@@ -81,7 +81,7 @@ void Tron::loadSettings(){
// Style
if(pixmap){
updatePixmap();
- repaint();
+ tqrepaint();
}
// Backgroundimage
@@ -96,7 +96,7 @@ void Tron::loadSettings(){
setBackgroundPix(pix);
} else {
TQString msg=i18n("Wasn't able to load wallpaper\n%1");
- msg=msg.arg(tmpFile);
+ msg=msg.tqarg(tmpFile);
KMessageBox::sorry(this, msg);
}
KIO::NetAccess::removeTempFile(tmpFile);
@@ -268,7 +268,7 @@ void Tron::showWinner(Player player)
updatePixmap();
}
- repaint();
+ tqrepaint();
emit gameEnds(player);
@@ -302,7 +302,7 @@ void Tron::updatePixmap()
TQPainter p;
p.begin(pixmap);
- // alle Pixel prüfen und evt. zeichnen
+ // alle Pixel pr�fen und evt. zeichnen
for(i=0;i<fieldWidth;i++)
for(j=0;j<fieldHeight;j++)
{
@@ -313,8 +313,8 @@ void Tron::updatePixmap()
}
// draw frame
- TQColor light=parentWidget()->colorGroup().midlight();
- TQColor dark=parentWidget()->colorGroup().mid();
+ TQColor light=tqparentWidget()->tqcolorGroup().midlight();
+ TQColor dark=tqparentWidget()->tqcolorGroup().mid();
p.setPen(NoPen);
p.setBrush(light);
@@ -810,18 +810,18 @@ void Tron::showBeginHint()
if(players[0].score==0 && players[1].score==0)
{
beginHint=true;
- repaint();
+ tqrepaint();
}
}
}
-// doMove() is called from QTimer
+// doMove() is called from TQTimer
void Tron::doMove()
{
int i;
for(i=0;i<2;i++)
{
- // Überprüfen, ob Acceleratortaste gedrückt wurde...
+ // �berpr�fen, ob Acceleratortaste gedr�ckt wurde...
if(players[i].accelerated)
{
updateDirections(i);