diff options
Diffstat (limited to 'klines/linesboard.cpp')
-rw-r--r-- | klines/linesboard.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/klines/linesboard.cpp b/klines/linesboard.cpp index 5078b8f9..aefa1a65 100644 --- a/klines/linesboard.cpp +++ b/klines/linesboard.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include <qpainter.h> -#include <qcolor.h> -#include <qcursor.h> -#include <qkeycode.h> -#include <qtooltip.h> +#include <tqpainter.h> +#include <tqcolor.h> +#include <tqcursor.h> +#include <tqkeycode.h> +#include <tqtooltip.h> #include <stdlib.h> #include <kapplication.h> @@ -34,7 +34,7 @@ Constructs a LinesBoard widget. */ -LinesBoard::LinesBoard( BallPainter * abPainter, QWidget* parent, const char* name ) +LinesBoard::LinesBoard( BallPainter * abPainter, TQWidget* parent, const char* name ) : Field( parent, name ) { demoLabel = 0; @@ -57,8 +57,8 @@ LinesBoard::LinesBoard( BallPainter * abPainter, QWidget* parent, const char* na setMouseTracking( FALSE ); setFixedSize(wHint(), hHint()); - timer = new QTimer(this); - connect( timer, SIGNAL(timeout()), SLOT(timerSlot()) ); + timer = new TQTimer(this); + connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerSlot()) ); timer->start( TIMERCLOCK, FALSE ); } @@ -183,19 +183,19 @@ void LinesBoard::setGameOver(bool b) } -void LinesBoard::paintEvent( QPaintEvent* ) +void LinesBoard::paintEvent( TQPaintEvent* ) { - QPainter *paint; + TQPainter *paint; KPixmap *pixmap = 0; if (bGameOver) { pixmap = new KPixmap(); pixmap->resize(width(), height()); - paint = new QPainter( pixmap ); + paint = new TQPainter( pixmap ); } else { - paint = new QPainter( this ); + paint = new TQPainter( this ); } for( int y=0; y < NUMCELLSH; y++ ){ @@ -217,16 +217,16 @@ void LinesBoard::paintEvent( QPaintEvent* ) KPixmapEffect::fade(*pixmap, 0.5, Qt::black); - QPainter p(this); + TQPainter p(this); p.drawPixmap(0,0, *pixmap); delete pixmap; - QFont gameover_font = font(); + TQFont gameover_font = font(); gameover_font.setPointSize(48); gameover_font.setBold(true); p.setFont(gameover_font); p.setPen(Qt::white); - QString gameover_text = i18n("Game Over"); + TQString gameover_text = i18n("Game Over"); p.drawText(0, 0, width(), height(), AlignCenter|Qt::WordBreak, gameover_text); } else @@ -234,12 +234,12 @@ void LinesBoard::paintEvent( QPaintEvent* ) if ((focusX >= 0) && (focusX < NUMCELLSW) && (focusY >= 0) && (focusY < NUMCELLSH)) { - QRect r; + TQRect r; r.setX(focusX*CELLSIZE+2); r.setY(focusY*CELLSIZE+2); r.setWidth(CELLSIZE-4); r.setHeight(CELLSIZE-4); - paint->setPen(QPen(Qt::DotLine)); + paint->setPen(TQPen(Qt::DotLine)); paint->drawRect(r); } } @@ -249,7 +249,7 @@ void LinesBoard::paintEvent( QPaintEvent* ) /* Handles mouse press events for the LinesBoard widget. */ -void LinesBoard::mousePressEvent( QMouseEvent* e ) +void LinesBoard::mousePressEvent( TQMouseEvent* e ) { if (bGameOver) return; if ((level == DEMO_LEVEL) && (!bAllowMove) && e->spontaneous()) return; @@ -701,24 +701,24 @@ void LinesBoard::undo() repaint( FALSE ); } -void LinesBoard::showDemoText(const QString &text) +void LinesBoard::showDemoText(const TQString &text) { if (!demoLabel) { - demoLabel = new QLabel(0, "demoTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); + demoLabel = new TQLabel(0, "demoTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); demoLabel->setMargin(1); demoLabel->setIndent(0); demoLabel->setAutoMask( FALSE ); - demoLabel->setFrameStyle( QFrame::Plain | QFrame::Box ); + demoLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); demoLabel->setLineWidth( 1 ); demoLabel->setAlignment( AlignHCenter | AlignTop ); - demoLabel->setPalette(QToolTip::palette()); + demoLabel->setPalette(TQToolTip::palette()); demoLabel->polish(); } demoLabel->setText(text); demoLabel->adjustSize(); - QSize s = demoLabel->sizeHint(); - QPoint p = QPoint(x() + (width()-s.width())/2, y() + (height()-s.height())/2); + TQSize s = demoLabel->sizeHint(); + TQPoint p = TQPoint(x() + (width()-s.width())/2, y() + (height()-s.height())/2); demoLabel->move(mapToGlobal(p)); demoLabel->show(); } @@ -731,20 +731,20 @@ void LinesBoard::hideDemoText() void LinesBoard::demoClick(int x, int y) { - QPoint lDest = QPoint(x*CELLSIZE+(CELLSIZE/2), y*CELLSIZE+(CELLSIZE/2)); - QPoint dest = mapToGlobal(lDest); - QPoint cur = QCursor::pos(); + TQPoint lDest = TQPoint(x*CELLSIZE+(CELLSIZE/2), y*CELLSIZE+(CELLSIZE/2)); + TQPoint dest = mapToGlobal(lDest); + TQPoint cur = TQCursor::pos(); for(int i = 0; i < 25;) { i++; - QPoint p = cur + i*(dest-cur) / 25; - QCursor::setPos(p); - QApplication::flushX(); - QTimer::singleShot(80, this, SLOT(demoClickStep())); + TQPoint p = cur + i*(dest-cur) / 25; + TQCursor::setPos(p); + TQApplication::flushX(); + TQTimer::singleShot(80, this, TQT_SLOT(demoClickStep())); kapp->enter_loop(); } - QCursor::setPos(dest); - QMouseEvent ev(QEvent::MouseButtonPress, lDest, dest, LeftButton, LeftButton); + TQCursor::setPos(dest); + TQMouseEvent ev(TQEvent::MouseButtonPress, lDest, dest, LeftButton, LeftButton); mousePressEvent(&ev); } |