diff options
Diffstat (limited to 'libksirtet/base')
-rw-r--r-- | libksirtet/base/board.cpp | 12 | ||||
-rw-r--r-- | libksirtet/base/board.h | 10 | ||||
-rw-r--r-- | libksirtet/base/factory.h | 4 | ||||
-rw-r--r-- | libksirtet/base/field.cpp | 30 | ||||
-rw-r--r-- | libksirtet/base/field.h | 4 | ||||
-rw-r--r-- | libksirtet/base/gtetris.h | 2 | ||||
-rw-r--r-- | libksirtet/base/inter.cpp | 8 | ||||
-rw-r--r-- | libksirtet/base/inter.h | 4 | ||||
-rw-r--r-- | libksirtet/base/kzoommainwindow.cpp | 10 | ||||
-rw-r--r-- | libksirtet/base/kzoommainwindow.h | 3 | ||||
-rw-r--r-- | libksirtet/base/main.cpp | 16 | ||||
-rw-r--r-- | libksirtet/base/main.h | 1 | ||||
-rw-r--r-- | libksirtet/base/piece.h | 2 | ||||
-rw-r--r-- | libksirtet/base/settings.h | 6 |
14 files changed, 59 insertions, 53 deletions
diff --git a/libksirtet/base/board.cpp b/libksirtet/base/board.cpp index 12193e31..0a6d37f1 100644 --- a/libksirtet/base/board.cpp +++ b/libksirtet/base/board.cpp @@ -12,11 +12,11 @@ using namespace KGrid2D; //----------------------------------------------------------------------------- -FixedCanvasView::FixedCanvasView(TQWidget *parent, const char *name) - : TQCanvasView(parent, name, WNoAutoErase) +FixedCanvasView::FixedCanvasView(TQWidget *tqparent, const char *name) + : TQCanvasView(tqparent, name, WNoAutoErase) {} -TQSize FixedCanvasView::sizeHint() const +TQSize FixedCanvasView::tqsizeHint() const { if ( canvas()==0 ) return TQSize(); return canvas()->size() + 2 * TQSize(frameWidth(), frameWidth()); @@ -24,7 +24,7 @@ TQSize FixedCanvasView::sizeHint() const void FixedCanvasView::adjustSize() { - setFixedSize(sizeHint()); + setFixedSize(tqsizeHint()); } //----------------------------------------------------------------------------- @@ -35,8 +35,8 @@ const BaseBoard::DirectionData BaseBoard::DIRECTION_DATA[Nb_Direction] = { { SquareBase::Up, Down } }; -BaseBoard::BaseBoard(bool graphic, TQWidget *parent) -: FixedCanvasView(parent, "board"), +BaseBoard::BaseBoard(bool graphic, TQWidget *tqparent) +: FixedCanvasView(tqparent, "board"), GenericTetris(bfactory->bbi.width, bfactory->bbi.height, bfactory->bbi.withPieces, graphic), state(GameOver), timer(this), sequences(0), main(0), _next(0), diff --git a/libksirtet/base/board.h b/libksirtet/base/board.h index 7be2a4ec..e65206f8 100644 --- a/libksirtet/base/board.h +++ b/libksirtet/base/board.h @@ -12,13 +12,14 @@ class SequenceArray; class BlockInfo; //----------------------------------------------------------------------------- -class KDE_EXPORT FixedCanvasView : public QCanvasView +class KDE_EXPORT FixedCanvasView : public TQCanvasView { Q_OBJECT + TQ_OBJECT public: - FixedCanvasView(TQWidget *parent = 0, const char *name = 0); + FixedCanvasView(TQWidget *tqparent = 0, const char *name = 0); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; public slots: virtual void adjustSize(); @@ -28,6 +29,7 @@ public slots: class KDE_EXPORT BaseBoard : public FixedCanvasView, public GenericTetris { Q_OBJECT + TQ_OBJECT public: enum Direction { Left = 1, Right = 2, Up = 4, Down = 8, Nb_Direction = 4 }; private: @@ -38,7 +40,7 @@ class KDE_EXPORT BaseBoard : public FixedCanvasView, public GenericTetris static const DirectionData DIRECTION_DATA[Nb_Direction]; public: - BaseBoard(bool graphic, TQWidget *parent); + BaseBoard(bool graphic, TQWidget *tqparent); virtual ~BaseBoard(); void copy(const GenericTetris &); diff --git a/libksirtet/base/factory.h b/libksirtet/base/factory.h index b772adb7..7df5574d 100644 --- a/libksirtet/base/factory.h +++ b/libksirtet/base/factory.h @@ -43,8 +43,8 @@ class KDE_EXPORT BaseFactory const MainData &mainData; const BaseBoardInfo &bbi; - virtual BaseBoard *createBoard(bool graphic, TQWidget *parent) = 0; - virtual BaseInterface *createInterface(TQWidget *parent) = 0; + virtual BaseBoard *createBoard(bool graphic, TQWidget *tqparent) = 0; + virtual BaseInterface *createInterface(TQWidget *tqparent) = 0; virtual TQWidget *createAppearanceConfig(); virtual TQWidget *createColorConfig(); diff --git a/libksirtet/base/field.cpp b/libksirtet/base/field.cpp index fae20266..6e35faf5 100644 --- a/libksirtet/base/field.cpp +++ b/libksirtet/base/field.cpp @@ -41,9 +41,9 @@ void BaseField::init(bool AI, bool multiplayer, bool server, bool first, _flags.multiplayer = multiplayer; _flags.server = server; _flags.first = first; - TQString text = (AI ? i18n("%1\n(AI player)").arg(name) - : (multiplayer ? i18n("%1\n(Human player)").arg(name) - : TQString::null)); + TQString text = (AI ? i18n("%1\n(AI player)").tqarg(name) + : (multiplayer ? i18n("%1\n(Human player)").tqarg(name) + : TQString())); if ( first && !server ) text += i18n("\nWaiting for server"); setMessage(text, (first && server ? StartButton : NoButton)); showScore->resetColor(); @@ -79,11 +79,11 @@ void BaseField::setMessage(const TQString &label, ButtonType type) _boardLayout->addStretch(3); if ( !label.isEmpty() ) { TQString str = (isArcade() ? i18n("Arcade game") + '\n' - : TQString::null) + label; + : TQString()) + label; _label = new TQLabel(str, board); - _label->setAlignment(Qt::AlignCenter); + _label->tqsetAlignment(TQt::AlignCenter); _label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - _boardLayout->addWidget(_label, 0, Qt::AlignCenter); + _boardLayout->addWidget(_label, 0, TQt::AlignCenter); _label->show(); } _boardLayout->addStretch(1); @@ -93,8 +93,8 @@ void BaseField::setMessage(const TQString &label, ButtonType type) const char *slot = (type==ResumeButton ? TQT_SLOT(pause()) : TQT_SLOT(start())); _button->connect(_button, TQT_SIGNAL(clicked()), - _widget->parent(), slot); - _boardLayout->addWidget(_button, 0, Qt::AlignCenter); + _widget->tqparent(), slot); + _boardLayout->addWidget(_button, 0, TQt::AlignCenter); _button->show(); } _boardLayout->addStretch(3); @@ -123,22 +123,22 @@ void BaseField::stop(bool gameover) { board->stop(); ButtonType button = StartButton; - TQString msg = (gameover ? i18n("Game over") : TQString::null); + TQString msg = (gameover ? i18n("Game over") : TQString()); if ( board->isArcade() && board->arcadeStageDone() ) { if ( board->arcadeStage()==bfactory->bbi.nbArcadeStages ) msg = i18n("The End"); else { - msg = i18n("Stage #%1 done").arg(board->arcadeStage()); + msg = i18n("Stage #%1 done").tqarg(board->arcadeStage()); button = ProceedButton; } } setMessage(msg, button); } -void BaseField::gameOver(const KExtHighscore::Score &score, TQWidget *parent) +void BaseField::gameOver(const KExtHighscore::Score &score, TQWidget *tqparent) { - KNotifyClient::event(parent->winId(), "game over", i18n("Game Over")); - KExtHighscore::submitScore(score, parent); + KNotifyClient::event(tqparent->winId(), "game over", i18n("Game Over")); + KExtHighscore::submitScore(score, tqparent); } void BaseField::scoreUpdated() @@ -147,8 +147,8 @@ void BaseField::scoreUpdated() if (_flags.multiplayer) return; TQColor color; - if ( _firstScore<currentScore() ) color = Qt::red; - else if ( _lastScore<currentScore() ) color = Qt::blue; + if ( _firstScore<currentScore() ) color = TQt::red; + else if ( _lastScore<currentScore() ) color = TQt::blue; showScore->setColor(color); } diff --git a/libksirtet/base/field.h b/libksirtet/base/field.h index e9366f4c..a60173bb 100644 --- a/libksirtet/base/field.h +++ b/libksirtet/base/field.h @@ -22,7 +22,7 @@ class KDE_EXPORT BaseField virtual ~BaseField() {} virtual KExtHighscore::Score currentScore() const = 0; - static void gameOver(const KExtHighscore::Score &, TQWidget *parent); + static void gameOver(const KExtHighscore::Score &, TQWidget *tqparent); virtual void setArcade(); bool isArcade() const; @@ -60,7 +60,7 @@ class KDE_EXPORT BaseField bool hasButton() const { return _flags.server && _flags.first; } void setMessage(const TQString &label, ButtonType); - void hideMessage() { setMessage(TQString::null, NB_BUTTON_TYPE); } + void hideMessage() { setMessage(TQString(), NB_BUTTON_TYPE); } }; #endif diff --git a/libksirtet/base/gtetris.h b/libksirtet/base/gtetris.h index b0f990b9..1546741d 100644 --- a/libksirtet/base/gtetris.h +++ b/libksirtet/base/gtetris.h @@ -81,7 +81,7 @@ ** ** Do whatever you want with this code (i.e. the files gtetris.h, ** gtetris.cpp, tpiece.h and tpiece.cpp). It is basically a weekend hack -** and it would bring joy to my heart if anyone in any way would find +** and it would bring joy to my heart if anyone in any way would tqfind ** it useful. ** ** Nostalgia, comments and/or praise can be sent to: [email protected] diff --git a/libksirtet/base/inter.cpp b/libksirtet/base/inter.cpp index 658e7c47..c573ef78 100644 --- a/libksirtet/base/inter.cpp +++ b/libksirtet/base/inter.cpp @@ -3,13 +3,13 @@ #include <kexthighscore.h> -void BaseInterface::showHighscores(TQWidget *parent) +void BaseInterface::showHighscores(TQWidget *tqparent) { if ( !_isPaused() ) _pause(); - _showHighscores(parent); + _showHighscores(tqparent); } -void BaseInterface::_showHighscores(TQWidget *parent) +void BaseInterface::_showHighscores(TQWidget *tqparent) { - KExtHighscore::show(parent); + KExtHighscore::show(tqparent); } diff --git a/libksirtet/base/inter.h b/libksirtet/base/inter.h index 3bf394db..21c81db0 100644 --- a/libksirtet/base/inter.h +++ b/libksirtet/base/inter.h @@ -14,10 +14,10 @@ public: virtual void _pause() = 0; virtual bool _isPaused() const = 0; - void showHighscores(TQWidget *parent); + void showHighscores(TQWidget *tqparent); protected: - virtual void _showHighscores(TQWidget *parent); + virtual void _showHighscores(TQWidget *tqparent); }; #endif diff --git a/libksirtet/base/kzoommainwindow.cpp b/libksirtet/base/kzoommainwindow.cpp index 4e1b85a5..1d0f5319 100644 --- a/libksirtet/base/kzoommainwindow.cpp +++ b/libksirtet/base/kzoommainwindow.cpp @@ -30,11 +30,11 @@ KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name { installEventFilter(this); - _zoomInAction = KStdAction::zoomIn(this, TQT_SLOT(zoomIn()), actionCollection()); + _zoomInAction = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), actionCollection()); _zoomOutAction = - KStdAction::zoomOut(this, TQT_SLOT(zoomOut()), actionCollection()); + KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), actionCollection()); _menu = - KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection()); + KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection()); } void KZoomMainWindow::init(const char *popupName) @@ -58,7 +58,7 @@ void KZoomMainWindow::init(const char *popupName) void KZoomMainWindow::addWidget(TQWidget *widget) { widget->adjustSize(); - TQWidget *tlw = widget->topLevelWidget(); + TQWidget *tlw = widget->tqtopLevelWidget(); KZoomMainWindow *zm = static_cast<KZoomMainWindow *>(tlw->qt_cast("KZoomMainWindow")); Q_ASSERT(zm); @@ -74,7 +74,7 @@ void KZoomMainWindow::widgetDestroyed() bool KZoomMainWindow::eventFilter(TQObject *o, TQEvent *e) { if ( e->type()==TQEvent::LayoutHint ) - setFixedSize(minimumSize()); // because K/QMainWindow + setFixedSize(tqminimumSize()); // because K/TQMainWindow // does not manage fixed central widget // with hidden menubar... return KMainWindow::eventFilter(o, e); diff --git a/libksirtet/base/kzoommainwindow.h b/libksirtet/base/kzoommainwindow.h index fd213fd7..18e85ddb 100644 --- a/libksirtet/base/kzoommainwindow.h +++ b/libksirtet/base/kzoommainwindow.h @@ -44,6 +44,7 @@ class KToggleAction; class KDE_EXPORT KZoomMainWindow : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** Constructor. */ KZoomMainWindow(uint minZoom, uint maxZoom, uint zoomStep, @@ -51,7 +52,7 @@ public: /** Add a widget to be managed i.e. the adjustSize() method of the * widget is called whenever the zoom is changed. - * This function assumes that the topLevelWidget() is the KZoomMainWindow. + * This function assumes that the tqtopLevelWidget() is the KZoomMainWindow. */ static void addWidget(TQWidget *widget); diff --git a/libksirtet/base/main.cpp b/libksirtet/base/main.cpp index e09a9c50..cbfc433a 100644 --- a/libksirtet/base/main.cpp +++ b/libksirtet/base/main.cpp @@ -24,20 +24,20 @@ BaseMainWindow::BaseMainWindow() KNotifyClient::startDaemon(); // File & Popup - KStdGameAction::gameNew(this, TQT_SLOT(start()), actionCollection()); - _pause = KStdGameAction::pause(this, TQT_SLOT(pause()), actionCollection()); + KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(start()), actionCollection()); + _pause = KStdGameAction::pause(TQT_TQOBJECT(this), TQT_SLOT(pause()), actionCollection()); _pause->setEnabled(false); - KStdGameAction::highscores(this, TQT_SLOT(showHighscores()), + KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighscores()), actionCollection()); - KStdGameAction::quit(qApp, TQT_SLOT(quit()), actionCollection()); + KStdGameAction::quit(TQT_TQOBJECT(tqApp), TQT_SLOT(quit()), actionCollection()); // Settings - KStdAction::preferences(this, TQT_SLOT(configureSettings()), + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configureSettings()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT(configureKeys()), actionCollection()); - KStdAction::configureNotifications(this, TQT_SLOT(configureNotifications()), + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configureKeys()), actionCollection()); + KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(configureNotifications()), actionCollection()); - KStdGameAction::configureHighscores(this, TQT_SLOT(configureHighscores()), + KStdGameAction::configureHighscores(TQT_TQOBJECT(this), TQT_SLOT(configureHighscores()), actionCollection()); _inter = bfactory->createInterface(this); diff --git a/libksirtet/base/main.h b/libksirtet/base/main.h index cd165963..153f38ce 100644 --- a/libksirtet/base/main.h +++ b/libksirtet/base/main.h @@ -13,6 +13,7 @@ class KConfigDialog; class KDE_EXPORT BaseMainWindow : public KZoomMainWindow { Q_OBJECT + TQ_OBJECT public: BaseMainWindow(); virtual ~BaseMainWindow(); diff --git a/libksirtet/base/piece.h b/libksirtet/base/piece.h index 6cdd667c..accbf1ee 100644 --- a/libksirtet/base/piece.h +++ b/libksirtet/base/piece.h @@ -69,7 +69,7 @@ class SequenceArray : public TQMemArray<TQCanvasPixmapArray *> }; //----------------------------------------------------------------------------- -class BlockInfo : public QCanvas +class BlockInfo : public TQCanvas { public: BlockInfo(const SequenceArray &); diff --git a/libksirtet/base/settings.h b/libksirtet/base/settings.h index d32415c6..75f89404 100644 --- a/libksirtet/base/settings.h +++ b/libksirtet/base/settings.h @@ -8,9 +8,10 @@ class TQGridLayout; //----------------------------------------------------------------------------- -class BaseAppearanceConfig : public QWidget +class BaseAppearanceConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: BaseAppearanceConfig(); @@ -20,9 +21,10 @@ protected: }; //----------------------------------------------------------------------------- -class ColorConfig : public QWidget +class ColorConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: ColorConfig(); |