summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/tutorial/t13/GameBoard.java
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /qtjava/javalib/tutorial/t13/GameBoard.java
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'qtjava/javalib/tutorial/t13/GameBoard.java')
-rw-r--r--qtjava/javalib/tutorial/t13/GameBoard.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/qtjava/javalib/tutorial/t13/GameBoard.java b/qtjava/javalib/tutorial/t13/GameBoard.java
index 6e44c20f..5ba2579e 100644
--- a/qtjava/javalib/tutorial/t13/GameBoard.java
+++ b/qtjava/javalib/tutorial/t13/GameBoard.java
@@ -1,13 +1,13 @@
import org.kde.qt.*;
-public class GameBoard extends QWidget {
- private QLCDNumber hits;
- private QLCDNumber shotsLeft;
+public class GameBoard extends TQWidget {
+ private TQLCDNumber hits;
+ private TQLCDNumber shotsLeft;
private CannonField cannonField;
public GameBoard() {
- QPushButton quit = new QPushButton("&Quit", this, "quit");
- quit.setFont(new QFont("Times", 18, QFont.Bold, false));
+ TQPushButton quit = new TQPushButton("&Quit", this, "quit");
+ quit.setFont(new TQFont("Times", 18, TQFont.Bold, false));
connect(quit, SIGNAL("clicked()"), qApp(), SLOT("quit()"));
@@ -34,34 +34,34 @@ public class GameBoard extends QWidget {
connect(cannonField, SIGNAL("missed()"),
this, SLOT("missed()"));
- QPushButton shoot = new QPushButton("&Shoot", this, "shoot");
- shoot.setFont(new QFont("Times", 18, QFont.Bold, false));
+ TQPushButton shoot = new TQPushButton("&Shoot", this, "shoot");
+ shoot.setFont(new TQFont("Times", 18, TQFont.Bold, false));
connect(shoot, SIGNAL("clicked()"), SLOT("fire()"));
connect(cannonField, SIGNAL("canShoot(boolean)"),
shoot, SLOT("setEnabled(boolean)"));
- QPushButton restart = new QPushButton("&New Game", this, "newgame");
- restart.setFont(new QFont("Times", 18, QFont.Bold, false));
+ TQPushButton restart = new TQPushButton("&New Game", this, "newgame");
+ restart.setFont(new TQFont("Times", 18, TQFont.Bold, false));
connect(restart, SIGNAL("clicked()"), this, SLOT("newGame()"));
- hits = new QLCDNumber(2, this, "hits");
- shotsLeft = new QLCDNumber(2, this, "shotsleft");
- QLabel hitsL = new QLabel("HITS", this, "hitsLabel", 0);
- QLabel shotsLeftL = new QLabel("SHOTS LEFT", this, "shotsleftLabel", 0);
+ hits = new TQLCDNumber(2, this, "hits");
+ shotsLeft = new TQLCDNumber(2, this, "shotsleft");
+ TQLabel hitsL = new TQLabel("HITS", this, "hitsLabel", 0);
+ TQLabel shotsLeftL = new TQLabel("SHOTS LEFT", this, "shotsleftLabel", 0);
- QGridLayout grid = new QGridLayout(this, 2, 2, 10, -1, null);
+ TQGridLayout grid = new TQGridLayout(this, 2, 2, 10, -1, null);
grid.addWidget(quit, 0, 0);
grid.addWidget(cannonField, 1, 1);
grid.setColStretch(1, 10);
- QVBoxLayout leftBox = new QVBoxLayout();
+ TQVBoxLayout leftBox = new TQVBoxLayout();
grid.addLayout(leftBox, 1, 0);
leftBox.addWidget(angle);
leftBox.addWidget(force);
- QHBoxLayout topBox = new QHBoxLayout();
+ TQHBoxLayout topBox = new TQHBoxLayout();
grid.addLayout(topBox, 0, 1);
topBox.addWidget(shoot);
topBox.addWidget(hits);