summaryrefslogtreecommitdiffstats
path: root/kenolaba
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /kenolaba
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kenolaba')
-rw-r--r--kenolaba/AbTop.cpp118
-rw-r--r--kenolaba/AbTop.h14
-rw-r--r--kenolaba/Ball.cpp52
-rw-r--r--kenolaba/Ball.h48
-rw-r--r--kenolaba/Board.cpp20
-rw-r--r--kenolaba/Board.h10
-rw-r--r--kenolaba/BoardWidget.cpp94
-rw-r--r--kenolaba/BoardWidget.h30
-rw-r--r--kenolaba/EvalDlgImpl.cpp142
-rw-r--r--kenolaba/EvalDlgImpl.h2
-rw-r--r--kenolaba/EvalScheme.cpp34
-rw-r--r--kenolaba/EvalScheme.h14
-rw-r--r--kenolaba/Move.cpp18
-rw-r--r--kenolaba/Move.h4
-rw-r--r--kenolaba/Network.cpp6
-rw-r--r--kenolaba/Network.h10
-rw-r--r--kenolaba/Spy.cpp44
-rw-r--r--kenolaba/Spy.h8
-rw-r--r--kenolaba/kenolaba.cpp2
19 files changed, 335 insertions, 335 deletions
diff --git a/kenolaba/AbTop.cpp b/kenolaba/AbTop.cpp
index a2283f16..1820e591 100644
--- a/kenolaba/AbTop.cpp
+++ b/kenolaba/AbTop.cpp
@@ -1,8 +1,8 @@
/* Class AbTop */
-#include <qpopupmenu.h>
-#include <qtimer.h>
-#include <qclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
+#include <tqclipboard.h>
#include <kaction.h>
#include <kapplication.h>
@@ -63,12 +63,12 @@ AbTop::AbTop()
timer = new QTimer;
- connect( timer, SIGNAL(timeout()), this, SLOT(timerDone()) );
+ connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timerDone()) );
board = new Board();
setMoveNo(0);
- connect( board, SIGNAL(searchBreak()), this, SLOT(searchBreak()) );
+ connect( board, TQT_SIGNAL(searchBreak()), this, TQT_SLOT(searchBreak()) );
Q_CHECK_PTR(board);
boardWidget = new BoardWidget(*board,this);
@@ -76,8 +76,8 @@ AbTop::AbTop()
spy = new Spy(*board);
#endif
- connect( boardWidget, SIGNAL(updateSpy(QString)),
- this, SLOT(updateSpy(QString)) );
+ connect( boardWidget, TQT_SIGNAL(updateSpy(TQString)),
+ this, TQT_SLOT(updateSpy(TQString)) );
setCentralWidget(boardWidget);
boardWidget->show();
@@ -88,17 +88,17 @@ AbTop::AbTop()
setMinimumSize(200,300);
// RMB context menu
- connect( boardWidget, SIGNAL(rightButtonPressed(int,const QPoint&)),
- this, SLOT(rightButtonPressed(int,const QPoint&)) );
+ connect( boardWidget, TQT_SIGNAL(rightButtonPressed(int,const TQPoint&)),
+ this, TQT_SLOT(rightButtonPressed(int,const TQPoint&)) );
- connect( boardWidget, SIGNAL(edited(int)),
- this, SLOT(edited(int)) );
+ connect( boardWidget, TQT_SIGNAL(edited(int)),
+ this, TQT_SLOT(edited(int)) );
- connect( board, SIGNAL(updateBestMove(Move&,int)),
- this, SLOT(updateBestMove(Move&,int)) );
+ connect( board, TQT_SIGNAL(updateBestMove(Move&,int)),
+ this, TQT_SLOT(updateBestMove(Move&,int)) );
- connect( boardWidget, SIGNAL(moveChoosen(Move&)),
- this, SLOT(moveChoosen(Move&)) );
+ connect( boardWidget, TQT_SIGNAL(moveChoosen(Move&)),
+ this, TQT_SLOT(moveChoosen(Move&)) );
/* default */
setLevel(Easy);
@@ -132,76 +132,76 @@ AbTop::~AbTop()
void AbTop::setupActions()
{
- newAction = KStdGameAction::gameNew( this, SLOT(newGame()), actionCollection() );
- KStdGameAction::quit( this, SLOT(close()), actionCollection() );
+ newAction = KStdGameAction::gameNew( this, TQT_SLOT(newGame()), actionCollection() );
+ KStdGameAction::quit( this, TQT_SLOT(close()), actionCollection() );
stopAction = new KAction( i18n("&Stop Search"), "stop", Key_S, this,
- SLOT(stopSearch()), actionCollection(), "move_stop");
+ TQT_SLOT(stopSearch()), actionCollection(), "move_stop");
backAction = new KAction( i18n("Take &Back"), "back",
KStdAccel::shortcut(KStdAccel::Prior), this,
- SLOT(back()), actionCollection(), "move_back");
+ TQT_SLOT(back()), actionCollection(), "move_back");
forwardAction = new KAction( i18n("&Forward"), "forward",
KStdAccel::shortcut(KStdAccel::Next), this,
- SLOT(forward()), actionCollection(), "move_forward");
+ TQT_SLOT(forward()), actionCollection(), "move_forward");
- hintAction = KStdGameAction::hint(this, SLOT(suggestion()), actionCollection());
+ hintAction = KStdGameAction::hint(this, TQT_SLOT(suggestion()), actionCollection());
- KStdAction::copy( this, SLOT(copy()), actionCollection());
- pasteAction = KStdAction::paste( this, SLOT(paste()), actionCollection());
+ KStdAction::copy( this, TQT_SLOT(copy()), actionCollection());
+ pasteAction = KStdAction::paste( this, TQT_SLOT(paste()), actionCollection());
(void) new KAction( i18n("&Restore Position"),
KStdAccel::shortcut(KStdAccel::Open),
- this, SLOT(restorePosition()),
+ this, TQT_SLOT(restorePosition()),
actionCollection(), "edit_restore" );
(void) new KAction( i18n("&Save Position"),
KStdAccel::shortcut(KStdAccel::Save),
- this, SLOT(savePosition()),
+ this, TQT_SLOT(savePosition()),
actionCollection(), "edit_save" );
KToggleAction *ta;
ta = new KToggleAction( i18n("&Network Play"), "network", Key_N,
actionCollection(), "game_net");
- connect(ta, SIGNAL(toggled(bool)), this, SLOT(gameNetwork(bool)));
+ connect(ta, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(gameNetwork(bool)));
editAction = new KToggleAction( i18n("&Modify"), "edit",
CTRL+Key_Insert, actionCollection(), "edit_modify");
- connect(editAction, SIGNAL(toggled(bool)), this, SLOT( editModify(bool)));
+ connect(editAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( editModify(bool)));
- showMenubar = KStdAction::showMenubar(this, SLOT(toggleMenubar()), actionCollection());
- KStdAction::saveOptions( this, SLOT(writeConfig()), actionCollection());
+ showMenubar = KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection());
+ KStdAction::saveOptions( this, TQT_SLOT(writeConfig()), actionCollection());
- KStdAction::preferences( this, SLOT(configure()), actionCollection());
+ KStdAction::preferences( this, TQT_SLOT(configure()), actionCollection());
moveSlowAction = new KToggleAction( i18n("&Move Slow"), 0,
actionCollection(), "options_moveSlow");
- connect(moveSlowAction, SIGNAL(toggled(bool)), this, SLOT(optionMoveSlow(bool)));
+ connect(moveSlowAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionMoveSlow(bool)));
renderBallsAction = new KToggleAction( i18n("&Render Balls"), 0,
actionCollection(), "options_renderBalls");
- connect(renderBallsAction, SIGNAL(toggled(bool)), this, SLOT(optionRenderBalls(bool)));
+ connect(renderBallsAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionRenderBalls(bool)));
showSpyAction = new KToggleAction( i18n("&Spy"), 0,
actionCollection(), "options_showSpy");
- connect(showSpyAction, SIGNAL(toggled(bool)), this, SLOT(optionShowSpy(bool)));
+ connect(showSpyAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionShowSpy(bool)));
levelAction = KStdGameAction::chooseGameType(0, 0, actionCollection());
- QStringList list;
+ TQStringList list;
for (uint i=0; i<Nb_Levels; i++)
list.append( i18n(LEVEL[i].label) );
levelAction->setItems(list);
- connect(levelAction, SIGNAL(activated(int)), SLOT(setLevel(int)));
+ connect(levelAction, TQT_SIGNAL(activated(int)), TQT_SLOT(setLevel(int)));
iplayAction = new KSelectAction(i18n("&Computer Play"), 0, actionCollection(), "options_iplay");
list.clear();
for (uint i=0; i<Nb_IPlays; i++)
list.append( i18n(IPLAY[i].label) );
iplayAction->setItems(list);
- connect(iplayAction, SIGNAL(activated(int)), SLOT(setIPlay(int)));
+ connect(iplayAction, TQT_SIGNAL(activated(int)), TQT_SLOT(setIPlay(int)));
}
void AbTop::toggleMenubar()
@@ -229,9 +229,9 @@ void AbTop::configure()
}
/* Right Mouse button pressed in BoardWidget area */
-void AbTop::rightButtonPressed(int /* field */, const QPoint& pos)
+void AbTop::rightButtonPressed(int /* field */, const TQPoint& pos)
{
- QPopupMenu* rmbMenu = static_cast<QPopupMenu*> (factory()->container("rmbPopup",this));
+ TQPopupMenu* rmbMenu = static_cast<TQPopupMenu*> (factory()->container("rmbPopup",this));
if (rmbMenu)
rmbMenu->popup( pos );
}
@@ -260,7 +260,7 @@ void AbTop::readConfig()
void AbTop::readOptions(KConfig* config)
{
- QString entry = config->readEntry("Level");
+ TQString entry = config->readEntry("Level");
for (uint i=0; i<Nb_Levels; i++)
if ( entry==LEVEL[i].key ) setLevel(i);
@@ -282,7 +282,7 @@ void AbTop::readOptions(KConfig* config)
void AbTop::readProperties(KConfig *config)
{
- QString entry;
+ TQString entry;
readOptions(config);
@@ -361,7 +361,7 @@ void AbTop::restorePosition()
{
KConfig* config = kapp->config();
config->setGroup("SavedPosition");
- QString entry = config->readEntry("Position");
+ TQString entry = config->readEntry("Position");
timerState = notStarted;
timer->stop();
@@ -379,10 +379,10 @@ void AbTop::restorePosition()
void AbTop::setupStatusBar()
{
- QString tmp;
+ TQString tmp;
- QString t = i18n("Press %1 for a new game").arg( newAction->shortcut().toString());
- statusLabel = new QLabel( t, statusBar(), "statusLabel" );
+ TQString t = i18n("Press %1 for a new game").arg( newAction->shortcut().toString());
+ statusLabel = new TQLabel( t, statusBar(), "statusLabel" );
statusBar()->addWidget(statusLabel,1,false);
// PERMANENT: Moving side + move No.
@@ -390,7 +390,7 @@ void AbTop::setupStatusBar()
// validPixmap, only visible in Modify mode: is position valid ?
warningPix = BarIcon( "warning" );
okPix = BarIcon( "ok" );
- validLabel = new QLabel( "", statusBar(), "validLabel" );
+ validLabel = new TQLabel( "", statusBar(), "validLabel" );
validLabel->setFixedSize( 18, statusLabel->sizeHint().height() );
validLabel->setAlignment( AlignCenter );
validLabel->hide();
@@ -399,20 +399,20 @@ void AbTop::setupStatusBar()
redBall = BarIcon( "redball" );
yellowBall = BarIcon( "yellowball" );
noBall = BarIcon( "noball" );
- ballLabel = new QLabel( "", statusBar(), "ballLabel" );
+ ballLabel = new TQLabel( "", statusBar(), "ballLabel" );
ballLabel->setPixmap(noBall);
ballLabel->setFixedSize( 18, statusLabel->sizeHint().height() );
ballLabel->setAlignment( AlignCenter );
statusBar()->addWidget(ballLabel, 0, true);
- moveLabel = new QLabel( i18n("Move %1").arg("--"), statusBar(), "moveLabel" );
+ moveLabel = new TQLabel( i18n("Move %1").arg("--"), statusBar(), "moveLabel" );
statusBar()->addWidget(moveLabel, 0, true);
#ifdef MYTRACE
/* Create a toolbar menu for debugging output level */
KToolBar *tb = toolBar("mainToolBar");
if (tb) {
- QPopupMenu* spyPopup = new QPopupMenu;
+ TQPopupMenu* spyPopup = new QPopupMenu;
spy0 = BarIcon( "spy0" );
spy1 = BarIcon( "spy1" );
spy2 = BarIcon( "spy2" );
@@ -421,8 +421,8 @@ void AbTop::setupStatusBar()
spyPopup->insertItem(spy1, 1);
spyPopup->insertItem(spy2, 2);
spyPopup->insertItem(spy3, 3);
- connect( spyPopup, SIGNAL(activated(int)),
- this, SLOT(setSpy(int)) );
+ connect( spyPopup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(setSpy(int)) );
tb->insertButton(spy0, 30, spyPopup,
TRUE, i18n("Spy"));
}
@@ -432,7 +432,7 @@ void AbTop::setupStatusBar()
-void AbTop::updateSpy(QString s)
+void AbTop::updateSpy(TQString s)
{
if (showSpy) {
if (s.isEmpty()) {
@@ -450,7 +450,7 @@ void AbTop::updateBestMove(Move& m, int value)
boardWidget->showMove(m,3);
boardWidget->showMove(m,0,false);
- QString tmp;
+ TQString tmp;
tmp.sprintf("%s : %+d", (const char*) m.name().utf8(), value-actValue);
updateSpy(tmp);
kapp->processEvents();
@@ -460,7 +460,7 @@ void AbTop::updateBestMove(Move& m, int value)
void AbTop::updateStatus()
{
- QString tmp;
+ TQString tmp;
bool showValid = false;
if (!editMode && timerState == noGame) {
@@ -475,7 +475,7 @@ void AbTop::updateStatus()
moveLabel->setText(tmp);
if (editMode) {
- tmp = QString("%1: %2 %3 - %4 %5")
+ tmp = TQString("%1: %2 %3 - %4 %5")
.arg( i18n("Edit") )
.arg( i18n("Red") ).arg(boardWidget->getColor1Count())
.arg( i18n("Yellow") ).arg(boardWidget->getColor2Count());
@@ -494,7 +494,7 @@ void AbTop::updateStatus()
showValid = true;
}
else {
- tmp = QString("%1 - %2")
+ tmp = TQString("%1 - %2")
.arg( (board->actColor() == Board::color1) ?
i18n("Red"):i18n("Yellow") )
.arg( iPlayNow() ?
@@ -733,7 +733,7 @@ void AbTop::newGame()
/* Copy ASCII representation into Clipboard */
void AbTop::copy()
{
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText( board->getASCIIState( moveNo ).ascii() );
}
@@ -741,7 +741,7 @@ void AbTop::paste()
{
if (!pastePossible) return;
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
pastePosition( cb->text().ascii() );
/* don't do this in pastePosition: RECURSION !! */
@@ -800,8 +800,8 @@ void AbTop::gameNetwork(bool on)
h2[i]=0;
net->addListener(h2, p);
}
- QObject::connect(net, SIGNAL(gotPosition(const char *)),
- this, SLOT(pastePosition(const char *)) );
+ TQObject::connect(net, TQT_SIGNAL(gotPosition(const char *)),
+ this, TQT_SLOT(pastePosition(const char *)) );
}
diff --git a/kenolaba/AbTop.h b/kenolaba/AbTop.h
index 35357452..be06f030 100644
--- a/kenolaba/AbTop.h
+++ b/kenolaba/AbTop.h
@@ -70,12 +70,12 @@ public slots:
void savePosition();
void restorePosition();
void setSpy(int);
- void updateSpy(QString);
+ void updateSpy(TQString);
void edited(int);
void updateBestMove(Move&,int);
void readConfig();
void writeConfig();
- void rightButtonPressed(int,const QPoint&);
+ void rightButtonPressed(int,const TQPoint&);
void gameNetwork(bool);
void editModify(bool);
@@ -106,7 +106,7 @@ private:
int actValue;
BoardWidget *boardWidget;
EvalScheme* currentEvalScheme;
- QTimer *timer;
+ TQTimer *timer;
int timerState;
int depth, moveNo;
bool showMoveLong, stop, showSpy;
@@ -123,13 +123,13 @@ private:
int yellow_id, red_id, both_id, none_id, iplay_id;
int spy_id, paste_id, edit_id, forward_id, net_id;
- QLabel *validLabel, *ballLabel, *moveLabel, *statusLabel;
- QPixmap warningPix, okPix, redBall, yellowBall, noBall, netPix;
- QPixmap spy0, spy1, spy2, spy3;
+ TQLabel *validLabel, *ballLabel, *moveLabel, *statusLabel;
+ TQPixmap warningPix, okPix, redBall, yellowBall, noBall, netPix;
+ TQPixmap spy0, spy1, spy2, spy3;
Network *net;
int myPort;
- QStrList hosts;
+ TQStrList hosts;
KAction *newAction, *stopAction, *backAction, *forwardAction, *hintAction, *pasteAction;
KToggleAction *showMenubar, *renderBallsAction, *moveSlowAction,
diff --git a/kenolaba/Ball.cpp b/kenolaba/Ball.cpp
index 565ef296..525f919b 100644
--- a/kenolaba/Ball.cpp
+++ b/kenolaba/Ball.cpp
@@ -1,18 +1,18 @@
/* Ball animation classes */
#include "Ball.h"
-#include <qtimer.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqtimer.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
#include <math.h>
#include <stdio.h>
Ball* Ball::first = 0;
-//QImage Ball::back;
+//TQImage Ball::back;
int Ball::sizeX, Ball::sizeY;
double Ball::lightX, Ball::lightY, Ball::lightZ;
-QColor Ball::lightColor;
+TQColor Ball::lightColor;
double Ball::rippleCount, Ball::rippleDepth;
/* set global Ball parameter */
@@ -33,7 +33,7 @@ void Ball::invalidate()
b->pm.resize(0,0);
}
-void Ball::setLight(int x, int y, int z, const QColor& c)
+void Ball::setLight(int x, int y, int z, const TQColor& c)
{
double len = sqrt(double(x*x + y*y + z*z));
@@ -57,7 +57,7 @@ void Ball::setTexture(double c, double d)
-Ball::Ball(const QColor& c, double a, int t)
+Ball::Ball(const TQColor& c, double a, int t)
{
if (first ==0) {
sizeX = sizeY = -1;
@@ -90,7 +90,7 @@ Ball::~Ball()
}
}
-QPixmap* Ball::pixmap()
+TQPixmap* Ball::pixmap()
{
if (pm.isNull() && sizeX>0 && sizeY>0)
render();
@@ -105,7 +105,7 @@ void Ball::render()
if (sizeX==0 || sizeY==0)
return;
- QImage image(sizeX,sizeY,32);
+ TQImage image(sizeX,sizeY,32);
image.fill(0);
double vv=2./(sizeX+sizeY);
@@ -159,8 +159,8 @@ void Ball::render()
}
}
}
- const QImage iMask = image.createHeuristicMask();
- QBitmap bMask;
+ const TQImage iMask = image.createHeuristicMask();
+ TQBitmap bMask;
bMask = iMask;
pm.convertFromImage( image, 0 );
pm.setMask(bMask);
@@ -171,15 +171,15 @@ void Ball::render()
BallAnimation::BallAnimation(int s, Ball* ball1, Ball* ball2)
{
- QColor c1 = ball1->ballColor();
+ TQColor c1 = ball1->ballColor();
double a1 = ball1->angle();
int r1 = c1.red(), g1 = c1.green(), b1 = c1.blue();
- QColor c2 = ball2->ballColor();
+ TQColor c2 = ball2->ballColor();
double a2 = ball2->angle();
int r2 = c2.red(), g2 = c2.green(), b2 = c2.blue();
- QColor c;
+ TQColor c;
double a;
int i;
@@ -213,8 +213,8 @@ BallPosition::BallPosition(int xp,int yp, Ball* d)
/* Class BallWidget */
-BallWidget::BallWidget( int _freq, int bFr, QWidget *parent, const char *name )
- : QWidget(parent,name), positions(MAX_POSITION), animations(MAX_ANIMATION)
+BallWidget::BallWidget( int _freq, int bFr, TQWidget *parent, const char *name )
+ : TQWidget(parent,name), positions(MAX_POSITION), animations(MAX_ANIMATION)
{
int i;
@@ -228,8 +228,8 @@ BallWidget::BallWidget( int _freq, int bFr, QWidget *parent, const char *name )
isRunning = false;
ballFraction = bFr;
realSize = -1;
- timer = new QTimer(this);
- connect( timer, SIGNAL(timeout()), SLOT(animate()) );
+ timer = new TQTimer(this);
+ connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(animate()) );
}
BallWidget::~BallWidget()
@@ -302,7 +302,7 @@ void BallWidget::stopAnimation(int pos)
p->actStep = p->actAnimation->steps;
}
-void BallWidget::resizeEvent(QResizeEvent *)
+void BallWidget::resizeEvent(TQResizeEvent *)
{
int w = width() *10/12, h = height();
@@ -312,13 +312,13 @@ void BallWidget::resizeEvent(QResizeEvent *)
repaint();
}
-void BallWidget::paintEvent(QPaintEvent *)
+void BallWidget::paintEvent(TQPaintEvent *)
{
paint(this);
}
-void BallWidget::paint(QPaintDevice *pd)
+void BallWidget::paint(TQPaintDevice *pd)
{
int i;
BallPosition *p;
@@ -421,7 +421,7 @@ void BallWidget::animate()
/* Ball Test */
-BallTest::BallTest( QWidget *parent, const char *name )
+BallTest::BallTest( TQWidget *parent, const char *name )
: BallWidget(10,2,parent,name)
{
int w,h;
@@ -449,13 +449,13 @@ BallTest::BallTest( QWidget *parent, const char *name )
}
/*
-void BallTest::paintEvent( QPaintEvent * )
+void BallTest::paintEvent( TQPaintEvent * )
{
bitBlt(this,0,0, b.pixmap());
}
*/
-void BallTest::mousePressEvent( QMouseEvent * )
+void BallTest::mousePressEvent( TQMouseEvent * )
{
startAnimation(0,0, ANIMATION_CYCLE);
startAnimation(1,1);
@@ -463,7 +463,7 @@ void BallTest::mousePressEvent( QMouseEvent * )
startAnimation(3,3, ANIMATION_LOOP);
}
-void BallTest::mouseReleaseEvent( QMouseEvent * )
+void BallTest::mouseReleaseEvent( TQMouseEvent * )
{
stopAnimation(0);
stopAnimation(1);
diff --git a/kenolaba/Ball.h b/kenolaba/Ball.h
index 1a3e0d28..1fcf1b37 100644
--- a/kenolaba/Ball.h
+++ b/kenolaba/Ball.h
@@ -16,11 +16,11 @@
#ifndef _BALL_H_
#define _BALL_H_
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcolor.h>
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqcolor.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
/* textures for balls */
#define TEX_FLAT 0
@@ -29,13 +29,13 @@
class Ball {
public:
- Ball(const QColor& c, double a = 0.0, int t=TEX_RIPPLE );
+ Ball(const TQColor& c, double a = 0.0, int t=TEX_RIPPLE );
~Ball();
- QPixmap* pixmap();
+ TQPixmap* pixmap();
double angle() { return an; }
- QColor ballColor() { return bColor; }
+ TQColor ballColor() { return bColor; }
void setSpecials(double z, double f, double l)
{ zoom = z, flip=f, limit=l; }
@@ -43,7 +43,7 @@ class Ball {
static int h() { return sizeY; }
static void setSize(int x,int y);
static void setLight(int x=5, int y=3, int z=10,
- const QColor& c = QColor(200,230,255) );
+ const TQColor& c = TQColor(200,230,255) );
static void setTexture(double c=13., double d=.2);
private:
@@ -51,14 +51,14 @@ class Ball {
void render();
static void invalidate();
- //static QImage back;
+ //static TQImage back;
static int sizeX, sizeY;
static double lightX, lightY, lightZ;
- static QColor lightColor;
+ static TQColor lightColor;
static double rippleCount, rippleDepth;
- QPixmap pm;
- QColor bColor;
+ TQPixmap pm;
+ TQColor bColor;
double an, sina, cosa;
double zoom, flip, limit;
int tex;
@@ -73,7 +73,7 @@ class BallAnimation {
BallAnimation(int s, Ball*, Ball*);
int steps;
- QPtrList<Ball> balls;
+ TQPtrList<Ball> balls;
};
#define ANIMATION_STOPPED 0
@@ -99,7 +99,7 @@ class BallWidget : public QWidget
Q_OBJECT
public:
- BallWidget(int _freq, int bFr, QWidget *parent = 0, const char *name = 0);
+ BallWidget(int _freq, int bFr, TQWidget *parent = 0, const char *name = 0);
~BallWidget();
void createBlending(int, int, Ball* , Ball* );
@@ -108,10 +108,10 @@ class BallWidget : public QWidget
void startAnimation(int pos, int anim, int type=ANIMATION_FORWARD);
void stopAnimation(int pos);
- void paint(QPaintDevice *);
+ void paint(TQPaintDevice *);
- virtual void resizeEvent(QResizeEvent *);
- virtual void paintEvent(QPaintEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
+ virtual void paintEvent(TQPaintEvent *);
signals:
void animationFinished(int);
@@ -124,14 +124,14 @@ class BallWidget : public QWidget
void animate();
protected:
- QMemArray<BallPosition*> positions;
- QMemArray<BallAnimation*> animations;
+ TQMemArray<BallPosition*> positions;
+ TQMemArray<BallAnimation*> animations;
private:
int freq;
int xStart, yStart, realSize, ballFraction;
bool isRunning;
- QTimer *timer;
+ TQTimer *timer;
};
@@ -141,10 +141,10 @@ class BallTest: public BallWidget
{
Q_OBJECT
public:
- BallTest(QWidget *parent=0, const char *name=0 );
+ BallTest(TQWidget *parent=0, const char *name=0 );
protected:
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
};
diff --git a/kenolaba/Board.cpp b/kenolaba/Board.cpp
index b8546fbc..d939ad09 100644
--- a/kenolaba/Board.cpp
+++ b/kenolaba/Board.cpp
@@ -11,8 +11,8 @@
#include <stdio.h>
-#include <qdatetime.h>
-#include <qstrlist.h>
+#include <tqdatetime.h>
+#include <tqstrlist.h>
#include <kconfig.h>
#include <krandomsequence.h>
@@ -122,7 +122,7 @@ Board::Board()
void Board::setEvalScheme(EvalScheme* scheme)
{
if (!scheme)
- scheme = new EvalScheme( QString("Default") );
+ scheme = new EvalScheme( TQString("Default") );
_evalScheme = scheme;
setFieldValues();
@@ -1347,9 +1347,9 @@ void Board::print(int )
color1Count, color2Count);
}
-QString Board::getASCIIState(int moveNo)
+TQString Board::getASCIIState(int moveNo)
{
- QString state, tmp;
+ TQString state, tmp;
int row,i;
char spaces[]=" ";
@@ -1378,7 +1378,7 @@ QString Board::getASCIIState(int moveNo)
return state;
}
-int Board::setASCIIState(const QString& state)
+int Board::setASCIIState(const TQString& state)
{
int moveNo=-1, index;
int len = state.length();
@@ -1443,10 +1443,10 @@ int Board::setASCIIState(const QString& state)
}
-QString Board::getState(int moveNo)
+TQString Board::getState(int moveNo)
{
- QString state;
- QString entry, tmp;
+ TQString state;
+ TQString entry, tmp;
int i;
/* Color + Counts */
@@ -1464,7 +1464,7 @@ QString Board::getState(int moveNo)
return state;
}
-int Board::setState(QString& _state)
+int Board::setState(TQString& _state)
{
int moveNo;
const char *state = _state.ascii();
diff --git a/kenolaba/Board.h b/kenolaba/Board.h
index 61871d1f..81b589d9 100644
--- a/kenolaba/Board.h
+++ b/kenolaba/Board.h
@@ -6,7 +6,7 @@
#ifndef _BOARD_H_
#define _BOARD_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <krandomsequence.h>
#include "Move.h"
@@ -126,12 +126,12 @@ class Board : public QObject
void stopSearch() { breakOut = true; }
/* Compressed ASCII representation */
- QString getState(int);
- int setState(QString&);
+ TQString getState(int);
+ int setState(TQString&);
/* Readable ASCII representation */
- QString getASCIIState(int);
- int setASCIIState(const QString&);
+ TQString getASCIIState(int);
+ int setASCIIState(const TQString&);
void updateSpy(bool b) { bUpdateSpy = b; }
diff --git a/kenolaba/BoardWidget.cpp b/kenolaba/BoardWidget.cpp
index 9d420cc3..da6358c7 100644
--- a/kenolaba/BoardWidget.cpp
+++ b/kenolaba/BoardWidget.cpp
@@ -6,9 +6,9 @@
* Josef Weidendorfer, 9/97
*/
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kdebug.h>
@@ -34,7 +34,7 @@
#include "bitmaps/Arrow6"
#include "bitmaps/Arrow6Mask"
-BoardWidget::BoardWidget(Board& b, QWidget *parent, const char *name)
+BoardWidget::BoardWidget(Board& b, TQWidget *parent, const char *name)
: BallWidget(10,9,parent, name), board(b)
{
pList =0;
@@ -44,18 +44,18 @@ BoardWidget::BoardWidget(Board& b, QWidget *parent, const char *name)
#ifdef HAVE_KIR
m_backRenderer = KIRManager::attach( this, "Background" );
- connect( m_backRenderer, SIGNAL(rendered()),
- this, SLOT(drawBoard()) );
+ connect( m_backRenderer, TQT_SIGNAL(rendered()),
+ this, TQT_SLOT(drawBoard()) );
#endif
/* setup cursors */
#define createCursor(bitmap,name) \
- static QBitmap bitmap(bitmap##_width, bitmap##_height, \
+ static TQBitmap bitmap(bitmap##_width, bitmap##_height, \
(unsigned char *) bitmap##_bits, TRUE); \
- static QBitmap bitmap##Mask(bitmap##Mask_width, bitmap##Mask_height, \
+ static TQBitmap bitmap##Mask(bitmap##Mask_width, bitmap##Mask_height, \
(unsigned char *) bitmap##Mask_bits, TRUE); \
- name = new QCursor(bitmap, bitmap##Mask, bitmap##_x_hot, bitmap##_y_hot);
+ name = new TQCursor(bitmap, bitmap##Mask, bitmap##_x_hot, bitmap##_y_hot);
createCursor(Arrow1, arrow[1]);
createCursor(Arrow2, arrow[2]);
@@ -66,12 +66,12 @@ BoardWidget::BoardWidget(Board& b, QWidget *parent, const char *name)
setCursor(crossCursor);
- // boardColor = new QColor("lightblue");
- boardColor = new QColor(backgroundColor());
- redColor = new QColor("red2");
- yellowColor = new QColor("yellow2");
- redHColor = new QColor("orange");
- yellowHColor = new QColor("green");
+ // boardColor = new TQColor("lightblue");
+ boardColor = new TQColor(backgroundColor());
+ redColor = new TQColor("red2");
+ yellowColor = new TQColor("yellow2");
+ redHColor = new TQColor("orange");
+ yellowHColor = new TQColor("green");
initBalls();
@@ -149,18 +149,18 @@ void BoardWidget::initBalls()
for(i=0;i<3;i++) createPos(pos++, -2-i, 4-i, 0 );
}
-void BoardWidget::resizeEvent(QResizeEvent *e)
+void BoardWidget::resizeEvent(TQResizeEvent *e)
{
drawBoard();
BallWidget::resizeEvent(e);
}
-void BoardWidget::moveEvent(QMoveEvent*)
+void BoardWidget::moveEvent(TQMoveEvent*)
{
drawBoard();
}
-void BoardWidget::paintEvent(QPaintEvent *)
+void BoardWidget::paintEvent(TQPaintEvent *)
{
if (renderMode) {
pm = boardPM;
@@ -172,14 +172,14 @@ void BoardWidget::paintEvent(QPaintEvent *)
}
-void drawShadedHexagon(QPainter *p, int x, int y, int r, int lineWidth,
- const QColorGroup& g, bool sunken)
+void drawShadedHexagon(TQPainter *p, int x, int y, int r, int lineWidth,
+ const TQColorGroup& g, bool sunken)
{
int dx=r/2, dy=(r*87)/100;
int y1=y-dy, y2=y+dy;
int i;
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
p->setPen(sunken ? g.midlight() : g.dark());
@@ -201,13 +201,13 @@ void drawShadedHexagon(QPainter *p, int x, int y, int r, int lineWidth,
}
-void drawColor(QPainter *p, int x, int y, int r, QColor* c)
+void drawColor(TQPainter *p, int x, int y, int r, TQColor* c)
{
- QColor w("white");
- QPalette pal(*c);
+ TQColor w("white");
+ TQPalette pal(*c);
- QPen oldPen = p->pen();
- QBrush oldBrush = p->brush();
+ TQPen oldPen = p->pen();
+ TQBrush oldBrush = p->brush();
p->setBrush(pal.active().dark());
p->setPen(pal.active().dark());
@@ -236,18 +236,18 @@ void BoardWidget::drawBoard()
boardPM.fill(this, 0,0);
#ifndef HAVE_KIR
- QColorGroup g = QPalette( *boardColor ).active();
- QColorGroup g2 = QWidget::colorGroup();
+ TQColorGroup g = TQPalette( *boardColor ).active();
+ TQColorGroup g2 = TQWidget::colorGroup();
int boardSize = width() *10/12;
if (boardSize > height()) boardSize = height();
- QPainter p;
+ TQPainter p;
p.begin(&boardPM);
- p.setBrush(g2.brush(QColorGroup::Mid));
+ p.setBrush(g2.brush(TQColorGroup::Mid));
- QWMatrix m;
- QPoint cp = rect().center();
+ TQWMatrix m;
+ TQPoint cp = rect().center();
m.translate(cp.x(), cp.y());
m.scale(boardSize/1100.0, boardSize/1000.0);
@@ -259,7 +259,7 @@ void BoardWidget::drawBoard()
int i,j;
- QPointArray a;
+ TQPointArray a;
int dx=520 /2, dy=(520 *87)/100;
a.setPoints(6, -dx,-dy, dx,-dy, 2*dx,0, dx,dy, -dx,dy, -2*dx,0 );
p.drawPolygon(a);
@@ -352,12 +352,12 @@ void BoardWidget::draw()
int boardSize = width() *10/12;
if (boardSize > height()) boardSize = height();
- QPainter p;
+ TQPainter p;
p.begin(&pm);
p.setBrush(foregroundColor());
- QWMatrix m;
- QPoint cp = rect().center();
+ TQWMatrix m;
+ TQPoint cp = rect().center();
m.translate(cp.x(), cp.y());
m.scale(boardSize/1100.0, boardSize/1000.0);
@@ -829,7 +829,7 @@ bool BoardWidget::isValidEnd(int pos)
-void BoardWidget::mousePressEvent( QMouseEvent* pEvent )
+void BoardWidget::mousePressEvent( TQMouseEvent* pEvent )
{
int pos = positionOf( pEvent->x(), pEvent->y() );
int f = fieldOf(pos);
@@ -887,14 +887,14 @@ void BoardWidget::mousePressEvent( QMouseEvent* pEvent )
showStart(actMove,1);
startShown = true;
- QString tmp;
+ TQString tmp;
actValue = - board.calcEvaluation();
tmp = i18n("Board value: %1").arg(actValue);
emit updateSpy(tmp);
}
-void BoardWidget::mouseMoveEvent( QMouseEvent* pEvent )
+void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent )
{
if ((!gettingMove && !editMode) || !mbDown) return;
@@ -928,7 +928,7 @@ void BoardWidget::mouseMoveEvent( QMouseEvent* pEvent )
showStart(actMove,1);
startShown = true;
- QString tmp;
+ TQString tmp;
actValue = - board.calcEvaluation();
tmp = i18n("Board value: %1").arg(actValue);
emit updateSpy(tmp);
@@ -946,16 +946,16 @@ void BoardWidget::mouseMoveEvent( QMouseEvent* pEvent )
int v = board.calcEvaluation();
board.takeBack();
- QString tmp;
+ TQString tmp;
tmp.sprintf("%+d", v-actValue);
- QString str = QString("%1 : %2").arg(actMove.name()).arg(tmp);
+ TQString str = TQString("%1 : %2").arg(actMove.name()).arg(tmp);
emit updateSpy(str);
showMove(actMove,3);
setCursor(*arrow[shownDirection]);
}
else {
- QString tmp;
+ TQString tmp;
setCursor(crossCursor);
if (pos == startPos) {
@@ -970,7 +970,7 @@ void BoardWidget::mouseMoveEvent( QMouseEvent* pEvent )
}
-void BoardWidget::mouseReleaseEvent( QMouseEvent* pEvent )
+void BoardWidget::mouseReleaseEvent( TQMouseEvent* pEvent )
{
if (!gettingMove && !editMode) return;
mbDown = false;
@@ -1015,13 +1015,13 @@ void BoardWidget::mouseReleaseEvent( QMouseEvent* pEvent )
startValid = false;
setCursor(crossCursor);
- QString tmp;
+ TQString tmp;
emit updateSpy(tmp);
}
-QSize BoardWidget::sizeHint() const
+TQSize BoardWidget::sizeHint() const
{
- return QSize(400, 350);
+ return TQSize(400, 350);
}
#include "BoardWidget.moc"
diff --git a/kenolaba/BoardWidget.h b/kenolaba/BoardWidget.h
index 8fc0a317..f3cfd969 100644
--- a/kenolaba/BoardWidget.h
+++ b/kenolaba/BoardWidget.h
@@ -1,8 +1,8 @@
#ifndef _BOARDWIDGET_H_
#define _BOARDWIDGET_H_
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include "Ball.h"
#include "Move.h"
@@ -17,19 +17,19 @@ class BoardWidget : public BallWidget
Q_OBJECT
public:
- BoardWidget(Board&, QWidget *parent = 0, const char *name = 0);
+ BoardWidget(Board&, TQWidget *parent = 0, const char *name = 0);
~BoardWidget();
void createPos(int , int , int , Ball*);
void initBalls();
void updateBalls();
- virtual void resizeEvent(QResizeEvent *);
- virtual void moveEvent(QMoveEvent *);
- virtual void paintEvent(QPaintEvent *);
- virtual void mousePressEvent( QMouseEvent* pEvent );
- virtual void mouseReleaseEvent( QMouseEvent* pEvent );
- virtual void mouseMoveEvent( QMouseEvent* pEvent );
+ virtual void resizeEvent(TQResizeEvent *);
+ virtual void moveEvent(TQMoveEvent *);
+ virtual void paintEvent(TQPaintEvent *);
+ virtual void mousePressEvent( TQMouseEvent* pEvent );
+ virtual void mouseReleaseEvent( TQMouseEvent* pEvent );
+ virtual void mouseMoveEvent( TQMouseEvent* pEvent );
void renderBalls(bool r);
@@ -73,18 +73,18 @@ class BoardWidget : public BallWidget
signals:
void moveChoosen(Move&);
- void rightButtonPressed(int,const QPoint&);
- void updateSpy(QString);
+ void rightButtonPressed(int,const TQPoint&);
+ void updateSpy(TQString);
void edited(int);
protected:
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
private:
int positionOf(int x, int y);
bool isValidStart(int pos, bool);
bool isValidEnd(int pos);
- QPixmap pm, boardPM;
+ TQPixmap pm, boardPM;
Board& board;
int actValue;
@@ -102,8 +102,8 @@ class BoardWidget : public BallWidget
bool gettingMove, mbDown, startValid, startShown;
int startPos, actPos, oldPos, shownDirection;
int startField, startField2, actField, oldField, startType;
- QColor *boardColor, *redColor, *yellowColor, *redHColor, *yellowHColor;
- QCursor *arrowAll, *arrow[7];
+ TQColor *boardColor, *redColor, *yellowColor, *redHColor, *yellowHColor;
+ TQCursor *arrowAll, *arrow[7];
Ball *n1, *n2, *h1, *h2, *d1, *d2; //, *e;
diff --git a/kenolaba/EvalDlgImpl.cpp b/kenolaba/EvalDlgImpl.cpp
index a5903429..70662629 100644
--- a/kenolaba/EvalDlgImpl.cpp
+++ b/kenolaba/EvalDlgImpl.cpp
@@ -3,12 +3,12 @@
*
*/
-#include <qvalidator.h>
-#include <qlineedit.h>
-#include <qlcdnumber.h>
+#include <tqvalidator.h>
+#include <tqlineedit.h>
+#include <tqlcdnumber.h>
#include <klineeditdlg.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klocale.h>
@@ -19,20 +19,20 @@
#include "Board.h"
#include "EvalScheme.h"
-EvalDlgImpl::EvalDlgImpl(QWidget* parent, Board* board)
+EvalDlgImpl::EvalDlgImpl(TQWidget* parent, Board* board)
:EvalDlg(parent)
{
_board = board;
_origScheme = board->evalScheme();
_scheme = new EvalScheme(*_origScheme);
- connect( evalDelete, SIGNAL( clicked() ), this, SLOT( deleteEntry() ) );
- connect( evalSaveAs, SIGNAL( clicked() ), this, SLOT( saveas() ) );
- connect( evalList, SIGNAL( highlighted(int) ), this, SLOT( select(int) ) );
+ connect( evalDelete, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteEntry() ) );
+ connect( evalSaveAs, TQT_SIGNAL( clicked() ), this, TQT_SLOT( saveas() ) );
+ connect( evalList, TQT_SIGNAL( highlighted(int) ), this, TQT_SLOT( select(int) ) );
KConfig* config = kapp->config();
config->setGroup("General");
- QStringList list = config->readListEntry("EvalSchemes");
+ TQStringList list = config->readListEntry("EvalSchemes");
evalList->insertItem( i18n("Current") );
evalList->insertItem( i18n("Default") );
for(int i=0;i<list.count();i++)
@@ -52,33 +52,33 @@ EvalDlgImpl::~EvalDlgImpl()
void EvalDlgImpl::connectEditLines()
{
- connect( moveEval1, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval6, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval7, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval8, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( moveEval9, SIGNAL(textChanged(const QString&)), this, SLOT(updateMove()) );
- connect( posEval1, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( posEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( posEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( posEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( posEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( diffEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( diffEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( diffEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( diffEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateFields()) );
- connect( rowEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateInARow()) );
- connect( rowEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateInARow()) );
- connect( rowEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateInARow()) );
- connect( rowEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateInARow()) );
- connect( countEval1, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
- connect( countEval2, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
- connect( countEval3, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
- connect( countEval4, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
- connect( countEval5, SIGNAL(textChanged(const QString&)), this, SLOT(updateCount()) );
+ connect( moveEval1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval6, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval7, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval8, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( moveEval9, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateMove()) );
+ connect( posEval1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( posEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( posEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( posEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( posEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( diffEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( diffEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( diffEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( diffEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateFields()) );
+ connect( rowEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateInARow()) );
+ connect( rowEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateInARow()) );
+ connect( rowEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateInARow()) );
+ connect( rowEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateInARow()) );
+ connect( countEval1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
+ connect( countEval2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
+ connect( countEval3, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
+ connect( countEval4, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
+ connect( countEval5, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateCount()) );
}
void EvalDlgImpl::disconnectEditLines()
@@ -115,40 +115,40 @@ void EvalDlgImpl::disconnectEditLines()
void EvalDlgImpl::updateWidgets()
{
// Moves
- moveEval1->setText( QString::number(_scheme->moveValue(Move::move1)) );
- moveEval2->setText( QString::number(_scheme->moveValue(Move::move2)) );
- moveEval3->setText( QString::number(_scheme->moveValue(Move::move3)) );
- moveEval4->setText( QString::number(_scheme->moveValue(Move::push1with2)) );
- moveEval5->setText( QString::number(_scheme->moveValue(Move::push1with3)) );
- moveEval6->setText( QString::number(_scheme->moveValue(Move::push2)) );
- moveEval7->setText( QString::number(_scheme->moveValue(Move::out1with2)) );
- moveEval8->setText( QString::number(_scheme->moveValue(Move::out1with3)) );
- moveEval9->setText( QString::number(_scheme->moveValue(Move::out2)) );
+ moveEval1->setText( TQString::number(_scheme->moveValue(Move::move1)) );
+ moveEval2->setText( TQString::number(_scheme->moveValue(Move::move2)) );
+ moveEval3->setText( TQString::number(_scheme->moveValue(Move::move3)) );
+ moveEval4->setText( TQString::number(_scheme->moveValue(Move::push1with2)) );
+ moveEval5->setText( TQString::number(_scheme->moveValue(Move::push1with3)) );
+ moveEval6->setText( TQString::number(_scheme->moveValue(Move::push2)) );
+ moveEval7->setText( TQString::number(_scheme->moveValue(Move::out1with2)) );
+ moveEval8->setText( TQString::number(_scheme->moveValue(Move::out1with3)) );
+ moveEval9->setText( TQString::number(_scheme->moveValue(Move::out2)) );
// Position
- posEval1->setText( QString::number(_scheme->ringValue(0)) );
- posEval2->setText( QString::number(_scheme->ringValue(1)) );
- posEval3->setText( QString::number(_scheme->ringValue(2)) );
- posEval4->setText( QString::number(_scheme->ringValue(3)) );
- posEval5->setText( QString::number(_scheme->ringValue(4)) );
+ posEval1->setText( TQString::number(_scheme->ringValue(0)) );
+ posEval2->setText( TQString::number(_scheme->ringValue(1)) );
+ posEval3->setText( TQString::number(_scheme->ringValue(2)) );
+ posEval4->setText( TQString::number(_scheme->ringValue(3)) );
+ posEval5->setText( TQString::number(_scheme->ringValue(4)) );
- diffEval2->setText( QString::number(_scheme->ringDiff(1)) );
- diffEval3->setText( QString::number(_scheme->ringDiff(2)) );
- diffEval4->setText( QString::number(_scheme->ringDiff(3)) );
- diffEval5->setText( QString::number(_scheme->ringDiff(4)) );
+ diffEval2->setText( TQString::number(_scheme->ringDiff(1)) );
+ diffEval3->setText( TQString::number(_scheme->ringDiff(2)) );
+ diffEval4->setText( TQString::number(_scheme->ringDiff(3)) );
+ diffEval5->setText( TQString::number(_scheme->ringDiff(4)) );
// InARow
- rowEval2->setText( QString::number(_scheme->inARowValue(0)) );
- rowEval3->setText( QString::number(_scheme->inARowValue(1)) );
- rowEval4->setText( QString::number(_scheme->inARowValue(2)) );
- rowEval5->setText( QString::number(_scheme->inARowValue(3)) );
+ rowEval2->setText( TQString::number(_scheme->inARowValue(0)) );
+ rowEval3->setText( TQString::number(_scheme->inARowValue(1)) );
+ rowEval4->setText( TQString::number(_scheme->inARowValue(2)) );
+ rowEval5->setText( TQString::number(_scheme->inARowValue(3)) );
// Count
- countEval1->setText( QString::number(_scheme->stoneValue(1)) );
- countEval2->setText( QString::number(_scheme->stoneValue(2)) );
- countEval3->setText( QString::number(_scheme->stoneValue(3)) );
- countEval4->setText( QString::number(_scheme->stoneValue(4)) );
- countEval5->setText( QString::number(_scheme->stoneValue(5)) );
+ countEval1->setText( TQString::number(_scheme->stoneValue(1)) );
+ countEval2->setText( TQString::number(_scheme->stoneValue(2)) );
+ countEval3->setText( TQString::number(_scheme->stoneValue(3)) );
+ countEval4->setText( TQString::number(_scheme->stoneValue(4)) );
+ countEval5->setText( TQString::number(_scheme->stoneValue(5)) );
updateEval();
}
@@ -232,12 +232,12 @@ void EvalDlgImpl::deleteEntry()
// You cannot delete Pseudo Items 0 (Current) and 1 (Default)
if (i>1) {
- QString name = evalList->text(i);
+ TQString name = evalList->text(i);
evalList->removeItem(i);
KConfig* config = kapp->config();
config->setGroup("General");
- QStringList list = config->readListEntry("EvalSchemes");
+ TQStringList list = config->readListEntry("EvalSchemes");
list.remove(name);
config->writeEntry("EvalSchemes", list);
config->sync();
@@ -246,15 +246,15 @@ void EvalDlgImpl::deleteEntry()
void EvalDlgImpl::saveas()
{
- KLineEditDlg dlg(i18n("Name for scheme:"), QString::null, this);
+ KLineEditDlg dlg(i18n("Name for scheme:"), TQString::null, this);
dlg.setCaption(i18n("Save Scheme"));
if (dlg.exec()) {
- QString name=dlg.text();
+ TQString name=dlg.text();
KConfig* config = kapp->config();
config->setGroup("General");
- QStringList list = config->readListEntry("EvalSchemes");
- QListBoxItem *it = evalList->findItem(name);
+ TQStringList list = config->readListEntry("EvalSchemes");
+ TQListBoxItem *it = evalList->findItem(name);
if (!it) {
evalList->insertItem(name);
it = evalList->findItem(name);
@@ -272,7 +272,7 @@ void EvalDlgImpl::saveas()
void EvalDlgImpl::select(int i)
{
- QString name = evalList->text(i);
+ TQString name = evalList->text(i);
delete _scheme;
_scheme = 0;
diff --git a/kenolaba/EvalDlgImpl.h b/kenolaba/EvalDlgImpl.h
index 70c903fb..e7e4cb0d 100644
--- a/kenolaba/EvalDlgImpl.h
+++ b/kenolaba/EvalDlgImpl.h
@@ -16,7 +16,7 @@ class EvalDlgImpl: public EvalDlg
Q_OBJECT
public:
- EvalDlgImpl(QWidget* parent, Board* board);
+ EvalDlgImpl(TQWidget* parent, Board* board);
~EvalDlgImpl();
EvalScheme* evalScheme() { return _scheme; }
diff --git a/kenolaba/EvalScheme.cpp b/kenolaba/EvalScheme.cpp
index 18ba5b43..d884f398 100644
--- a/kenolaba/EvalScheme.cpp
+++ b/kenolaba/EvalScheme.cpp
@@ -24,7 +24,7 @@ static int defaultInARowValue[InARowCounter::inARowCount]= { 2, 5, 4, 3 };
/**
* Constructor: Set Default values
*/
-EvalScheme::EvalScheme(QString n)
+EvalScheme::EvalScheme(TQString n)
{
_name = n;
setDefaults();
@@ -76,11 +76,11 @@ void EvalScheme::setDefaults()
void EvalScheme::read(KConfig *config)
{
- QString confSection = QString("%1 Evaluation Scheme").arg(_name);
+ TQString confSection = TQString("%1 Evaluation Scheme").arg(_name);
config->setGroup(confSection);
- QStringList list;
- QString tmp;
+ TQStringList list;
+ TQString tmp;
list = config->readListEntry("StoneValues");
if (list.count()>0) {
@@ -117,10 +117,10 @@ void EvalScheme::read(KConfig *config)
void EvalScheme::save(KConfig* config)
{
- QString confSection = QString("%1 Evaluation Scheme").arg(_name);
+ TQString confSection = TQString("%1 Evaluation Scheme").arg(_name);
config->setGroup(confSection);
- QString entry;
+ TQString entry;
entry.sprintf("%d,%d,%d,%d,%d", _stoneValue[1], _stoneValue[2],
_stoneValue[3], _stoneValue[4], _stoneValue[5]);
@@ -128,12 +128,12 @@ void EvalScheme::save(KConfig* config)
entry.sprintf("%d", _moveValue[0]);
for(int i=1;i<Move::typeCount;i++)
- entry += QString(", %1").arg( _moveValue[i] );
+ entry += TQString(", %1").arg( _moveValue[i] );
config->writeEntry("MoveValues", entry);
entry.sprintf("%d", _inARowValue[0]);
for(int i=1;i<InARowCounter::inARowCount;i++)
- entry += QString(", %1").arg( _inARowValue[i] );
+ entry += TQString(", %1").arg( _inARowValue[i] );
config->writeEntry("InARowValues", entry);
entry.sprintf("%d,%d,%d,%d,%d", _ringValue[0], _ringValue[1],
@@ -182,7 +182,7 @@ void EvalScheme::setInARowValue(int stones, int value)
*
*/
-EvalScheme* EvalScheme::create(QString scheme)
+EvalScheme* EvalScheme::create(TQString scheme)
{
int pos = scheme.find('=');
if (pos<0) return 0;
@@ -190,7 +190,7 @@ EvalScheme* EvalScheme::create(QString scheme)
EvalScheme* evalScheme = new EvalScheme( scheme.left(pos) );
evalScheme->setDefaults();
- QStringList list = QStringList::split( QString(","), scheme.right(pos+1) );
+ TQStringList list = TQStringList::split( TQString(","), scheme.right(pos+1) );
int i=0;
while(i<list.count()) {
@@ -210,22 +210,22 @@ EvalScheme* EvalScheme::create(QString scheme)
return evalScheme;
}
-QString EvalScheme::ascii()
+TQString EvalScheme::ascii()
{
- QString res;
+ TQString res;
int i;
res.sprintf("%s=%d", _name.ascii(), _stoneValue[1]);
for(i=1;i<6;i++)
- res += QString(",%1").arg( _stoneValue[i] );
+ res += TQString(",%1").arg( _stoneValue[i] );
for(i=0;i<Move::typeCount;i++)
- res += QString(",%1").arg( _moveValue[i] );
+ res += TQString(",%1").arg( _moveValue[i] );
for(i=0;i<InARowCounter::inARowCount;i++)
- res += QString(",%1").arg( _inARowValue[i] );
+ res += TQString(",%1").arg( _inARowValue[i] );
for(i=0;i<5;i++)
- res += QString(",%1").arg( _ringValue[i] );
+ res += TQString(",%1").arg( _ringValue[i] );
for(i=0;i<5;i++)
- res += QString(",%1").arg( _ringDiff[i] );
+ res += TQString(",%1").arg( _ringDiff[i] );
return res;
}
diff --git a/kenolaba/EvalScheme.h b/kenolaba/EvalScheme.h
index 0efcafb8..3a9982c5 100644
--- a/kenolaba/EvalScheme.h
+++ b/kenolaba/EvalScheme.h
@@ -10,7 +10,7 @@
#ifndef _EVALSCHEME_H_
#define _EVALSCHEME_H_
-#include <qstring.h>
+#include <tqstring.h>
#include "Move.h"
@@ -25,7 +25,7 @@ class KConfig;
class EvalScheme
{
public:
- EvalScheme(QString);
+ EvalScheme(TQString);
EvalScheme(EvalScheme&);
~EvalScheme() {}
@@ -33,17 +33,17 @@ class EvalScheme
void read(KConfig*);
void save(KConfig*);
- static EvalScheme* create(QString);
- QString ascii();
+ static EvalScheme* create(TQString);
+ TQString ascii();
- void setName(QString n) { _name = n; }
+ void setName(TQString n) { _name = n; }
void setRingValue(int ring, int value);
void setRingDiff(int ring, int value);
void setStoneValue(int stoneDiff, int value);
void setMoveValue(int type, int value);
void setInARowValue(int stones, int value);
- QString name() { return _name; }
+ TQString name() { return _name; }
int ringValue(int r) { return (r>=0 && r<5) ? _ringValue[r] : 0; }
int ringDiff(int r) { return (r>0 && r<5) ? _ringDiff[r] : 0; }
int stoneValue(int s) { return (s>0 && s<6) ? _stoneValue[s] : 0; }
@@ -55,7 +55,7 @@ class EvalScheme
int _stoneValue[6], _moveValue[Move::none];
int _inARowValue[InARowCounter::inARowCount];
- QString _name;
+ TQString _name;
};
#endif // _EVALSCHEME_H_
diff --git a/kenolaba/Move.cpp b/kenolaba/Move.cpp
index 40bc3938..27e7b53a 100644
--- a/kenolaba/Move.cpp
+++ b/kenolaba/Move.cpp
@@ -7,14 +7,14 @@
#include <assert.h>
#include <stdio.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include "Move.h"
#include "Board.h"
-const QString nameOfDir(int dir)
+const TQString nameOfDir(int dir)
{
dir = dir % 6;
return
@@ -23,22 +23,22 @@ const QString nameOfDir(int dir)
(dir == 3) ? i18n("LeftDown") :
(dir == 4) ? i18n("Left") :
(dir == 5) ? i18n("LeftUp") :
- (dir == 0) ? i18n("RightUp") : QString("??");
+ (dir == 0) ? i18n("RightUp") : TQString("??");
}
-QString nameOfPos(int p)
+TQString nameOfPos(int p)
{
static char tmp[3];
tmp[0] = 'A' + (p-12)/11;
tmp[1] = '1' + (p-12)%11;
tmp[2] = 0;
- return QString( tmp );
+ return TQString( tmp );
}
-QString Move::name() const
+TQString Move::name() const
{
- QString s,tmp;
+ TQString s,tmp;
/* sideway moves... */
if (type == left3 || type == right3) {
@@ -74,7 +74,7 @@ QString Move::name() const
s+= (type == left2) ? nameOfDir(direction-1): nameOfDir(direction+1);
}
else if (type == none) {
- s = QString("??");
+ s = TQString("??");
}
else {
s = nameOfPos( field );
@@ -82,7 +82,7 @@ QString Move::name() const
s += nameOfDir(direction);
tmp = (type <3 ) ? i18n("Out") :
- (type <6 ) ? i18n("Push") : QString("");
+ (type <6 ) ? i18n("Push") : TQString("");
if (!tmp.isEmpty()) {
s += '/';
s += tmp;
diff --git a/kenolaba/Move.h b/kenolaba/Move.h
index 1226d969..5cde59e2 100644
--- a/kenolaba/Move.h
+++ b/kenolaba/Move.h
@@ -7,7 +7,7 @@
#ifndef _MOVE_H_
#define _MOVE_H_
-#include <qstring.h>
+#include <tqstring.h>
class Move
{
@@ -35,7 +35,7 @@ class Move
static int maxMoveType()
{ return move1; }
- QString name() const;
+ TQString name() const;
void print() const;
diff --git a/kenolaba/Network.cpp b/kenolaba/Network.cpp
index e12f6b5e..0f031e99 100644
--- a/kenolaba/Network.cpp
+++ b/kenolaba/Network.cpp
@@ -61,9 +61,9 @@ Network::Network(int port)
return;
}
- sn = new QSocketNotifier( fd, QSocketNotifier::Read );
- QObject::connect( sn, SIGNAL(activated(int)),
- this, SLOT(gotConnection()) );
+ sn = new TQSocketNotifier( fd, TQSocketNotifier::Read );
+ TQObject::connect( sn, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(gotConnection()) );
}
Network::~Network()
diff --git a/kenolaba/Network.h b/kenolaba/Network.h
index d5251cc6..59861825 100644
--- a/kenolaba/Network.h
+++ b/kenolaba/Network.h
@@ -10,9 +10,9 @@
#include <sys/types.h>
#include <netinet/in.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qsocketnotifier.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqsocketnotifier.h>
class Listener {
public:
@@ -49,10 +49,10 @@ class Network: public QObject
private:
bool sendString(struct sockaddr_in sin, char* str, int len);
- QPtrList<Listener> listeners;
+ TQPtrList<Listener> listeners;
struct sockaddr_in mySin;
int fd, myPort;
- QSocketNotifier *sn;
+ TQSocketNotifier *sn;
};
#endif
diff --git a/kenolaba/Spy.cpp b/kenolaba/Spy.cpp
index 07f17702..b10892cc 100644
--- a/kenolaba/Spy.cpp
+++ b/kenolaba/Spy.cpp
@@ -4,9 +4,9 @@
*/
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kapplication.h>
@@ -19,69 +19,69 @@ Spy::Spy(Board& b)
{
int i;
- top = new QVBoxLayout(this, 5);
+ top = new TQVBoxLayout(this, 5);
- QLabel *l = new QLabel(this);
+ TQLabel *l = new TQLabel(this);
l->setText( i18n("Actual examined position:") );
l->setFixedHeight( l->sizeHint().height() );
l->setAlignment( AlignVCenter | AlignLeft );
top->addWidget( l );
- QHBoxLayout* b1 = new QHBoxLayout();
+ TQHBoxLayout* b1 = new TQHBoxLayout();
top->addLayout( b1, 10 );
for(i=0;i<BoardCount;i++) {
- QVBoxLayout *b2 = new QVBoxLayout();
+ TQVBoxLayout *b2 = new TQVBoxLayout();
b1->addLayout( b2 );
actBoard[i] = new BoardWidget(board,this);
- actLabel[i] = new QLabel(this);
+ actLabel[i] = new TQLabel(this);
actLabel[i]->setText("---");
- // actLabel[i]->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ // actLabel[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
actLabel[i]->setAlignment( AlignHCenter | AlignVCenter);
actLabel[i]->setFixedHeight( actLabel[i]->sizeHint().height() );
b2->addWidget( actBoard[i] );
b2->addWidget( actLabel[i] );
- connect( actBoard[i], SIGNAL(mousePressed()), this, SLOT(nextStep()) );
+ connect( actBoard[i], TQT_SIGNAL(mousePressed()), this, TQT_SLOT(nextStep()) );
}
- l = new QLabel(this);
+ l = new TQLabel(this);
l->setText( i18n("Best move so far:") );
l->setFixedHeight( l->sizeHint().height() );
l->setAlignment( AlignVCenter | AlignLeft );
top->addWidget( l );
- b1 = new QHBoxLayout();
+ b1 = new TQHBoxLayout();
top->addLayout( b1, 10 );
for(i=0;i<BoardCount;i++) {
- QVBoxLayout *b2 = new QVBoxLayout();
+ TQVBoxLayout *b2 = new TQVBoxLayout();
b1->addLayout( b2 );
bestBoard[i] = new BoardWidget(board,this);
- bestLabel[i] = new QLabel(this);
+ bestLabel[i] = new TQLabel(this);
bestLabel[i]->setText("---");
- // bestLabel[i]->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ // bestLabel[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
bestLabel[i]->setAlignment( AlignHCenter | AlignVCenter);
bestLabel[i]->setFixedHeight( bestLabel[i]->sizeHint().height() );
b2->addWidget( bestBoard[i] );
b2->addWidget( bestLabel[i] );
- connect( bestBoard[i], SIGNAL(mousePressed()), this, SLOT(nextStep()) );
+ connect( bestBoard[i], TQT_SIGNAL(mousePressed()), this, TQT_SLOT(nextStep()) );
}
- connect( &board, SIGNAL(update(int,int,Move&,bool)),
- this, SLOT(update(int,int,Move&,bool)) );
- connect( &board, SIGNAL(updateBest(int,int,Move&,bool)),
- this, SLOT(updateBest(int,int,Move&,bool)) );
+ connect( &board, TQT_SIGNAL(update(int,int,Move&,bool)),
+ this, TQT_SLOT(update(int,int,Move&,bool)) );
+ connect( &board, TQT_SIGNAL(updateBest(int,int,Move&,bool)),
+ this, TQT_SLOT(updateBest(int,int,Move&,bool)) );
top->activate();
setCaption(i18n("Spy"));
// KWM::setDecoration(winId(), 2);
resize(500,300);
}
-void Spy::keyPressEvent(QKeyEvent *)
+void Spy::keyPressEvent(TQKeyEvent *)
{
nextStep();
}
@@ -139,7 +139,7 @@ void Spy::updateBest(int depth, int value, Move& m, bool cutoff)
board.playMove(m);
bestBoard[depth+1]->updatePosition(true);
- QString tmp;
+ TQString tmp;
tmp.setNum(value);
if (cutoff) tmp += " (CutOff)";
bestLabel[depth+1]->setText(tmp);
diff --git a/kenolaba/Spy.h b/kenolaba/Spy.h
index f69d99d3..d2a63cbf 100644
--- a/kenolaba/Spy.h
+++ b/kenolaba/Spy.h
@@ -7,7 +7,7 @@
#define _SPY_H_
-#include <qlayout.h>
+#include <tqlayout.h>
#include "Board.h"
@@ -26,7 +26,7 @@ public:
void clearActBoards();
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(TQKeyEvent *e);
public slots:
void update(int,int,Move&,bool);
@@ -36,9 +36,9 @@ public slots:
private:
bool next;
Board &board;
- QBoxLayout *top;
+ TQBoxLayout *top;
BoardWidget *actBoard[BoardCount], *bestBoard[BoardCount];
- QLabel *actLabel[BoardCount], *bestLabel[BoardCount];
+ TQLabel *actLabel[BoardCount], *bestLabel[BoardCount];
};
diff --git a/kenolaba/kenolaba.cpp b/kenolaba/kenolaba.cpp
index e59aa9d7..821fb19e 100644
--- a/kenolaba/kenolaba.cpp
+++ b/kenolaba/kenolaba.cpp
@@ -1,6 +1,6 @@
/* Start point */
-#include <qobject.h>
+#include <tqobject.h>
#include <kapplication.h>
#include <klocale.h>