summaryrefslogtreecommitdiffstats
path: root/kolf/scoreboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kolf/scoreboard.cpp')
-rw-r--r--kolf/scoreboard.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kolf/scoreboard.cpp b/kolf/scoreboard.cpp
index a750156f..61ff9926 100644
--- a/kolf/scoreboard.cpp
+++ b/kolf/scoreboard.cpp
@@ -1,23 +1,23 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qtable.h>
-#include <qwidget.h>
-#include <qheader.h>
-#include <qstring.h>
+#include <tqlayout.h>
+#include <tqtable.h>
+#include <tqwidget.h>
+#include <tqheader.h>
+#include <tqstring.h>
#include "scoreboard.h"
-ScoreBoard::ScoreBoard(QWidget *parent, const char *name)
- : QTable(1, 1, parent, name)
+ScoreBoard::ScoreBoard(TQWidget *parent, const char *name)
+ : TQTable(1, 1, parent, name)
{
vh = verticalHeader();
hh = horizontalHeader();
vh->setLabel(numRows() - 1, i18n("Par"));
hh->setLabel(numCols() - 1, i18n("Total"));
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQWidget::NoFocus);
setRowReadOnly(0, true);
setRowReadOnly(1, true);
}
@@ -26,15 +26,15 @@ void ScoreBoard::newHole(int par)
{
int _numCols = numCols();
insertColumns(_numCols - 1);
- hh->setLabel(numCols() - 2, QString::number(numCols() - 1));
- setText(numRows() - 1, numCols() - 2, QString::number(par));
+ hh->setLabel(numCols() - 2, TQString::number(numCols() - 1));
+ setText(numRows() - 1, numCols() - 2, TQString::number(par));
setColumnWidth(numCols() - 2, 40);
// update total
int tot = 0;
for (int i = 0; i < numCols() - 1; ++i)
tot += text(numRows() - 1, i).toInt();
- setText(numRows() - 1, numCols() - 1, QString::number(tot));
+ setText(numRows() - 1, numCols() - 1, TQString::number(tot));
// shrink cell...
setColumnWidth(numCols() - 2, 3);
@@ -42,7 +42,7 @@ void ScoreBoard::newHole(int par)
adjustColumn(numCols() - 2);
}
-void ScoreBoard::newPlayer(const QString &name)
+void ScoreBoard::newPlayer(const TQString &name)
{
//kdDebug(12007) << "name of new player is " << name << endl;
insertRows(numRows() - 1);
@@ -53,10 +53,10 @@ void ScoreBoard::newPlayer(const QString &name)
void ScoreBoard::setScore(int id, int hole, int score)
{
//kdDebug(12007) << "set score\n";
- setText(id - 1, hole - 1, score > 0? QString::number(score) : QString(""));
+ setText(id - 1, hole - 1, score > 0? TQString::number(score) : TQString(""));
- QString name;
- setText(id - 1, numCols() - 1, QString::number(total(id, name)));
+ TQString name;
+ setText(id - 1, numCols() - 1, TQString::number(total(id, name)));
if (hole >= numCols() - 2)
ensureCellVisible(id - 1, numCols() - 1);
else
@@ -72,16 +72,16 @@ void ScoreBoard::setScore(int id, int hole, int score)
void ScoreBoard::parChanged(int hole, int par)
{
- setText(numRows() - 1, hole - 1, QString::number(par));
+ setText(numRows() - 1, hole - 1, TQString::number(par));
// update total
int tot = 0;
for (int i = 0; i < numCols() - 1; ++i)
tot += text(numRows() - 1, i).toInt();
- setText(numRows() - 1, numCols() - 1, QString::number(tot));
+ setText(numRows() - 1, numCols() - 1, TQString::number(tot));
}
-int ScoreBoard::total(int id, QString &name)
+int ScoreBoard::total(int id, TQString &name)
{
int tot = 0;
for (int i = 0; i < numCols() - 1; i++)