diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /kenolaba/Spy.cpp | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-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/Spy.cpp')
-rw-r--r-- | kenolaba/Spy.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
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); |