summaryrefslogtreecommitdiffstats
path: root/knetwalk
diff options
context:
space:
mode:
Diffstat (limited to 'knetwalk')
-rw-r--r--knetwalk/src/cell.cpp22
-rw-r--r--knetwalk/src/cell.h5
-rw-r--r--knetwalk/src/highscores.cpp6
-rw-r--r--knetwalk/src/mainwindow.cpp18
-rw-r--r--knetwalk/src/mainwindow.h3
5 files changed, 28 insertions, 26 deletions
diff --git a/knetwalk/src/cell.cpp b/knetwalk/src/cell.cpp
index a08b0d78..7df96806 100644
--- a/knetwalk/src/cell.cpp
+++ b/knetwalk/src/cell.cpp
@@ -52,16 +52,16 @@ void Cell::initPixmaps()
TQImage image = connectedpixmap[it.key()]->convertToImage();
for(int y = 0; y < image.height(); y++)
{
- QRgb* line = (QRgb*)image.scanLine(y);
+ TQRgb* line = (TQRgb*)image.scanLine(y);
for(int x = 0; x < image.width(); x++)
{
- QRgb pix = line[x];
- if(qAlpha(pix) == 255)
+ TQRgb pix = line[x];
+ if(tqAlpha(pix) == 255)
{
- int g = (255 + 4 * qGreen(pix)) / 5;
- int b = (255 + 4 * qBlue(pix)) / 5;
- int r = (255 + 4 * qRed(pix)) / 5;
- line[x] = qRgb(r, g, b);
+ int g = (255 + 4 * tqGreen(pix)) / 5;
+ int b = (255 + 4 * tqBlue(pix)) / 5;
+ int r = (255 + 4 * tqRed(pix)) / 5;
+ line[x] = tqRgb(r, g, b);
}
}
}
@@ -69,7 +69,7 @@ void Cell::initPixmaps()
}
}
-Cell::Cell(TQWidget* parent, int i) : TQWidget(parent, 0, WNoAutoErase)
+Cell::Cell(TQWidget* tqparent, int i) : TQWidget(tqparent, 0, WNoAutoErase)
{
angle = 0;
light = 0;
@@ -203,11 +203,11 @@ void Cell::paintEvent(TQPaintEvent*)
void Cell::mousePressEvent(TQMouseEvent* e)
{
- if(e->button() == LeftButton)
+ if(e->button() == Qt::LeftButton)
emit lClicked(iindex);
- else if(e->button() == RightButton)
+ else if(e->button() == Qt::RightButton)
emit rClicked(iindex);
- else if(e->button() == MidButton)
+ else if(e->button() == Qt::MidButton)
emit mClicked(iindex);
}
diff --git a/knetwalk/src/cell.h b/knetwalk/src/cell.h
index 8e51e349..f2423362 100644
--- a/knetwalk/src/cell.h
+++ b/knetwalk/src/cell.h
@@ -18,12 +18,13 @@
#include <tqpixmap.h>
#include <tqwidget.h>
-class Cell : public QWidget
+class Cell : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Dirs { Free = 0, U = 1, R = 2, D = 4, L = 8, None = 16 };
- Cell(TQWidget* parent, int i);
+ Cell(TQWidget* tqparent, int i);
int index() const;
void rotate(int a);
void setDirs(Dirs d);
diff --git a/knetwalk/src/highscores.cpp b/knetwalk/src/highscores.cpp
index 4bcbf922..c0144002 100644
--- a/knetwalk/src/highscores.cpp
+++ b/knetwalk/src/highscores.cpp
@@ -34,7 +34,7 @@ namespace KExtHighscore
TQMemArray<uint> s;
s.duplicate(RANGE, 16);
setScoreHistogram(s, ScoreNotBound);
- //Item *item = new Item((uint)0, i18n("Clicks"), Qt::AlignRight);
+ //Item *item = new Item((uint)0, i18n("Clicks"), TQt::AlignRight);
//addScoreItem("nb_actions", item);
}
@@ -47,7 +47,7 @@ namespace KExtHighscore
case I18N: return i18n(level[gameType]);
case WW: return data.wwLabel;
}
- return TQString::null;*/
+ return TQString();*/
return i18n(levels[gameType]);
}
@@ -64,7 +64,7 @@ namespace KExtHighscore
}
KConfigGroupSaver cg(kapp->config(), group);
- TQString name = cg.config()->readEntry("Name", TQString::null);
+ TQString name = cg.config()->readEntry("Name", TQString());
if ( name.isNull() ) return;
if ( name.isEmpty() ) name = i18n("anonymous");
int score = cg.config()->readNumEntry("score", 0);
diff --git a/knetwalk/src/mainwindow.cpp b/knetwalk/src/mainwindow.cpp
index 17fa9b82..21de29c0 100644
--- a/knetwalk/src/mainwindow.cpp
+++ b/knetwalk/src/mainwindow.cpp
@@ -52,8 +52,8 @@
static TQMap<Cell::Dirs, Cell::Dirs> contrdirs;
-MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) :
- KMainWindow(parent, name, WStyle_NoBorder)
+MainWindow::MainWindow(TQWidget *tqparent, const char* name, WFlags /*fl*/) :
+ KMainWindow(tqparent, name, WStyle_NoBorder)
{
m_clickcount = 0;
@@ -64,11 +64,11 @@ MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) :
KNotifyClient::startDaemon();
- KStdGameAction::gameNew(this, TQT_SLOT(slotNewGame()), actionCollection());
+ KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(slotNewGame()), actionCollection());
- KStdGameAction::highscores(this, TQT_SLOT(showHighscores()), actionCollection());
- KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
- KStdGameAction::configureHighscores(this, TQT_SLOT(configureHighscores()), actionCollection());
+ KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighscores()), actionCollection());
+ KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
+ KStdGameAction::configureHighscores(TQT_TQOBJECT(this), TQT_SLOT(configureHighscores()), actionCollection());
m_levels = KStdGameAction::chooseGameType(0, 0, actionCollection());
TQStringList lst;
@@ -78,7 +78,7 @@ MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) :
lst += i18n("Master");
m_levels->setItems(lst);
- setFixedSize(minimumSizeHint());
+ setFixedSize(tqminimumSizeHint());
statusBar()->insertItem("abcdefghijklmnopqrst: 0 ",1);
setAutoSaveSettings();
@@ -149,7 +149,7 @@ void MainWindow::newGame(int sk)
m_clickcount = 0;
TQString clicks = i18n("Click: %1");
- statusBar()->changeItem(clicks.arg(TQString::number(m_clickcount)),1);
+ statusBar()->changeItem(clicks.tqarg(TQString::number(m_clickcount)),1);
KNotifyClient::event(winId(), "startsound", i18n("New Game"));
for(int i = 0; i < MasterBoardSize * MasterBoardSize; i++)
@@ -370,7 +370,7 @@ void MainWindow::rotate(int index, bool toleft)
m_clickcount++;
TQString clicks = i18n("Click: %1");
- statusBar()->changeItem(clicks.arg(TQString::number(m_clickcount)),1);
+ statusBar()->changeItem(clicks.tqarg(TQString::number(m_clickcount)),1);
if (isGameOver())
{
diff --git a/knetwalk/src/mainwindow.h b/knetwalk/src/mainwindow.h
index e88fab6a..40402930 100644
--- a/knetwalk/src/mainwindow.h
+++ b/knetwalk/src/mainwindow.h
@@ -27,8 +27,9 @@ class KSelectAction;
class MainWindow : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- MainWindow(TQWidget *parent=0, const char* name=0, WFlags fl=0);
+ MainWindow(TQWidget *tqparent=0, const char* name=0, WFlags fl=0);
protected:
virtual void closeEvent(TQCloseEvent*);
private: