diff options
Diffstat (limited to 'kenolaba')
-rw-r--r-- | kenolaba/AbTop.cpp | 102 | ||||
-rw-r--r-- | kenolaba/AbTop.h | 3 | ||||
-rw-r--r-- | kenolaba/Ball.cpp | 28 | ||||
-rw-r--r-- | kenolaba/Ball.h | 10 | ||||
-rw-r--r-- | kenolaba/Board.cpp | 10 | ||||
-rw-r--r-- | kenolaba/Board.h | 3 | ||||
-rw-r--r-- | kenolaba/BoardWidget.cpp | 32 | ||||
-rw-r--r-- | kenolaba/BoardWidget.h | 5 | ||||
-rw-r--r-- | kenolaba/EvalDlg.ui | 364 | ||||
-rw-r--r-- | kenolaba/EvalDlgImpl.cpp | 10 | ||||
-rw-r--r-- | kenolaba/EvalDlgImpl.h | 3 | ||||
-rw-r--r-- | kenolaba/EvalScheme.cpp | 20 | ||||
-rw-r--r-- | kenolaba/Network.h | 3 | ||||
-rw-r--r-- | kenolaba/Spy.cpp | 16 | ||||
-rw-r--r-- | kenolaba/Spy.h | 3 |
15 files changed, 310 insertions, 302 deletions
diff --git a/kenolaba/AbTop.cpp b/kenolaba/AbTop.cpp index a6ef7d05..f107408d 100644 --- a/kenolaba/AbTop.cpp +++ b/kenolaba/AbTop.cpp @@ -63,12 +63,12 @@ AbTop::AbTop() timer = new TQTimer; - connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timerDone()) ); + connect( timer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(timerDone()) ); board = new Board(); setMoveNo(0); - connect( board, TQT_SIGNAL(searchBreak()), this, TQT_SLOT(searchBreak()) ); + connect( board, TQT_SIGNAL(searchBreak()), TQT_TQOBJECT(this), TQT_SLOT(searchBreak()) ); Q_CHECK_PTR(board); boardWidget = new BoardWidget(*board,this); @@ -77,7 +77,7 @@ AbTop::AbTop() #endif connect( boardWidget, TQT_SIGNAL(updateSpy(TQString)), - this, TQT_SLOT(updateSpy(TQString)) ); + TQT_TQOBJECT(this), TQT_SLOT(updateSpy(TQString)) ); setCentralWidget(boardWidget); boardWidget->show(); @@ -89,16 +89,16 @@ AbTop::AbTop() // RMB context menu connect( boardWidget, TQT_SIGNAL(rightButtonPressed(int,const TQPoint&)), - this, TQT_SLOT(rightButtonPressed(int,const TQPoint&)) ); + TQT_TQOBJECT(this), TQT_SLOT(rightButtonPressed(int,const TQPoint&)) ); connect( boardWidget, TQT_SIGNAL(edited(int)), - this, TQT_SLOT(edited(int)) ); + TQT_TQOBJECT(this), TQT_SLOT(edited(int)) ); connect( board, TQT_SIGNAL(updateBestMove(Move&,int)), - this, TQT_SLOT(updateBestMove(Move&,int)) ); + TQT_TQOBJECT(this), TQT_SLOT(updateBestMove(Move&,int)) ); connect( boardWidget, TQT_SIGNAL(moveChoosen(Move&)), - this, TQT_SLOT(moveChoosen(Move&)) ); + TQT_TQOBJECT(this), TQT_SLOT(moveChoosen(Move&)) ); /* default */ setLevel(Easy); @@ -107,7 +107,7 @@ AbTop::AbTop() showSpy = false; renderBalls = true; - updateStatus(); + updatetqStatus(); updateActions(); setupGUI(); } @@ -132,61 +132,61 @@ AbTop::~AbTop() void AbTop::setupActions() { - newAction = KStdGameAction::gameNew( this, TQT_SLOT(newGame()), actionCollection() ); - KStdGameAction::quit( this, TQT_SLOT(close()), actionCollection() ); + newAction = KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection() ); + KStdGameAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection() ); - stopAction = new KAction( i18n("&Stop Search"), "stop", Key_S, this, + stopAction = new KAction( i18n("&Stop Search"), "stop", Key_S, TQT_TQOBJECT(this), TQT_SLOT(stopSearch()), actionCollection(), "move_stop"); backAction = new KAction( i18n("Take &Back"), "back", - KStdAccel::shortcut(KStdAccel::Prior), this, + KStdAccel::shortcut(KStdAccel::Prior), TQT_TQOBJECT(this), TQT_SLOT(back()), actionCollection(), "move_back"); forwardAction = new KAction( i18n("&Forward"), "forward", - KStdAccel::shortcut(KStdAccel::Next), this, + KStdAccel::shortcut(KStdAccel::Next), TQT_TQOBJECT(this), TQT_SLOT(forward()), actionCollection(), "move_forward"); - hintAction = KStdGameAction::hint(this, TQT_SLOT(suggestion()), actionCollection()); + hintAction = KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(suggestion()), actionCollection()); - KStdAction::copy( this, TQT_SLOT(copy()), actionCollection()); - pasteAction = KStdAction::paste( this, TQT_SLOT(paste()), actionCollection()); + KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection()); + pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection()); (void) new KAction( i18n("&Restore Position"), KStdAccel::shortcut(KStdAccel::Open), - this, TQT_SLOT(restorePosition()), + TQT_TQOBJECT(this), TQT_SLOT(restorePosition()), actionCollection(), "edit_restore" ); (void) new KAction( i18n("&Save Position"), KStdAccel::shortcut(KStdAccel::Save), - this, TQT_SLOT(savePosition()), + TQT_TQOBJECT(this), TQT_SLOT(savePosition()), actionCollection(), "edit_save" ); KToggleAction *ta; ta = new KToggleAction( i18n("&Network Play"), "network", Key_N, actionCollection(), "game_net"); - connect(ta, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(gameNetwork(bool))); + connect(ta, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(gameNetwork(bool))); editAction = new KToggleAction( i18n("&Modify"), "edit", CTRL+Key_Insert, actionCollection(), "edit_modify"); - connect(editAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( editModify(bool))); + connect(editAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT( editModify(bool))); - showMenubar = KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection()); - KStdAction::saveOptions( this, TQT_SLOT(writeConfig()), actionCollection()); + showMenubar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection()); + KStdAction::saveOptions( TQT_TQOBJECT(this), TQT_SLOT(writeConfig()), actionCollection()); - KStdAction::preferences( this, TQT_SLOT(configure()), actionCollection()); + KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection()); moveSlowAction = new KToggleAction( i18n("&Move Slow"), 0, actionCollection(), "options_moveSlow"); - connect(moveSlowAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionMoveSlow(bool))); + connect(moveSlowAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionMoveSlow(bool))); renderBallsAction = new KToggleAction( i18n("&Render Balls"), 0, actionCollection(), "options_renderBalls"); - connect(renderBallsAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionRenderBalls(bool))); + connect(renderBallsAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionRenderBalls(bool))); showSpyAction = new KToggleAction( i18n("&Spy"), 0, actionCollection(), "options_showSpy"); - connect(showSpyAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionShowSpy(bool))); + connect(showSpyAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionShowSpy(bool))); levelAction = KStdGameAction::chooseGameType(0, 0, actionCollection()); @@ -381,7 +381,7 @@ void AbTop::setupStatusBar() { TQString tmp; - TQString t = i18n("Press %1 for a new game").arg( newAction->shortcut().toString()); + TQString t = i18n("Press %1 for a new game").tqarg( newAction->shortcut().toString()); statusLabel = new TQLabel( t, statusBar(), "statusLabel" ); statusBar()->addWidget(statusLabel,1,false); @@ -391,8 +391,8 @@ void AbTop::setupStatusBar() warningPix = BarIcon( "warning" ); okPix = BarIcon( "ok" ); validLabel = new TQLabel( "", statusBar(), "validLabel" ); - validLabel->setFixedSize( 18, statusLabel->sizeHint().height() ); - validLabel->setAlignment( AlignCenter ); + validLabel->setFixedSize( 18, statusLabel->tqsizeHint().height() ); + validLabel->tqsetAlignment( AlignCenter ); validLabel->hide(); validShown = false; @@ -401,11 +401,11 @@ void AbTop::setupStatusBar() noBall = BarIcon( "noball" ); ballLabel = new TQLabel( "", statusBar(), "ballLabel" ); ballLabel->setPixmap(noBall); - ballLabel->setFixedSize( 18, statusLabel->sizeHint().height() ); - ballLabel->setAlignment( AlignCenter ); + ballLabel->setFixedSize( 18, statusLabel->tqsizeHint().height() ); + ballLabel->tqsetAlignment( AlignCenter ); statusBar()->addWidget(ballLabel, 0, true); - moveLabel = new TQLabel( i18n("Move %1").arg("--"), statusBar(), "moveLabel" ); + moveLabel = new TQLabel( i18n("Move %1").tqarg("--"), statusBar(), "moveLabel" ); statusBar()->addWidget(moveLabel, 0, true); #ifdef MYTRACE @@ -422,7 +422,7 @@ void AbTop::setupStatusBar() spyPopup->insertItem(spy2, 2); spyPopup->insertItem(spy3, 3); connect( spyPopup, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(setSpy(int)) ); + TQT_TQOBJECT(this), TQT_SLOT(setSpy(int)) ); tb->insertButton(spy0, 30, spyPopup, TRUE, i18n("Spy")); } @@ -436,7 +436,7 @@ void AbTop::updateSpy(TQString s) { if (showSpy) { if (s.isEmpty()) { - updateStatus(); + updatetqStatus(); // statusBar()->clear(); } else @@ -458,17 +458,17 @@ void AbTop::updateBestMove(Move& m, int value) } -void AbTop::updateStatus() +void AbTop::updatetqStatus() { TQString tmp; bool showValid = false; if (!editMode && timerState == noGame) { - tmp = i18n("Move %1").arg("--"); + tmp = i18n("Move %1").tqarg("--"); ballLabel->setPixmap(noBall); } else { - tmp = i18n("Move %1").arg(moveNo/2 + 1); + tmp = i18n("Move %1").tqarg(moveNo/2 + 1); ballLabel->setPixmap( (board->actColor() == Board::color1) ? redBall : yellowBall); } @@ -476,15 +476,15 @@ void AbTop::updateStatus() if (editMode) { tmp = TQString("%1: %2 %3 - %4 %5") - .arg( i18n("Edit") ) - .arg( i18n("Red") ).arg(boardWidget->getColor1Count()) - .arg( i18n("Yellow") ).arg(boardWidget->getColor2Count()); + .tqarg( i18n("Edit") ) + .tqarg( i18n("Red") ).tqarg(boardWidget->getColor1Count()) + .tqarg( i18n("Yellow") ).tqarg(boardWidget->getColor2Count()); validLabel->setPixmap( (board->validState() == Board::invalid) ? warningPix:okPix ); showValid = true; } else if (timerState == noGame) { - tmp = i18n("Press %1 for a new game").arg( newAction->shortcut().toString()); + tmp = i18n("Press %1 for a new game").tqarg( newAction->shortcut().toString()); } else { if (timerState == gameOver) { @@ -495,9 +495,9 @@ void AbTop::updateStatus() } else { tmp = TQString("%1 - %2") - .arg( (board->actColor() == Board::color1) ? + .tqarg( (board->actColor() == Board::color1) ? i18n("Red"):i18n("Yellow") ) - .arg( iPlayNow() ? + .tqarg( iPlayNow() ? i18n("I am thinking...") : i18n("It is your turn!") ); } } @@ -514,7 +514,7 @@ void AbTop::updateStatus() validShown = showValid; } statusBar()->clear(); - statusBar()->repaint(); + statusBar()->tqrepaint(); } void AbTop::edited(int vState) @@ -522,7 +522,7 @@ void AbTop::edited(int vState) if (vState == Board::empty) timerState = noGame; - updateStatus(); + updatetqStatus(); } /* only <stop search>, <hint>, <take back> have to be updated */ @@ -662,7 +662,7 @@ void AbTop::playGame() timerState = gameOver; } - updateStatus(); + updatetqStatus(); updateActions(); boardWidget->setCursor(crossCursor); if (stop) return; @@ -733,7 +733,7 @@ void AbTop::newGame() /* Copy ASCII representation into Clipboard */ void AbTop::copy() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setText( board->getASCIIState( moveNo ).ascii() ); } @@ -741,7 +741,7 @@ void AbTop::paste() { if (!pastePossible) return; - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); pastePosition( cb->text().ascii() ); /* don't do this in pastePosition: RECURSION !! */ @@ -801,7 +801,7 @@ void AbTop::gameNetwork(bool on) net->addListener(h2, p); } TQObject::connect(net, TQT_SIGNAL(gotPosition(const char *)), - this, TQT_SLOT(pastePosition(const char *)) ); + TQT_TQOBJECT(this), TQT_SLOT(pastePosition(const char *)) ); } @@ -814,7 +814,7 @@ void AbTop::editModify(bool on) timerState = noGame; updateActions(); - updateStatus(); + updatetqStatus(); if (!editMode && vState == Board::valid) { actMove.type = Move::none; timerState = moveShown; @@ -864,7 +864,7 @@ void AbTop::setMoveNo(int m, bool updateGUI) board->setActColor( ((moveNo%2)==0) ? Board::color1 : Board::color2 ); if (updateGUI) { - updateStatus(); + updatetqStatus(); updateActions(); } } diff --git a/kenolaba/AbTop.h b/kenolaba/AbTop.h index ed7c8fba..049a64a2 100644 --- a/kenolaba/AbTop.h +++ b/kenolaba/AbTop.h @@ -34,6 +34,7 @@ class Spy; class AbTop: public KMainWindow { Q_OBJECT + TQ_OBJECT public: AbTop(); @@ -89,7 +90,7 @@ public slots: private: void setupActions(); - void updateStatus(); + void updatetqStatus(); void userMove(); void playGame(); void loadPixmaps(); diff --git a/kenolaba/Ball.cpp b/kenolaba/Ball.cpp index 525f919b..b0584287 100644 --- a/kenolaba/Ball.cpp +++ b/kenolaba/Ball.cpp @@ -21,14 +21,14 @@ void Ball::setSize(int x, int y) sizeX = x; sizeY = y; - invalidate(); + tqinvalidate(); } -void Ball::invalidate() +void Ball::tqinvalidate() { Ball *b; - /* invalidate all Balls... */ + /* tqinvalidate all Balls... */ for(b=first;b!=0;b=b->next) b->pm.resize(0,0); } @@ -43,7 +43,7 @@ void Ball::setLight(int x, int y, int z, const TQColor& c) lightColor = c; - invalidate(); + tqinvalidate(); } @@ -52,7 +52,7 @@ void Ball::setTexture(double c, double d) rippleCount = c; rippleDepth = d; - invalidate(); + tqinvalidate(); } @@ -155,13 +155,13 @@ void Ball::render() green = .2 * bColor.green() + .8 * ll * green; blue = .2 * bColor.blue() + .8 * ll * blue; - image.setPixel(x,y, qRgb( (int)red, (int)green, (int)blue )); + image.setPixel(x,y, tqRgb( (int)red, (int)green, (int)blue )); } } } const TQImage iMask = image.createHeuristicMask(); TQBitmap bMask; - bMask = iMask; + bMask.convertFromImage(iMask); pm.convertFromImage( image, 0 ); pm.setMask(bMask); } @@ -213,8 +213,8 @@ BallPosition::BallPosition(int xp,int yp, Ball* d) /* Class BallWidget */ -BallWidget::BallWidget( int _freq, int bFr, TQWidget *parent, const char *name ) - : TQWidget(parent,name), positions(MAX_POSITION), animations(MAX_ANIMATION) +BallWidget::BallWidget( int _freq, int bFr, TQWidget *tqparent, const char *name ) + : TQWidget(tqparent,name), positions(MAX_POSITION), animations(MAX_ANIMATION) { int i; @@ -309,12 +309,12 @@ void BallWidget::resizeEvent(TQResizeEvent *) realSize = (w>h) ? h:w; Ball::setSize( realSize/ballFraction, realSize/ballFraction ); - repaint(); + tqrepaint(); } void BallWidget::paintEvent(TQPaintEvent *) { - paint(this); + paint(TQT_TQPAINTDEVICE(this)); } @@ -414,15 +414,15 @@ void BallWidget::animate() timer->start(1000/freq,true); } - // repaint( false ); + // tqrepaint( false ); } /* Ball Test */ -BallTest::BallTest( TQWidget *parent, const char *name ) - : BallWidget(10,2,parent,name) +BallTest::BallTest( TQWidget *tqparent, const char *name ) + : BallWidget(10,2,tqparent,name) { int w,h; diff --git a/kenolaba/Ball.h b/kenolaba/Ball.h index 1fcf1b37..25fd13eb 100644 --- a/kenolaba/Ball.h +++ b/kenolaba/Ball.h @@ -49,7 +49,7 @@ class Ball { private: void render(); - static void invalidate(); + static void tqinvalidate(); //static TQImage back; static int sizeX, sizeY; @@ -94,12 +94,13 @@ class BallPosition { #define MAX_POSITION 130 #define MAX_ANIMATION 20 -class BallWidget : public QWidget +class BallWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - BallWidget(int _freq, int bFr, TQWidget *parent = 0, const char *name = 0); + BallWidget(int _freq, int bFr, TQWidget *tqparent = 0, const char *name = 0); ~BallWidget(); void createBlending(int, int, Ball* , Ball* ); @@ -140,8 +141,9 @@ class BallWidget : public QWidget class BallTest: public BallWidget { Q_OBJECT + TQ_OBJECT public: - BallTest(TQWidget *parent=0, const char *name=0 ); + BallTest(TQWidget *tqparent=0, const char *name=0 ); protected: void mousePressEvent( TQMouseEvent * ); void mouseReleaseEvent( TQMouseEvent * ); diff --git a/kenolaba/Board.cpp b/kenolaba/Board.cpp index d939ad09..119557d2 100644 --- a/kenolaba/Board.cpp +++ b/kenolaba/Board.cpp @@ -1386,13 +1386,13 @@ int Board::setASCIIState(const TQString& state) int color2Count = 0; /* get moveNo if supplied */ - if ((index = state.find("#"))>=0) + if ((index = state.tqfind("#"))>=0) moveNo = state.mid(index+1,3).toInt(); int f=12, row=0, rowEnd = 17; char c = ' '; - index=state.find("/"); + index=state.tqfind("/"); while(index>=0) { @@ -1420,17 +1420,17 @@ int Board::setASCIIState(const TQString& state) if (f == rowEnd) { row++; if (row <4) { - index = state.find("/",index); + index = state.tqfind("/",index); f = 12 + row*11; rowEnd = row*12+17; } else if (row==4) { - index = state.find("|",index); + index = state.tqfind("|",index); f = 56; rowEnd = 65; } else if (row <9) { - index = state.find("\\",index); + index = state.tqfind("\\",index); f = 8 + row*12; rowEnd = 21 + row*11; } diff --git a/kenolaba/Board.h b/kenolaba/Board.h index 81b589d9..b07a9d65 100644 --- a/kenolaba/Board.h +++ b/kenolaba/Board.h @@ -41,9 +41,10 @@ private: }; -class Board : public QObject +class Board : public TQObject { Q_OBJECT + TQ_OBJECT public: Board(); diff --git a/kenolaba/BoardWidget.cpp b/kenolaba/BoardWidget.cpp index da6358c7..af4a103a 100644 --- a/kenolaba/BoardWidget.cpp +++ b/kenolaba/BoardWidget.cpp @@ -34,8 +34,8 @@ #include "bitmaps/Arrow6" #include "bitmaps/Arrow6Mask" -BoardWidget::BoardWidget(Board& b, TQWidget *parent, const char *name) - : BallWidget(10,9,parent, name), board(b) +BoardWidget::BoardWidget(Board& b, TQWidget *tqparent, const char *name) + : BallWidget(10,9,tqparent, name), board(b) { pList =0; gettingMove = false; @@ -164,7 +164,7 @@ void BoardWidget::paintEvent(TQPaintEvent *) { if (renderMode) { pm = boardPM; - BallWidget::paint(&pm); + BallWidget::paint(TQT_TQPAINTDEVICE(&pm)); } else draw(); @@ -237,7 +237,7 @@ void BoardWidget::drawBoard() #ifndef HAVE_KIR TQColorGroup g = TQPalette( *boardColor ).active(); - TQColorGroup g2 = TQWidget::colorGroup(); + TQColorGroup g2 = TQWidget::tqcolorGroup(); int boardSize = width() *10/12; if (boardSize > height()) boardSize = height(); @@ -345,7 +345,7 @@ void BoardWidget::draw() if (renderMode) { updateBalls(); - repaint(false); + tqrepaint(false); return; } @@ -631,7 +631,7 @@ void BoardWidget::choseMove(MoveList *pl) */ int BoardWidget::positionOf(int xx, int yy) { - int boardSize = QMIN( width()*10/12, height() ); + int boardSize = TQMIN( width()*10/12, height() ); int x = (1000 * (xx- (width()-boardSize)/2)) / boardSize; int y = (1000 * (yy- (height()-boardSize)/2)) / boardSize; @@ -834,7 +834,7 @@ void BoardWidget::mousePressEvent( TQMouseEvent* pEvent ) int pos = positionOf( pEvent->x(), pEvent->y() ); int f = fieldOf(pos); - if (pEvent->button() == RightButton) { + if (pEvent->button() == Qt::RightButton) { emit rightButtonPressed(f, pEvent->globalPos()); return; } @@ -846,9 +846,9 @@ void BoardWidget::mousePressEvent( TQMouseEvent* pEvent ) if (editMode) { - editColor = (pEvent->button() == MidButton) ? + editColor = (pEvent->button() == Qt::MidButton) ? Board::color2 : Board::color1; - int newColor = (pEvent->button() == MidButton) ? + int newColor = (pEvent->button() == Qt::MidButton) ? Board::color2bright : Board::color1bright; if (field[f] == Board::free) { @@ -877,7 +877,7 @@ void BoardWidget::mousePressEvent( TQMouseEvent* pEvent ) return; } - startValid = isValidStart(pos, (pEvent->button() == MidButton)); + startValid = isValidStart(pos, (pEvent->button() == Qt::MidButton)); kdDebug(12011) << "Start pos " << pos << " is valid: " << startValid << endl; // actMove.print(); @@ -889,7 +889,7 @@ void BoardWidget::mousePressEvent( TQMouseEvent* pEvent ) TQString tmp; actValue = - board.calcEvaluation(); - tmp = i18n("Board value: %1").arg(actValue); + tmp = i18n("Board value: %1").tqarg(actValue); emit updateSpy(tmp); } @@ -918,7 +918,7 @@ void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent ) if (!startValid) { /* We haven't a valid move yet. Check if we are over a valid start */ - startValid = isValidStart(pos, (pEvent->button() == MidButton)); + startValid = isValidStart(pos, (pEvent->button() == Qt::MidButton)); kdDebug(12011) << "Start pos " << pos << " is valid: " << startValid << endl; // actMove.print(); @@ -930,7 +930,7 @@ void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent ) TQString tmp; actValue = - board.calcEvaluation(); - tmp = i18n("Board value: %1").arg(actValue); + tmp = i18n("Board value: %1").tqarg(actValue); emit updateSpy(tmp); return; } @@ -948,7 +948,7 @@ void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent ) TQString tmp; tmp.sprintf("%+d", v-actValue); - TQString str = TQString("%1 : %2").arg(actMove.name()).arg(tmp); + TQString str = TQString("%1 : %2").tqarg(actMove.name()).tqarg(tmp); emit updateSpy(str); showMove(actMove,3); @@ -961,7 +961,7 @@ void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent ) if (pos == startPos) { showStart(actMove,1); startShown = true; - tmp = i18n("Board value: %1").arg(actValue); + tmp = i18n("Board value: %1").tqarg(actValue); } else draw(); @@ -1019,7 +1019,7 @@ void BoardWidget::mouseReleaseEvent( TQMouseEvent* pEvent ) emit updateSpy(tmp); } -TQSize BoardWidget::sizeHint() const +TQSize BoardWidget::tqsizeHint() const { return TQSize(400, 350); } diff --git a/kenolaba/BoardWidget.h b/kenolaba/BoardWidget.h index f3cfd969..2f123fc9 100644 --- a/kenolaba/BoardWidget.h +++ b/kenolaba/BoardWidget.h @@ -15,9 +15,10 @@ class KIRenderer; class BoardWidget : public BallWidget { Q_OBJECT + TQ_OBJECT public: - BoardWidget(Board&, TQWidget *parent = 0, const char *name = 0); + BoardWidget(Board&, TQWidget *tqparent = 0, const char *name = 0); ~BoardWidget(); void createPos(int , int , int , Ball*); @@ -77,7 +78,7 @@ class BoardWidget : public BallWidget void updateSpy(TQString); void edited(int); protected: - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; private: int positionOf(int x, int y); diff --git a/kenolaba/EvalDlg.ui b/kenolaba/EvalDlg.ui index 06931458..ee649f2a 100644 --- a/kenolaba/EvalDlg.ui +++ b/kenolaba/EvalDlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>EvalDlg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>EvalDlg</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -25,13 +25,13 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>TabWidget2</cstring> </property> - <property name="layoutSpacing" stdset="0"> + <property name="tqlayoutSpacing" stdset="0"> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>moves</cstring> </property> @@ -48,7 +48,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout17</cstring> </property> @@ -62,11 +62,11 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="2"> + <widget class="TQLayoutWidget" row="0" column="2"> <property name="name"> <cstring>Layout35</cstring> </property> - <property name="layoutSpacing" stdset="0"> + <property name="tqlayoutSpacing" stdset="0"> </property> <grid> <property name="name"> @@ -78,7 +78,7 @@ <property name="spacing"> <number>4</number> </property> - <widget class="QLineEdit" row="0" column="5"> + <widget class="TQLineEdit" row="0" column="5"> <property name="name"> <cstring>moveEval1</cstring> </property> @@ -90,19 +90,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="1" column="4"> + <widget class="TQLabel" row="1" column="4"> <property name="name"> <cstring>PixmapLabel3_2</cstring> </property> @@ -113,7 +113,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLineEdit" row="1" column="5"> + <widget class="TQLineEdit" row="1" column="5"> <property name="name"> <cstring>moveEval2</cstring> </property> @@ -125,19 +125,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>PixmapLabel1_2_5</cstring> </property> @@ -148,7 +148,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLineEdit" row="2" column="5"> + <widget class="TQLineEdit" row="2" column="5"> <property name="name"> <cstring>moveEval3</cstring> </property> @@ -160,19 +160,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="2" column="4"> + <widget class="TQLabel" row="2" column="4"> <property name="name"> <cstring>PixmapLabel3_3</cstring> </property> @@ -183,7 +183,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>unnamed</cstring> </property> @@ -194,7 +194,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="3"> + <widget class="TQLabel" row="2" column="3"> <property name="name"> <cstring>PixmapLabel1_2_6</cstring> </property> @@ -205,7 +205,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>PixmapLabel1_2_4</cstring> </property> @@ -216,7 +216,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="4"> + <widget class="TQLabel" row="0" column="4"> <property name="name"> <cstring>PixmapLabel3</cstring> </property> @@ -227,7 +227,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>PixmapLabel1_2</cstring> </property> @@ -238,7 +238,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>PixmapLabel1_3</cstring> </property> @@ -262,14 +262,14 @@ </spacer> </grid> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>TextLabel4_2_2</cstring> </property> <property name="text"> <string>Push Out</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignLeft</set> </property> <property name="vAlign" stdset="0"> @@ -286,24 +286,24 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>TextLabel4_2</cstring> </property> <property name="text"> <string>Push</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignLeft</set> </property> <property name="vAlign" stdset="0"> </property> </widget> - <widget class="QLayoutWidget" row="1" column="2"> + <widget class="TQLayoutWidget" row="1" column="2"> <property name="name"> <cstring>Layout37</cstring> </property> - <property name="layoutSpacing" stdset="0"> + <property name="tqlayoutSpacing" stdset="0"> </property> <grid> <property name="name"> @@ -315,7 +315,7 @@ <property name="spacing"> <number>4</number> </property> - <widget class="QLabel" row="2" column="3"> + <widget class="TQLabel" row="2" column="3"> <property name="name"> <cstring>PixmapLabel1_2_5_2_3</cstring> </property> @@ -326,7 +326,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="6"> + <widget class="TQLabel" row="2" column="6"> <property name="name"> <cstring>PixmapLabel3_3_2_3</cstring> </property> @@ -337,7 +337,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="6"> + <widget class="TQLabel" row="1" column="6"> <property name="name"> <cstring>PixmapLabel3_3_2_2</cstring> </property> @@ -348,7 +348,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLineEdit" row="0" column="7"> + <widget class="TQLineEdit" row="0" column="7"> <property name="name"> <cstring>moveEval4</cstring> </property> @@ -360,19 +360,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="1" column="7"> + <widget class="TQLineEdit" row="1" column="7"> <property name="name"> <cstring>moveEval5</cstring> </property> @@ -384,19 +384,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="2" column="5"> + <widget class="TQLabel" row="2" column="5"> <property name="name"> <cstring>PixmapLabel2_3</cstring> </property> @@ -407,7 +407,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="4"> + <widget class="TQLabel" row="0" column="4"> <property name="name"> <cstring>PixmapLabel1_2_5_2</cstring> </property> @@ -418,7 +418,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="6"> + <widget class="TQLabel" row="0" column="6"> <property name="name"> <cstring>PixmapLabel3_3_2</cstring> </property> @@ -429,7 +429,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="4"> + <widget class="TQLabel" row="2" column="4"> <property name="name"> <cstring>PixmapLabel2_2_2</cstring> </property> @@ -440,7 +440,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>PixmapLabel1_3_2</cstring> </property> @@ -462,7 +462,7 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QLineEdit" row="2" column="7"> + <widget class="TQLineEdit" row="2" column="7"> <property name="name"> <cstring>moveEval6</cstring> </property> @@ -474,19 +474,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>PixmapLabel1_4</cstring> </property> @@ -497,7 +497,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>PixmapLabel1_2_2</cstring> </property> @@ -508,7 +508,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="5"> + <widget class="TQLabel" row="1" column="5"> <property name="name"> <cstring>PixmapLabel2_2</cstring> </property> @@ -519,7 +519,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>PixmapLabel1_4_3</cstring> </property> @@ -530,7 +530,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="4"> + <widget class="TQLabel" row="1" column="4"> <property name="name"> <cstring>PixmapLabel1_2_5_2_2</cstring> </property> @@ -538,7 +538,7 @@ <pixmap>image1</pixmap> </property> </widget> - <widget class="QLabel" row="0" column="5"> + <widget class="TQLabel" row="0" column="5"> <property name="name"> <cstring>PixmapLabel2</cstring> </property> @@ -549,7 +549,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>PixmapLabel1_4_2</cstring> </property> @@ -573,11 +573,11 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QLayoutWidget" row="2" column="2"> + <widget class="TQLayoutWidget" row="2" column="2"> <property name="name"> <cstring>Layout38</cstring> </property> - <property name="layoutSpacing" stdset="0"> + <property name="tqlayoutSpacing" stdset="0"> </property> <grid> <property name="name"> @@ -589,7 +589,7 @@ <property name="spacing"> <number>4</number> </property> - <widget class="QLabel" row="0" column="5"> + <widget class="TQLabel" row="0" column="5"> <property name="name"> <cstring>PixmapLabel2_4</cstring> </property> @@ -600,7 +600,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>PixmapLabel1_3_2_2</cstring> </property> @@ -611,7 +611,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="4"> + <widget class="TQLabel" row="1" column="4"> <property name="name"> <cstring>PixmapLabel1_2_5_2_2_2</cstring> </property> @@ -630,7 +630,7 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QLineEdit" row="0" column="7"> + <widget class="TQLineEdit" row="0" column="7"> <property name="name"> <cstring>moveEval7</cstring> </property> @@ -642,19 +642,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>PixmapLabel1_2_2_2</cstring> </property> @@ -665,7 +665,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="4"> + <widget class="TQLabel" row="2" column="4"> <property name="name"> <cstring>PixmapLabel2_2_2_3</cstring> </property> @@ -676,7 +676,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLineEdit" row="2" column="7"> + <widget class="TQLineEdit" row="2" column="7"> <property name="name"> <cstring>moveEval9</cstring> </property> @@ -688,19 +688,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>PixmapLabel1_4_2_2</cstring> </property> @@ -711,7 +711,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="3"> + <widget class="TQLabel" row="2" column="3"> <property name="name"> <cstring>PixmapLabel1_2_5_2_3_3</cstring> </property> @@ -722,7 +722,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLineEdit" row="1" column="7"> + <widget class="TQLineEdit" row="1" column="7"> <property name="name"> <cstring>moveEval8</cstring> </property> @@ -734,19 +734,19 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>PixmapLabel1_4_3_2</cstring> </property> @@ -757,7 +757,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>PixmapLabel1_4_4</cstring> </property> @@ -768,7 +768,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="4"> + <widget class="TQLabel" row="0" column="4"> <property name="name"> <cstring>PixmapLabel1_2_5_2_4</cstring> </property> @@ -779,7 +779,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="5"> + <widget class="TQLabel" row="2" column="5"> <property name="name"> <cstring>PixmapLabel2_3_3</cstring> </property> @@ -790,7 +790,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="5"> + <widget class="TQLabel" row="1" column="5"> <property name="name"> <cstring>PixmapLabel2_2_3</cstring> </property> @@ -803,14 +803,14 @@ </widget> </grid> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>TextLabel4</cstring> </property> <property name="text"> <string>Normal</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignLeft</set> </property> <property name="vAlign" stdset="0"> @@ -818,11 +818,11 @@ </widget> </grid> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel5</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>20</height> @@ -831,7 +831,7 @@ <property name="text"> <string>For every move possible the given points are added to the Evaluation.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop|AlignLeft</set> </property> <property name="vAlign" stdset="0"> @@ -852,7 +852,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>position</cstring> </property> @@ -869,7 +869,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout63</cstring> </property> @@ -894,7 +894,7 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout62</cstring> </property> @@ -908,7 +908,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel1_2_3_2</cstring> </property> @@ -916,55 +916,55 @@ <string>Inner ring 3:</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>posEval3</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="4" column="1"> + <widget class="TQLineEdit" row="4" column="1"> <property name="name"> <cstring>posEval5</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>posEval2</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -972,55 +972,55 @@ <string>Outermost ring:</string> </property> </widget> - <widget class="QLineEdit" row="1" column="3"> + <widget class="TQLineEdit" row="1" column="3"> <property name="name"> <cstring>diffEval2</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="2" column="3"> + <widget class="TQLineEdit" row="2" column="3"> <property name="name"> <cstring>diffEval3</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>posEval4</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1_2_2</cstring> </property> @@ -1028,39 +1028,39 @@ <string>Middle position:</string> </property> </widget> - <widget class="QLineEdit" row="4" column="3"> + <widget class="TQLineEdit" row="4" column="3"> <property name="name"> <cstring>diffEval5</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>posEval1</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel1_2_3</cstring> </property> @@ -1068,7 +1068,7 @@ <string>Inner ring 2:</string> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>TextLabel3_4</cstring> </property> @@ -1076,7 +1076,7 @@ <string>+/-</string> </property> </widget> - <widget class="QLabel" row="3" column="2"> + <widget class="TQLabel" row="3" column="2"> <property name="name"> <cstring>TextLabel3_3</cstring> </property> @@ -1084,23 +1084,23 @@ <string>+/-</string> </property> </widget> - <widget class="QLineEdit" row="3" column="3"> + <widget class="TQLineEdit" row="3" column="3"> <property name="name"> <cstring>diffEval4</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="4" column="2"> + <widget class="TQLabel" row="4" column="2"> <property name="name"> <cstring>TextLabel3_2</cstring> </property> @@ -1108,7 +1108,7 @@ <string>+/-</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1_2_2_2</cstring> </property> @@ -1116,7 +1116,7 @@ <string>Innermost ring:</string> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -1139,14 +1139,14 @@ </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel6</cstring> </property> <property name="text"> <string>For every ball, the given points are added to the evaluation depending on the balls position. The bonus for a given position is changed randomly in the +/- range.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop|AlignLeft</set> </property> <property name="vAlign" stdset="0"> @@ -1167,7 +1167,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>inarow</cstring> </property> @@ -1184,7 +1184,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout64</cstring> </property> @@ -1209,7 +1209,7 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout42</cstring> </property> @@ -1223,71 +1223,71 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>rowEval3</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>rowEval2</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>rowEval5</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>rowEval4</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3_2</cstring> </property> @@ -1295,7 +1295,7 @@ <string>Three in-a-row:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3</cstring> </property> @@ -1303,7 +1303,7 @@ <string>Two in-a-row:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3_3</cstring> </property> @@ -1311,7 +1311,7 @@ <string>Four in-a-row:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3_4</cstring> </property> @@ -1334,14 +1334,14 @@ </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel6_2</cstring> </property> <property name="text"> <string>For a number of balls In-a-Row, the given points are added to the evaluation</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop|AlignLeft</set> </property> <property name="vAlign" stdset="0"> @@ -1362,7 +1362,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>count</cstring> </property> @@ -1379,7 +1379,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout66</cstring> </property> @@ -1404,7 +1404,7 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout65</cstring> </property> @@ -1418,23 +1418,23 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>countEval2</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>40</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3_4_2</cstring> </property> @@ -1442,39 +1442,39 @@ <string>4 Balls more:</string> </property> </widget> - <widget class="QLineEdit" row="4" column="1"> + <widget class="TQLineEdit" row="4" column="1"> <property name="name"> <cstring>countEval5</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>40</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>countEval4</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>40</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3_3_2</cstring> </property> @@ -1482,7 +1482,7 @@ <string>3 Balls more:</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3_4_2_2</cstring> </property> @@ -1490,23 +1490,23 @@ <string>5 Balls more:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>countEval1</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>40</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3_2_2</cstring> </property> @@ -1514,23 +1514,23 @@ <string>2 Balls more:</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>countEval3</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>40</width> <height>32767</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignLeft</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1_2_2_3_5</cstring> </property> @@ -1553,14 +1553,14 @@ </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel6_2_2</cstring> </property> <property name="text"> <string>For a difference in the number of balls, the given points are added to the evaluation. A difference of 6 only can be a lost/won game.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop|AlignLeft</set> </property> <property name="vAlign" stdset="0"> @@ -1581,7 +1581,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -1598,12 +1598,12 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>evalList</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout13</cstring> </property> @@ -1617,7 +1617,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>evalSaveAs</cstring> </property> @@ -1625,7 +1625,7 @@ <string>Save As...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>evalDelete</cstring> </property> @@ -1635,14 +1635,14 @@ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> <property name="text"> <string>Your evaluation scheme, defined in all other tabs of this dialog, can be stored here.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop|AlignLeft</set> </property> <property name="vAlign" stdset="0"> @@ -1653,7 +1653,7 @@ </vbox> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout13</cstring> </property> @@ -1678,7 +1678,7 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel9</cstring> </property> @@ -1686,7 +1686,7 @@ <string>Evaluation of actual position:</string> </property> </widget> - <widget class="QLCDNumber"> + <widget class="TQLCDNumber"> <property name="name"> <cstring>actualEval</cstring> </property> @@ -1756,5 +1756,5 @@ <includes> <include location="global" impldecl="in declaration">kseparator.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kenolaba/EvalDlgImpl.cpp b/kenolaba/EvalDlgImpl.cpp index 70662629..e0ab3006 100644 --- a/kenolaba/EvalDlgImpl.cpp +++ b/kenolaba/EvalDlgImpl.cpp @@ -19,8 +19,8 @@ #include "Board.h" #include "EvalScheme.h" -EvalDlgImpl::EvalDlgImpl(TQWidget* parent, Board* board) - :EvalDlg(parent) +EvalDlgImpl::EvalDlgImpl(TQWidget* tqparent, Board* board) + :EvalDlg(tqparent) { _board = board; _origScheme = board->evalScheme(); @@ -246,7 +246,7 @@ void EvalDlgImpl::deleteEntry() void EvalDlgImpl::saveas() { - KLineEditDlg dlg(i18n("Name for scheme:"), TQString::null, this); + KLineEditDlg dlg(i18n("Name for scheme:"), TQString(), this); dlg.setCaption(i18n("Save Scheme")); if (dlg.exec()) { @@ -254,10 +254,10 @@ void EvalDlgImpl::saveas() KConfig* config = kapp->config(); config->setGroup("General"); TQStringList list = config->readListEntry("EvalSchemes"); - TQListBoxItem *it = evalList->findItem(name); + TQListBoxItem *it = evalList->tqfindItem(name); if (!it) { evalList->insertItem(name); - it = evalList->findItem(name); + it = evalList->tqfindItem(name); list << name; config->writeEntry("EvalSchemes", list); } diff --git a/kenolaba/EvalDlgImpl.h b/kenolaba/EvalDlgImpl.h index e7e4cb0d..07cb57a9 100644 --- a/kenolaba/EvalDlgImpl.h +++ b/kenolaba/EvalDlgImpl.h @@ -14,9 +14,10 @@ class Board; class EvalDlgImpl: public EvalDlg { Q_OBJECT + TQ_OBJECT public: - EvalDlgImpl(TQWidget* parent, Board* board); + EvalDlgImpl(TQWidget* tqparent, Board* board); ~EvalDlgImpl(); EvalScheme* evalScheme() { return _scheme; } diff --git a/kenolaba/EvalScheme.cpp b/kenolaba/EvalScheme.cpp index d884f398..063ca5f2 100644 --- a/kenolaba/EvalScheme.cpp +++ b/kenolaba/EvalScheme.cpp @@ -76,7 +76,7 @@ void EvalScheme::setDefaults() void EvalScheme::read(KConfig *config) { - TQString confSection = TQString("%1 Evaluation Scheme").arg(_name); + TQString confSection = TQString("%1 Evaluation Scheme").tqarg(_name); config->setGroup(confSection); TQStringList list; @@ -117,7 +117,7 @@ void EvalScheme::read(KConfig *config) void EvalScheme::save(KConfig* config) { - TQString confSection = TQString("%1 Evaluation Scheme").arg(_name); + TQString confSection = TQString("%1 Evaluation Scheme").tqarg(_name); config->setGroup(confSection); TQString entry; @@ -128,12 +128,12 @@ void EvalScheme::save(KConfig* config) entry.sprintf("%d", _moveValue[0]); for(int i=1;i<Move::typeCount;i++) - entry += TQString(", %1").arg( _moveValue[i] ); + entry += TQString(", %1").tqarg( _moveValue[i] ); config->writeEntry("MoveValues", entry); entry.sprintf("%d", _inARowValue[0]); for(int i=1;i<InARowCounter::inARowCount;i++) - entry += TQString(", %1").arg( _inARowValue[i] ); + entry += TQString(", %1").tqarg( _inARowValue[i] ); config->writeEntry("InARowValues", entry); entry.sprintf("%d,%d,%d,%d,%d", _ringValue[0], _ringValue[1], @@ -184,7 +184,7 @@ void EvalScheme::setInARowValue(int stones, int value) EvalScheme* EvalScheme::create(TQString scheme) { - int pos = scheme.find('='); + int pos = scheme.tqfind('='); if (pos<0) return 0; EvalScheme* evalScheme = new EvalScheme( scheme.left(pos) ); @@ -217,15 +217,15 @@ TQString EvalScheme::ascii() res.sprintf("%s=%d", _name.ascii(), _stoneValue[1]); for(i=1;i<6;i++) - res += TQString(",%1").arg( _stoneValue[i] ); + res += TQString(",%1").tqarg( _stoneValue[i] ); for(i=0;i<Move::typeCount;i++) - res += TQString(",%1").arg( _moveValue[i] ); + res += TQString(",%1").tqarg( _moveValue[i] ); for(i=0;i<InARowCounter::inARowCount;i++) - res += TQString(",%1").arg( _inARowValue[i] ); + res += TQString(",%1").tqarg( _inARowValue[i] ); for(i=0;i<5;i++) - res += TQString(",%1").arg( _ringValue[i] ); + res += TQString(",%1").tqarg( _ringValue[i] ); for(i=0;i<5;i++) - res += TQString(",%1").arg( _ringDiff[i] ); + res += TQString(",%1").tqarg( _ringDiff[i] ); return res; } diff --git a/kenolaba/Network.h b/kenolaba/Network.h index 59861825..097264cd 100644 --- a/kenolaba/Network.h +++ b/kenolaba/Network.h @@ -25,9 +25,10 @@ class Listener { }; -class Network: public QObject +class Network: public TQObject { Q_OBJECT + TQ_OBJECT public: enum { defaultPort = 23412 }; diff --git a/kenolaba/Spy.cpp b/kenolaba/Spy.cpp index b10892cc..e9abc41e 100644 --- a/kenolaba/Spy.cpp +++ b/kenolaba/Spy.cpp @@ -23,8 +23,8 @@ Spy::Spy(Board& b) TQLabel *l = new TQLabel(this); l->setText( i18n("Actual examined position:") ); - l->setFixedHeight( l->sizeHint().height() ); - l->setAlignment( AlignVCenter | AlignLeft ); + l->setFixedHeight( l->tqsizeHint().height() ); + l->tqsetAlignment( AlignVCenter | AlignLeft ); top->addWidget( l ); TQHBoxLayout* b1 = new TQHBoxLayout(); @@ -38,8 +38,8 @@ Spy::Spy(Board& b) actLabel[i] = new TQLabel(this); actLabel[i]->setText("---"); // actLabel[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - actLabel[i]->setAlignment( AlignHCenter | AlignVCenter); - actLabel[i]->setFixedHeight( actLabel[i]->sizeHint().height() ); + actLabel[i]->tqsetAlignment( AlignHCenter | AlignVCenter); + actLabel[i]->setFixedHeight( actLabel[i]->tqsizeHint().height() ); b2->addWidget( actBoard[i] ); b2->addWidget( actLabel[i] ); @@ -48,8 +48,8 @@ Spy::Spy(Board& b) l = new TQLabel(this); l->setText( i18n("Best move so far:") ); - l->setFixedHeight( l->sizeHint().height() ); - l->setAlignment( AlignVCenter | AlignLeft ); + l->setFixedHeight( l->tqsizeHint().height() ); + l->tqsetAlignment( AlignVCenter | AlignLeft ); top->addWidget( l ); b1 = new TQHBoxLayout(); @@ -63,8 +63,8 @@ Spy::Spy(Board& b) bestLabel[i] = new TQLabel(this); bestLabel[i]->setText("---"); // bestLabel[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - bestLabel[i]->setAlignment( AlignHCenter | AlignVCenter); - bestLabel[i]->setFixedHeight( bestLabel[i]->sizeHint().height() ); + bestLabel[i]->tqsetAlignment( AlignHCenter | AlignVCenter); + bestLabel[i]->setFixedHeight( bestLabel[i]->tqsizeHint().height() ); b2->addWidget( bestBoard[i] ); b2->addWidget( bestLabel[i] ); diff --git a/kenolaba/Spy.h b/kenolaba/Spy.h index cbb03ad8..719b8d4f 100644 --- a/kenolaba/Spy.h +++ b/kenolaba/Spy.h @@ -14,9 +14,10 @@ class BoardWidget; class TQLabel; -class Spy: public QWidget +class Spy: public TQWidget { Q_OBJECT + TQ_OBJECT public: Spy(Board&); |