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 /klines | |
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 'klines')
-rw-r--r-- | klines/ballpainter.cpp | 28 | ||||
-rw-r--r-- | klines/ballpainter.h | 16 | ||||
-rw-r--r-- | klines/field.cpp | 4 | ||||
-rw-r--r-- | klines/field.h | 6 | ||||
-rw-r--r-- | klines/klines.cpp | 56 | ||||
-rw-r--r-- | klines/klines.h | 10 | ||||
-rw-r--r-- | klines/linesboard.cpp | 66 | ||||
-rw-r--r-- | klines/linesboard.h | 20 | ||||
-rw-r--r-- | klines/mwidget.cpp | 16 | ||||
-rw-r--r-- | klines/mwidget.h | 10 | ||||
-rw-r--r-- | klines/prompt.cpp | 12 | ||||
-rw-r--r-- | klines/prompt.h | 8 |
12 files changed, 126 insertions, 126 deletions
diff --git a/klines/ballpainter.cpp b/klines/ballpainter.cpp index 06380a6f..76156f11 100644 --- a/klines/ballpainter.cpp +++ b/klines/ballpainter.cpp @@ -17,10 +17,10 @@ #include <kapplication.h> #include <kmessagebox.h> //#include "shotcounter.h" -#include <qpainter.h> +#include <tqpainter.h> #include "linesboard.h" -//#include <qcolor.h> -#include <qjpegio.h> +//#include <tqcolor.h> +#include <tqjpegio.h> #include <kstandarddirs.h> #include <klocale.h> #include <stdlib.h> @@ -37,7 +37,7 @@ int colorLinesArr[NCOLORS] = BallPainter::BallPainter() - : QObject(), backgroundPix(0) + : TQObject(), backgroundPix(0) { createPix(); } @@ -59,11 +59,11 @@ void BallPainter::deletePix() void BallPainter::createPix() { - backgroundPix = new QPixmap( + backgroundPix = new TQPixmap( locate( "appdata", "field.jpg" )); - QPixmap *balls = new QPixmap( + TQPixmap *balls = new TQPixmap( locate( "appdata", "balls.jpg" )); - QPixmap *fire = new QPixmap( + TQPixmap *fire = new TQPixmap( locate( "appdata", "fire.jpg" )); if (balls->isNull() ||backgroundPix->isNull() || fire->isNull() ) { KMessageBox::error(0, i18n("Unable to find graphics. Check your installation."), i18n("Error")); @@ -75,8 +75,8 @@ void BallPainter::createPix() { for(int t=0; t<PIXTIME + FIREBALLS + BOOMBALLS + 1 ; t++) { - imgCash[c][t] = new QPixmap(CELLSIZE, CELLSIZE); - QPainter p(imgCash[c][t]); + imgCash[c][t] = new TQPixmap(CELLSIZE, CELLSIZE); + TQPainter p(imgCash[c][t]); p.drawPixmap(0,0,(*backgroundPix),0,0,CELLSIZE,CELLSIZE); p.drawPixmap(1,1,(*balls),t*PIXSIZE,c*PIXSIZE,PIXSIZE,PIXSIZE); if (Prefs::numberedBalls() && (t == NORMALBALL)) @@ -85,17 +85,17 @@ void BallPainter::createPix() p.setPen(Qt::black); else p.setPen(Qt::white); - QString tmp; + TQString tmp; tmp.setNum(c+1); - p.drawText(QRect(0,0,CELLSIZE,CELLSIZE), Qt::AlignCenter, tmp); + p.drawText(TQRect(0,0,CELLSIZE,CELLSIZE), Qt::AlignCenter, tmp); } } } for(int t=0; t < FIREPIX ; t++) { - firePix[t] = new QPixmap(CELLSIZE, CELLSIZE); - QPainter p(firePix[t]); + firePix[t] = new TQPixmap(CELLSIZE, CELLSIZE); + TQPainter p(firePix[t]); p.drawPixmap(0,0,(*backgroundPix),0,0,CELLSIZE,CELLSIZE); p.drawPixmap(1,1,(*fire),t*PIXSIZE,0,PIXSIZE,PIXSIZE); } @@ -104,7 +104,7 @@ void BallPainter::createPix() } -QPixmap BallPainter::GetBall(int color, int animstep, int panim) +TQPixmap BallPainter::GetBall(int color, int animstep, int panim) { // return backgroundPix; diff --git a/klines/ballpainter.h b/klines/ballpainter.h index a0ad2cbb..522a3928 100644 --- a/klines/ballpainter.h +++ b/klines/ballpainter.h @@ -18,8 +18,8 @@ #ifndef BALLPAINTER_H #define BALLPAINTER_H -#include <qobject.h> -#include <qpixmap.h> +#include <tqobject.h> +#include <tqpixmap.h> #include "cfg.h" #define CELLSIZE 32 @@ -27,9 +27,9 @@ class BallPainter : public QObject { Q_OBJECT - QPixmap* imgCash[NCOLORS][PIXTIME + FIREBALLS + BOOMBALLS + 1]; - QPixmap* backgroundPix; - QPixmap* firePix[FIREPIX]; + TQPixmap* imgCash[NCOLORS][PIXTIME + FIREBALLS + BOOMBALLS + 1]; + TQPixmap* backgroundPix; + TQPixmap* firePix[FIREPIX]; public: @@ -39,9 +39,9 @@ public: void deletePix(); void createPix(); - QPixmap GetBall( int color, int animstep, int panim ); - QPixmap GetNormalBall(int color) { return GetBall(color,0,ANIM_NO); } - QPixmap GetBackgroundPix() { return GetBall(NOBALL,0,ANIM_NO); } + TQPixmap GetBall( int color, int animstep, int panim ); + TQPixmap GetNormalBall(int color) { return GetBall(color,0,ANIM_NO); } + TQPixmap GetBackgroundPix() { return GetBall(NOBALL,0,ANIM_NO); } }; #endif diff --git a/klines/field.cpp b/klines/field.cpp index d7be22ca..d8da8ec7 100644 --- a/klines/field.cpp +++ b/klines/field.cpp @@ -19,8 +19,8 @@ #include "cfg.h" #include "field.moc" -Field::Field(QWidget* parent, const char* name) - : QWidget( parent, name ) +Field::Field(TQWidget* parent, const char* name) + : TQWidget( parent, name ) { clearField(); } diff --git a/klines/field.h b/klines/field.h index de9ee8ce..6fb08932 100644 --- a/klines/field.h +++ b/klines/field.h @@ -18,8 +18,8 @@ #ifndef FIELD_H #define FIELD_H -#include <qobject.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqwidget.h> #include "cell.h" // size of game field #define NUMCELLSW 9 @@ -35,7 +35,7 @@ public: void saveUndo(); protected: - Field(QWidget* parent, const char* name); + Field(TQWidget* parent, const char* name); ~Field(); void putBall(int x, int y, int color); diff --git a/klines/klines.cpp b/klines/klines.cpp index d5f36e35..50d96163 100644 --- a/klines/klines.cpp +++ b/klines/klines.cpp @@ -22,11 +22,11 @@ // The implementation of the KLines widget // -#include <qkeycode.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qstring.h> +#include <tqkeycode.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqstring.h> #include <stdlib.h> #include <unistd.h> #include <time.h> @@ -64,10 +64,10 @@ KLines::KLines() setCentralWidget( mwidget ); lsb = mwidget->GetLsb(); - connect(lsb, SIGNAL(endTurn()), this, SLOT(makeTurn())); - connect(lsb, SIGNAL(eraseLine(int)), this, SLOT(addScore(int))); - connect(lsb, SIGNAL(endGame()), this, SLOT(endGame())); - connect(lsb, SIGNAL(userTurn()), this, SLOT(userTurn())); + connect(lsb, TQT_SIGNAL(endTurn()), this, TQT_SLOT(makeTurn())); + connect(lsb, TQT_SIGNAL(eraseLine(int)), this, TQT_SLOT(addScore(int))); + connect(lsb, TQT_SIGNAL(endGame()), this, TQT_SLOT(endGame())); + connect(lsb, TQT_SIGNAL(userTurn()), this, TQT_SLOT(userTurn())); lPrompt = mwidget->GetPrompt(); @@ -82,7 +82,7 @@ KLines::KLines() initKAction(); - connect(&demoTimer, SIGNAL(timeout()), this, SLOT(slotDemo())); + connect(&demoTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDemo())); setFocusPolicy(StrongFocus); setFocus(); @@ -104,21 +104,21 @@ KLines::~KLines() */ void KLines::initKAction() { - KStdGameAction::gameNew(this, SLOT(startGame()), actionCollection()); - act_demo = KStdGameAction::demo(this, SLOT(startDemo()), actionCollection()); + KStdGameAction::gameNew(this, TQT_SLOT(startGame()), actionCollection()); + act_demo = KStdGameAction::demo(this, TQT_SLOT(startDemo()), actionCollection()); act_demo->setText(i18n("Start &Tutorial")); - KStdGameAction::highscores(this, SLOT(viewHighScore()), actionCollection()); - KStdGameAction::quit(this, SLOT(close()), actionCollection()); - endTurnAction = KStdGameAction::endTurn(this, SLOT(makeTurn()), actionCollection()); + KStdGameAction::highscores(this, TQT_SLOT(viewHighScore()), actionCollection()); + KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection()); + endTurnAction = KStdGameAction::endTurn(this, TQT_SLOT(makeTurn()), actionCollection()); showNextAction = new KToggleAction(i18n("&Show Next"), KShortcut(CTRL+Key_P), - this, SLOT(switchPrompt()), actionCollection(), "options_show_next"); + this, TQT_SLOT(switchPrompt()), actionCollection(), "options_show_next"); showNextAction->setCheckedState(i18n("Hide Next")); showNumberedAction = new KToggleAction(i18n("&Use Numbered Balls"), KShortcut(), - this, SLOT(switchNumbered()), actionCollection(), "options_show_numbered"); - undoAction = KStdGameAction::undo(this, SLOT(undo()), actionCollection()); + this, TQT_SLOT(switchNumbered()), actionCollection(), "options_show_numbered"); + undoAction = KStdGameAction::undo(this, TQT_SLOT(undo()), actionCollection()); levelAction = KStdGameAction::chooseGameType(0, 0, actionCollection()); - QStringList items; + TQStringList items; for (uint i=0; i<Nb_Levels; i++) items.append( i18n(LEVEL[i]) ); levelAction->setItems(items); @@ -128,11 +128,11 @@ void KLines::initKAction() showNumberedAction->setChecked(Prefs::numberedBalls()); lPrompt->setPrompt(Prefs::showNext()); - (void)new KAction(i18n("Move Left"), Key_Left, lsb, SLOT(moveLeft()), actionCollection(), "left"); - (void)new KAction(i18n("Move Right"), Key_Right, lsb, SLOT(moveRight()), actionCollection(), "right"); - (void)new KAction(i18n("Move Up"), Key_Up, lsb, SLOT(moveUp()), actionCollection(), "up"); - (void)new KAction(i18n("Move Down"), Key_Down, lsb, SLOT(moveDown()), actionCollection(), "down"); - (void)new KAction(i18n("Move Ball"), Key_Space, lsb, SLOT(placePlayerBall()), actionCollection(), "place_ball"); + (void)new KAction(i18n("Move Left"), Key_Left, lsb, TQT_SLOT(moveLeft()), actionCollection(), "left"); + (void)new KAction(i18n("Move Right"), Key_Right, lsb, TQT_SLOT(moveRight()), actionCollection(), "right"); + (void)new KAction(i18n("Move Up"), Key_Up, lsb, TQT_SLOT(moveUp()), actionCollection(), "up"); + (void)new KAction(i18n("Move Down"), Key_Down, lsb, TQT_SLOT(moveDown()), actionCollection(), "down"); + (void)new KAction(i18n("Move Ball"), Key_Space, lsb, TQT_SLOT(placePlayerBall()), actionCollection(), "place_ball"); setupGUI( KMainWindow::Save | Keys | StatusBar | Create ); } @@ -212,7 +212,7 @@ void KLines::slotDemo() int ballColors = -1; int clickX = 0; int clickY = 0; - QString msg; + TQString msg; demoStep++; if ((demoStep % 2) == 0) { @@ -413,7 +413,7 @@ void KLines::slotDemo() } } -void KLines::focusOutEvent(QFocusEvent *ev) +void KLines::focusOutEvent(TQFocusEvent *ev) { if (bDemo) { @@ -424,7 +424,7 @@ void KLines::focusOutEvent(QFocusEvent *ev) KMainWindow::focusOutEvent(ev); } -void KLines::focusInEvent(QFocusEvent *ev) +void KLines::focusInEvent(TQFocusEvent *ev) { if (bDemo) { @@ -573,7 +573,7 @@ void KLines::switchUndo(bool bu) undoAction->setEnabled(bu); } -void KLines::keyPressEvent(QKeyEvent *e) +void KLines::keyPressEvent(TQKeyEvent *e) { if (lsb->gameOver() && (e->key() == Qt::Key_Space)) { diff --git a/klines/klines.h b/klines/klines.h index 73720f03..39352b33 100644 --- a/klines/klines.h +++ b/klines/klines.h @@ -34,12 +34,12 @@ public: ~KLines(); protected: - void keyPressEvent(QKeyEvent *e); + void keyPressEvent(TQKeyEvent *e); void initKAction(); void setLevel(int level); - void focusOutEvent(QFocusEvent *); - void focusInEvent(QFocusEvent *); + void focusOutEvent(TQFocusEvent *); + void focusInEvent(TQFocusEvent *); public slots: void startGame(); @@ -65,7 +65,7 @@ private: KSelectAction *levelAction; KToggleAction *showNextAction; KToggleAction *showNumberedAction; - QString levelStr; + TQString levelStr; bool bNewTurn; @@ -80,7 +80,7 @@ private: bool bDemo; int demoStep; - QTimer demoTimer; + TQTimer demoTimer; void searchBallsLine(); void generateRandomBalls(); 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); } diff --git a/klines/linesboard.h b/klines/linesboard.h index 044887b4..f5e3ac37 100644 --- a/klines/linesboard.h +++ b/klines/linesboard.h @@ -18,10 +18,10 @@ #ifndef linesboard_h #define linesboard_h -#include <qwidget.h> -#include <qpixmap.h> -#include <qtimer.h> -#include <qlabel.h> +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqtimer.h> +#include <tqlabel.h> #include <krandomsequence.h> @@ -33,7 +33,7 @@ class LinesBoard : public Field { Q_OBJECT public: - LinesBoard( BallPainter * abPainter, QWidget* parent=0, const char* name=0 ); + LinesBoard( BallPainter * abPainter, TQWidget* parent=0, const char* name=0 ); ~LinesBoard(); int width(); @@ -51,7 +51,7 @@ public: void setLevel(int _level) { level = _level; } void startDemoMode(); void adjustDemoMode(bool allowMove, bool off); - void showDemoText(const QString &); + void showDemoText(const TQString &); void hideDemoText(); void demoClick(int x, int y); void demoAdjust(int a); @@ -89,7 +89,7 @@ private: int level; - QTimer* timer; + TQTimer* timer; // ShotCounter* shCounter; BallPainter* bPainter; bool bGameOver; @@ -97,11 +97,11 @@ private: KRandomSequence rnd_saved; KRandomSequence rnd_demo; - QLabel *demoLabel; + TQLabel *demoLabel; bool bAllowMove; - void paintEvent( QPaintEvent* ); - void mousePressEvent( QMouseEvent* ); + void paintEvent( TQPaintEvent* ); + void mousePressEvent( TQMouseEvent* ); void AnimStart(int panim); void AnimNext(); diff --git a/klines/mwidget.cpp b/klines/mwidget.cpp index a6555835..c883b9ba 100644 --- a/klines/mwidget.cpp +++ b/klines/mwidget.cpp @@ -19,24 +19,24 @@ #include <klocale.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include "ballpainter.h" -MainWidget::MainWidget( QWidget* parent, const char* name ) - : QFrame( parent, name ) +MainWidget::MainWidget( TQWidget* parent, const char* name ) + : TQFrame( parent, name ) { - QBoxLayout *grid = new QHBoxLayout( this, 5 ); //(rows,col) + TQBoxLayout *grid = new TQHBoxLayout( this, 5 ); //(rows,col) bPainter = new BallPainter(); lsb = new LinesBoard(bPainter, this); grid->addWidget( lsb ); - QBoxLayout *right = new QVBoxLayout(grid, 2); - QLabel *label = new QLabel(i18n("Next balls:"), this); + TQBoxLayout *right = new TQVBoxLayout(grid, 2); + TQLabel *label = new TQLabel(i18n("Next balls:"), this); lPrompt = new LinesPrompt(bPainter, this); - connect(lPrompt, SIGNAL(PromptPressed()), parent, SLOT(switchPrompt())); + connect(lPrompt, TQT_SIGNAL(PromptPressed()), parent, TQT_SLOT(switchPrompt())); right->addWidget( label, 0, Qt::AlignBottom | Qt::AlignHCenter ); right->addWidget( lPrompt, 0, Qt::AlignTop | Qt::AlignHCenter ); diff --git a/klines/mwidget.h b/klines/mwidget.h index 140ccd51..18f48720 100644 --- a/klines/mwidget.h +++ b/klines/mwidget.h @@ -18,10 +18,10 @@ #ifndef MWIDGET_H #define MWIDGET_H -#include <qwidget.h> -#include <qpixmap.h> -#include <qtimer.h> -#include <qframe.h> +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqtimer.h> +#include <tqframe.h> #include "linesboard.h" #include "prompt.h" @@ -35,7 +35,7 @@ class MainWidget : public QFrame BallPainter *bPainter; public: - MainWidget( QWidget* parent=0, const char* name=0 ); + MainWidget( TQWidget* parent=0, const char* name=0 ); ~MainWidget(); LinesBoard * GetLsb(); LinesPrompt * GetPrompt(); diff --git a/klines/prompt.cpp b/klines/prompt.cpp index 09c17e2a..7a9ec36a 100644 --- a/klines/prompt.cpp +++ b/klines/prompt.cpp @@ -15,12 +15,12 @@ * * ***************************************************************************/ -#include <qpainter.h> +#include <tqpainter.h> #include "prompt.h" #include "prompt.moc" -LinesPrompt::LinesPrompt( BallPainter * abPainter, QWidget* parent, const char* name ) - : QWidget( parent, name ) +LinesPrompt::LinesPrompt( BallPainter * abPainter, TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { bPainter = abPainter; @@ -47,9 +47,9 @@ int LinesPrompt::height() { return CELLSIZE ; } int LinesPrompt::wPrompt() { return CELLSIZE * 3 ; } int LinesPrompt::hPrompt() { return CELLSIZE ; } -void LinesPrompt::paintEvent( QPaintEvent* ) +void LinesPrompt::paintEvent( TQPaintEvent* ) { - QPainter paint( this ); + TQPainter paint( this ); if(PromptEnabled){ paint.drawPixmap(0, 0, bPainter->GetNormalBall(cb[0]) ); paint.drawPixmap(CELLSIZE, 0, bPainter->GetNormalBall(cb[1]) ); @@ -65,7 +65,7 @@ void LinesPrompt::paintEvent( QPaintEvent* ) /* Handles mouse press events for the LinesPrompt widget. */ -void LinesPrompt::mousePressEvent( QMouseEvent* ) +void LinesPrompt::mousePressEvent( TQMouseEvent* ) { emit PromptPressed(); } diff --git a/klines/prompt.h b/klines/prompt.h index f1e0b026..3ddf6335 100644 --- a/klines/prompt.h +++ b/klines/prompt.h @@ -18,7 +18,7 @@ #ifndef PROMPT_H #define PROMPT_H -#include <qwidget.h> +#include <tqwidget.h> #include "ballpainter.h" class LinesPrompt : public QWidget @@ -29,11 +29,11 @@ class LinesPrompt : public QWidget bool PromptEnabled; int cb[BALLSDROP]; - void paintEvent( QPaintEvent* ); - void mousePressEvent( QMouseEvent* ); + void paintEvent( TQPaintEvent* ); + void mousePressEvent( TQMouseEvent* ); public: - LinesPrompt( BallPainter * abPainter, QWidget * parent=0, const char * name=0 ); + LinesPrompt( BallPainter * abPainter, TQWidget * parent=0, const char * name=0 ); ~LinesPrompt(); void setPrompt(bool enabled); |