From 97d1732e257f8700488d7ca1660ae7eba8fc6065 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:47:36 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kenolaba/AbTop.cpp | 50 +++++++++---------- kenolaba/AbTop.h | 2 +- kenolaba/Ball.cpp | 14 +++--- kenolaba/Ball.h | 2 +- kenolaba/BoardWidget.cpp | 14 +++--- kenolaba/BoardWidget.h | 2 +- kenolaba/EvalDlg.ui | 126 +++++++++++++++++++++++------------------------ kenolaba/EvalScheme.cpp | 18 +++---- kenolaba/Spy.cpp | 18 +++---- kenolaba/Spy.h | 2 +- 10 files changed, 124 insertions(+), 124 deletions(-) (limited to 'kenolaba') diff --git a/kenolaba/AbTop.cpp b/kenolaba/AbTop.cpp index f107408d..a7dc9a7e 100644 --- a/kenolaba/AbTop.cpp +++ b/kenolaba/AbTop.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include @@ -107,7 +107,7 @@ AbTop::AbTop() showSpy = false; renderBalls = true; - updatetqStatus(); + updateStatus(); updateActions(); setupGUI(); } @@ -381,7 +381,7 @@ void AbTop::setupStatusBar() { TQString tmp; - TQString t = i18n("Press %1 for a new game").tqarg( newAction->shortcut().toString()); + TQString t = i18n("Press %1 for a new game").arg( 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->tqsizeHint().height() ); - validLabel->tqsetAlignment( AlignCenter ); + validLabel->setFixedSize( 18, statusLabel->sizeHint().height() ); + validLabel->setAlignment( 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->tqsizeHint().height() ); - ballLabel->tqsetAlignment( AlignCenter ); + ballLabel->setFixedSize( 18, statusLabel->sizeHint().height() ); + ballLabel->setAlignment( AlignCenter ); statusBar()->addWidget(ballLabel, 0, true); - moveLabel = new TQLabel( i18n("Move %1").tqarg("--"), statusBar(), "moveLabel" ); + moveLabel = new TQLabel( i18n("Move %1").arg("--"), statusBar(), "moveLabel" ); statusBar()->addWidget(moveLabel, 0, true); #ifdef MYTRACE @@ -436,7 +436,7 @@ void AbTop::updateSpy(TQString s) { if (showSpy) { if (s.isEmpty()) { - updatetqStatus(); + updateStatus(); // statusBar()->clear(); } else @@ -458,17 +458,17 @@ void AbTop::updateBestMove(Move& m, int value) } -void AbTop::updatetqStatus() +void AbTop::updateStatus() { TQString tmp; bool showValid = false; if (!editMode && timerState == noGame) { - tmp = i18n("Move %1").tqarg("--"); + tmp = i18n("Move %1").arg("--"); ballLabel->setPixmap(noBall); } else { - tmp = i18n("Move %1").tqarg(moveNo/2 + 1); + tmp = i18n("Move %1").arg(moveNo/2 + 1); ballLabel->setPixmap( (board->actColor() == Board::color1) ? redBall : yellowBall); } @@ -476,15 +476,15 @@ void AbTop::updatetqStatus() if (editMode) { tmp = TQString("%1: %2 %3 - %4 %5") - .tqarg( i18n("Edit") ) - .tqarg( i18n("Red") ).tqarg(boardWidget->getColor1Count()) - .tqarg( i18n("Yellow") ).tqarg(boardWidget->getColor2Count()); + .arg( i18n("Edit") ) + .arg( i18n("Red") ).arg(boardWidget->getColor1Count()) + .arg( i18n("Yellow") ).arg(boardWidget->getColor2Count()); validLabel->setPixmap( (board->validState() == Board::invalid) ? warningPix:okPix ); showValid = true; } else if (timerState == noGame) { - tmp = i18n("Press %1 for a new game").tqarg( newAction->shortcut().toString()); + tmp = i18n("Press %1 for a new game").arg( newAction->shortcut().toString()); } else { if (timerState == gameOver) { @@ -495,9 +495,9 @@ void AbTop::updatetqStatus() } else { tmp = TQString("%1 - %2") - .tqarg( (board->actColor() == Board::color1) ? + .arg( (board->actColor() == Board::color1) ? i18n("Red"):i18n("Yellow") ) - .tqarg( iPlayNow() ? + .arg( iPlayNow() ? i18n("I am thinking...") : i18n("It is your turn!") ); } } @@ -514,7 +514,7 @@ void AbTop::updatetqStatus() validShown = showValid; } statusBar()->clear(); - statusBar()->tqrepaint(); + statusBar()->repaint(); } void AbTop::edited(int vState) @@ -522,7 +522,7 @@ void AbTop::edited(int vState) if (vState == Board::empty) timerState = noGame; - updatetqStatus(); + updateStatus(); } /* only , , have to be updated */ @@ -662,7 +662,7 @@ void AbTop::playGame() timerState = gameOver; } - updatetqStatus(); + updateStatus(); updateActions(); boardWidget->setCursor(crossCursor); if (stop) return; @@ -733,7 +733,7 @@ void AbTop::newGame() /* Copy ASCII representation into Clipboard */ void AbTop::copy() { - TQClipboard *cb = TQApplication::tqclipboard(); + TQClipboard *cb = TQApplication::clipboard(); cb->setText( board->getASCIIState( moveNo ).ascii() ); } @@ -741,7 +741,7 @@ void AbTop::paste() { if (!pastePossible) return; - TQClipboard *cb = TQApplication::tqclipboard(); + TQClipboard *cb = TQApplication::clipboard(); pastePosition( cb->text().ascii() ); /* don't do this in pastePosition: RECURSION !! */ @@ -814,7 +814,7 @@ void AbTop::editModify(bool on) timerState = noGame; updateActions(); - updatetqStatus(); + updateStatus(); 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) { - updatetqStatus(); + updateStatus(); updateActions(); } } diff --git a/kenolaba/AbTop.h b/kenolaba/AbTop.h index 049a64a2..ffa9da3b 100644 --- a/kenolaba/AbTop.h +++ b/kenolaba/AbTop.h @@ -90,7 +90,7 @@ public slots: private: void setupActions(); - void updatetqStatus(); + void updateStatus(); void userMove(); void playGame(); void loadPixmaps(); diff --git a/kenolaba/Ball.cpp b/kenolaba/Ball.cpp index 39448305..392a61c5 100644 --- a/kenolaba/Ball.cpp +++ b/kenolaba/Ball.cpp @@ -21,14 +21,14 @@ void Ball::setSize(int x, int y) sizeX = x; sizeY = y; - tqinvalidate(); + invalidate(); } -void Ball::tqinvalidate() +void Ball::invalidate() { Ball *b; - /* tqinvalidate all Balls... */ + /* invalidate 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; - tqinvalidate(); + invalidate(); } @@ -52,7 +52,7 @@ void Ball::setTexture(double c, double d) rippleCount = c; rippleDepth = d; - tqinvalidate(); + invalidate(); } @@ -309,7 +309,7 @@ void BallWidget::resizeEvent(TQResizeEvent *) realSize = (w>h) ? h:w; Ball::setSize( realSize/ballFraction, realSize/ballFraction ); - tqrepaint(); + repaint(); } void BallWidget::paintEvent(TQPaintEvent *) @@ -414,7 +414,7 @@ void BallWidget::animate() timer->start(1000/freq,true); } - // tqrepaint( false ); + // repaint( false ); } diff --git a/kenolaba/Ball.h b/kenolaba/Ball.h index 9cdfe344..6558a600 100644 --- a/kenolaba/Ball.h +++ b/kenolaba/Ball.h @@ -49,7 +49,7 @@ class Ball { private: void render(); - static void tqinvalidate(); + static void invalidate(); //static TQImage back; static int sizeX, sizeY; diff --git a/kenolaba/BoardWidget.cpp b/kenolaba/BoardWidget.cpp index 9462b8d5..744ccb16 100644 --- a/kenolaba/BoardWidget.cpp +++ b/kenolaba/BoardWidget.cpp @@ -237,7 +237,7 @@ void BoardWidget::drawBoard() #ifndef HAVE_KIR TQColorGroup g = TQPalette( *boardColor ).active(); - TQColorGroup g2 = TQWidget::tqcolorGroup(); + TQColorGroup g2 = TQWidget::colorGroup(); int boardSize = width() *10/12; if (boardSize > height()) boardSize = height(); @@ -345,7 +345,7 @@ void BoardWidget::draw() if (renderMode) { updateBalls(); - tqrepaint(false); + repaint(false); return; } @@ -889,7 +889,7 @@ void BoardWidget::mousePressEvent( TQMouseEvent* pEvent ) TQString tmp; actValue = - board.calcEvaluation(); - tmp = i18n("Board value: %1").tqarg(actValue); + tmp = i18n("Board value: %1").arg(actValue); emit updateSpy(tmp); } @@ -930,7 +930,7 @@ void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent ) TQString tmp; actValue = - board.calcEvaluation(); - tmp = i18n("Board value: %1").tqarg(actValue); + tmp = i18n("Board value: %1").arg(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").tqarg(actMove.name()).tqarg(tmp); + TQString str = TQString("%1 : %2").arg(actMove.name()).arg(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").tqarg(actValue); + tmp = i18n("Board value: %1").arg(actValue); } else draw(); @@ -1019,7 +1019,7 @@ void BoardWidget::mouseReleaseEvent( TQMouseEvent* pEvent ) emit updateSpy(tmp); } -TQSize BoardWidget::tqsizeHint() const +TQSize BoardWidget::sizeHint() const { return TQSize(400, 350); } diff --git a/kenolaba/BoardWidget.h b/kenolaba/BoardWidget.h index bc323aa8..7052f7c4 100644 --- a/kenolaba/BoardWidget.h +++ b/kenolaba/BoardWidget.h @@ -78,7 +78,7 @@ class BoardWidget : public BallWidget void updateSpy(TQString); void edited(int); protected: - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; private: int positionOf(int x, int y); diff --git a/kenolaba/EvalDlg.ui b/kenolaba/EvalDlg.ui index c1fb6411..a98354d4 100644 --- a/kenolaba/EvalDlg.ui +++ b/kenolaba/EvalDlg.ui @@ -90,13 +90,13 @@ 0 - + 30 32767 - + AlignLeft @@ -125,13 +125,13 @@ 0 - + 30 32767 - + AlignLeft @@ -160,13 +160,13 @@ 0 - + 30 32767 - + AlignLeft @@ -269,7 +269,7 @@ Push Out - + AlignTop|AlignLeft @@ -293,7 +293,7 @@ Push - + AlignTop|AlignLeft @@ -360,13 +360,13 @@ 0 - + 30 32767 - + AlignLeft @@ -384,13 +384,13 @@ 0 - + 30 32767 - + AlignLeft @@ -474,13 +474,13 @@ 0 - + 30 32767 - + AlignLeft @@ -642,13 +642,13 @@ 0 - + 30 32767 - + AlignLeft @@ -688,13 +688,13 @@ 0 - + 30 32767 - + AlignLeft @@ -734,13 +734,13 @@ 0 - + 30 32767 - + AlignLeft @@ -810,7 +810,7 @@ Normal - + AlignTop|AlignLeft @@ -822,7 +822,7 @@ TextLabel5 - + 0 20 @@ -831,7 +831,7 @@ For every move possible the given points are added to the Evaluation. - + WordBreak|AlignTop|AlignLeft @@ -920,13 +920,13 @@ posEval3 - + 30 32767 - + AlignLeft @@ -936,13 +936,13 @@ posEval5 - + 30 32767 - + AlignLeft @@ -952,13 +952,13 @@ posEval2 - + 30 32767 - + AlignLeft @@ -976,13 +976,13 @@ diffEval2 - + 30 32767 - + AlignLeft @@ -992,13 +992,13 @@ diffEval3 - + 30 32767 - + AlignLeft @@ -1008,13 +1008,13 @@ posEval4 - + 30 32767 - + AlignLeft @@ -1032,13 +1032,13 @@ diffEval5 - + 30 32767 - + AlignLeft @@ -1048,13 +1048,13 @@ posEval1 - + 30 32767 - + AlignLeft @@ -1088,13 +1088,13 @@ diffEval4 - + 30 32767 - + AlignLeft @@ -1146,7 +1146,7 @@ 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. - + WordBreak|AlignTop|AlignLeft @@ -1227,13 +1227,13 @@ rowEval3 - + 30 32767 - + AlignLeft @@ -1243,13 +1243,13 @@ rowEval2 - + 30 32767 - + AlignLeft @@ -1259,13 +1259,13 @@ rowEval5 - + 30 32767 - + AlignLeft @@ -1275,13 +1275,13 @@ rowEval4 - + 30 32767 - + AlignLeft @@ -1341,7 +1341,7 @@ For a number of balls In-a-Row, the given points are added to the evaluation - + WordBreak|AlignTop|AlignLeft @@ -1422,13 +1422,13 @@ countEval2 - + 40 32767 - + AlignLeft @@ -1446,13 +1446,13 @@ countEval5 - + 40 32767 - + AlignLeft @@ -1462,13 +1462,13 @@ countEval4 - + 40 32767 - + AlignLeft @@ -1494,13 +1494,13 @@ countEval1 - + 40 32767 - + AlignLeft @@ -1518,13 +1518,13 @@ countEval3 - + 40 32767 - + AlignLeft @@ -1560,7 +1560,7 @@ 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. - + WordBreak|AlignTop|AlignLeft @@ -1642,7 +1642,7 @@ Your evaluation scheme, defined in all other tabs of this dialog, can be stored here. - + WordBreak|AlignTop|AlignLeft diff --git a/kenolaba/EvalScheme.cpp b/kenolaba/EvalScheme.cpp index 0d179a85..d884f398 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").tqarg(_name); + TQString confSection = TQString("%1 Evaluation Scheme").arg(_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").tqarg(_name); + TQString confSection = TQString("%1 Evaluation Scheme").arg(_name); config->setGroup(confSection); TQString entry; @@ -128,12 +128,12 @@ void EvalScheme::save(KConfig* config) entry.sprintf("%d", _moveValue[0]); for(int i=1;iwriteEntry("MoveValues", entry); entry.sprintf("%d", _inARowValue[0]); for(int i=1;iwriteEntry("InARowValues", entry); entry.sprintf("%d,%d,%d,%d,%d", _ringValue[0], _ringValue[1], @@ -217,15 +217,15 @@ TQString EvalScheme::ascii() res.sprintf("%s=%d", _name.ascii(), _stoneValue[1]); for(i=1;i<6;i++) - res += TQString(",%1").tqarg( _stoneValue[i] ); + res += TQString(",%1").arg( _stoneValue[i] ); for(i=0;i -#include +#include #include #include @@ -23,8 +23,8 @@ Spy::Spy(Board& b) TQLabel *l = new TQLabel(this); l->setText( i18n("Actual examined position:") ); - l->setFixedHeight( l->tqsizeHint().height() ); - l->tqsetAlignment( AlignVCenter | AlignLeft ); + l->setFixedHeight( l->sizeHint().height() ); + l->setAlignment( 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]->tqsetAlignment( AlignHCenter | AlignVCenter); - actLabel[i]->setFixedHeight( actLabel[i]->tqsizeHint().height() ); + actLabel[i]->setAlignment( AlignHCenter | AlignVCenter); + actLabel[i]->setFixedHeight( actLabel[i]->sizeHint().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->tqsizeHint().height() ); - l->tqsetAlignment( AlignVCenter | AlignLeft ); + l->setFixedHeight( l->sizeHint().height() ); + l->setAlignment( 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]->tqsetAlignment( AlignHCenter | AlignVCenter); - bestLabel[i]->setFixedHeight( bestLabel[i]->tqsizeHint().height() ); + bestLabel[i]->setAlignment( AlignHCenter | AlignVCenter); + bestLabel[i]->setFixedHeight( bestLabel[i]->sizeHint().height() ); b2->addWidget( bestBoard[i] ); b2->addWidget( bestLabel[i] ); diff --git a/kenolaba/Spy.h b/kenolaba/Spy.h index 719b8d4f..e66fd5eb 100644 --- a/kenolaba/Spy.h +++ b/kenolaba/Spy.h @@ -7,7 +7,7 @@ #define _SPY_H_ -#include +#include #include "Board.h" -- cgit v1.2.3