summaryrefslogtreecommitdiffstats
path: root/kreversi/qreversigameview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kreversi/qreversigameview.cpp')
-rw-r--r--kreversi/qreversigameview.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kreversi/qreversigameview.cpp b/kreversi/qreversigameview.cpp
index 92812657..e9104398 100644
--- a/kreversi/qreversigameview.cpp
+++ b/kreversi/qreversigameview.cpp
@@ -37,9 +37,9 @@
*/
-#include <qlayout.h>
-#include <qwidget.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kdialog.h>
@@ -47,8 +47,8 @@
#if 0
#include <unistd.h>
-#include <qpainter.h>
-#include <qfont.h>
+#include <tqpainter.h>
+#include <tqfont.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -71,22 +71,22 @@
// class StatusWidget
-StatusWidget::StatusWidget(const QString &text, QWidget *parent)
- : QWidget(parent, "status_widget")
+StatusWidget::StatusWidget(const TQString &text, TQWidget *parent)
+ : TQWidget(parent, "status_widget")
{
- QHBoxLayout *hbox = new QHBoxLayout(this, 0, KDialog::spacingHint());
- QLabel *label;
+ TQHBoxLayout *hbox = new TQHBoxLayout(this, 0, KDialog::spacingHint());
+ TQLabel *label;
- m_textLabel = new QLabel(text, this);
+ m_textLabel = new TQLabel(text, this);
hbox->addWidget(m_textLabel);
- m_pixLabel = new QLabel(this);
+ m_pixLabel = new TQLabel(this);
hbox->addWidget(m_pixLabel);
- label = new QLabel(":", this);
+ label = new TQLabel(":", this);
hbox->addWidget(label);
- m_scoreLabel = new QLabel(this);
+ m_scoreLabel = new TQLabel(this);
hbox->addWidget(m_scoreLabel);
}
@@ -94,7 +94,7 @@ StatusWidget::StatusWidget(const QString &text, QWidget *parent)
// Set the text label
//
-void StatusWidget::setText(const QString &string)
+void StatusWidget::setText(const TQString &string)
{
m_textLabel->setText(string);
}
@@ -103,7 +103,7 @@ void StatusWidget::setText(const QString &string)
// Set the pixel label - used to show the color.
//
-void StatusWidget::setPixmap(const QPixmap &pixmap)
+void StatusWidget::setPixmap(const TQPixmap &pixmap)
{
m_pixLabel->setPixmap(pixmap);
}
@@ -114,7 +114,7 @@ void StatusWidget::setPixmap(const QPixmap &pixmap)
void StatusWidget::setScore(uint s)
{
- m_scoreLabel->setText(QString::number(s));
+ m_scoreLabel->setText(TQString::number(s));
}
@@ -122,8 +122,8 @@ void StatusWidget::setScore(uint s)
// class QReversiGameView
-QReversiGameView::QReversiGameView(QWidget *parent, QReversiGame *game)
- : QWidget(parent, "gameview")
+QReversiGameView::QReversiGameView(TQWidget *parent, QReversiGame *game)
+ : TQWidget(parent, "gameview")
{
// Store a pointer to the game.
m_game = game;
@@ -135,15 +135,15 @@ QReversiGameView::QReversiGameView(QWidget *parent, QReversiGame *game)
m_humanColor = Nobody;
// Connect the game to the view.
- connect(m_game, SIGNAL(sig_newGame()), this, SLOT(newGame()));
- connect(m_game, SIGNAL(sig_move(uint, Move&)),
- this, SLOT(moveMade(uint, Move&)));
- connect(m_game, SIGNAL(sig_update()), this, SLOT(updateView()));
+ connect(m_game, TQT_SIGNAL(sig_newGame()), this, TQT_SLOT(newGame()));
+ connect(m_game, TQT_SIGNAL(sig_move(uint, Move&)),
+ this, TQT_SLOT(moveMade(uint, Move&)));
+ connect(m_game, TQT_SIGNAL(sig_update()), this, TQT_SLOT(updateView()));
// The sig_gameOver signal is not used by the view.
// Reemit the signal from the board.
- connect(m_boardView, SIGNAL(signalSquareClicked(int, int)),
- this, SLOT(squareClicked(int, int)));
+ connect(m_boardView, TQT_SIGNAL(signalSquareClicked(int, int)),
+ this, TQT_SLOT(squareClicked(int, int)));
}
@@ -156,7 +156,7 @@ QReversiGameView::~QReversiGameView()
void QReversiGameView::createView()
{
- QGridLayout *layout = new QGridLayout(this, 4, 2);
+ TQGridLayout *layout = new TQGridLayout(this, 4, 2);
// The board
m_boardView = new QReversiBoardView(this, m_game);
@@ -164,20 +164,20 @@ void QReversiGameView::createView()
layout->addMultiCellWidget(m_boardView, 0, 3, 0, 0);
// The status widgets
- m_blackStatus = new StatusWidget(QString::null, this);
+ m_blackStatus = new StatusWidget(TQString::null, this);
m_blackStatus->setPixmap(m_boardView->chipPixmap(Black, 20));
layout->addWidget(m_blackStatus, 0, 1);
- m_whiteStatus = new StatusWidget(QString::null, this);
+ m_whiteStatus = new StatusWidget(TQString::null, this);
m_whiteStatus->setPixmap(m_boardView->chipPixmap(White, 20));
layout->addWidget(m_whiteStatus, 1, 1);
// The "Moves" label
- QLabel *movesLabel = new QLabel( i18n("Moves"), this);
+ TQLabel *movesLabel = new TQLabel( i18n("Moves"), this);
movesLabel->setAlignment(AlignCenter);
layout->addWidget(movesLabel, 2, 1);
// The list of moves.
- m_movesView = new QListBox(this, "moves");
+ m_movesView = new TQListBox(this, "moves");
m_movesView->setMinimumWidth(150);
layout->addWidget(m_movesView, 3, 1);
}
@@ -202,17 +202,17 @@ void QReversiGameView::newGame()
void QReversiGameView::moveMade(uint moveNum, Move &move)
{
//FIXME: Error checks.
- QString colorsWB[] = {
+ TQString colorsWB[] = {
i18n("White"),
i18n("Black")
};
- QString colorsRB[] = {
+ TQString colorsRB[] = {
i18n("Red"),
i18n("Blue")
};
// Insert the new move in the listbox and mark it as the current one.
- m_movesView->insertItem(QString("%1. %2 %3")
+ m_movesView->insertItem(TQString("%1. %2 %3")
.arg(moveNum)
.arg(Prefs::grayscale() ? colorsWB[move.color()]
: colorsRB[move.color()])