diff options
author | Timothy Pearson <[email protected]> | 2013-02-01 15:12:46 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-02-01 15:12:46 -0600 |
commit | 58a97ed3af5e4df6c4a58d043b0c267bd97056a9 (patch) | |
tree | 5a2fde6842fd422cae2d8670d382be965098cc32 /klines | |
parent | 2ce15ee76fd2d9d18a63c035a0f5b00b94c60cdc (diff) | |
download | tdegames-58a97ed3af5e4df6c4a58d043b0c267bd97056a9.tar.gz tdegames-58a97ed3af5e4df6c4a58d043b0c267bd97056a9.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'klines')
-rw-r--r-- | klines/klines.cpp | 28 | ||||
-rw-r--r-- | klines/klines.h | 18 |
2 files changed, 23 insertions, 23 deletions
diff --git a/klines/klines.cpp b/klines/klines.cpp index be076db9..39cf4b71 100644 --- a/klines/klines.cpp +++ b/klines/klines.cpp @@ -80,7 +80,7 @@ KLines::KLines() statusBar()->insertItem(i18n(" Level: "), 0, 1); statusBar()->setItemAlignment(0, AlignVCenter | AlignLeft); - initKAction(); + initTDEAction(); connect(&demoTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotDemo())); @@ -100,9 +100,9 @@ KLines::~KLines() } /* - Init KAction objects (menubar, toolbar, shortcuts) + Init TDEAction objects (menubar, toolbar, shortcuts) */ -void KLines::initKAction() +void KLines::initTDEAction() { KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(startGame()), actionCollection()); act_demo = KStdGameAction::demo(TQT_TQOBJECT(this), TQT_SLOT(startDemo()), actionCollection()); @@ -110,10 +110,10 @@ void KLines::initKAction() KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(viewHighScore()), actionCollection()); KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); endTurnAction = KStdGameAction::endTurn(TQT_TQOBJECT(this), TQT_SLOT(makeTurn()), actionCollection()); - showNextAction = new KToggleAction(i18n("&Show Next"), KShortcut(CTRL+Key_P), + showNextAction = new TDEToggleAction(i18n("&Show Next"), TDEShortcut(CTRL+Key_P), TQT_TQOBJECT(this), TQT_SLOT(switchPrompt()), actionCollection(), "options_show_next"); showNextAction->setCheckedState(i18n("Hide Next")); - showNumberedAction = new KToggleAction(i18n("&Use Numbered Balls"), KShortcut(), + showNumberedAction = new TDEToggleAction(i18n("&Use Numbered Balls"), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(switchNumbered()), actionCollection(), "options_show_numbered"); undoAction = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection()); @@ -128,13 +128,13 @@ void KLines::initKAction() showNumberedAction->setChecked(Prefs::numberedBalls()); lPrompt->setPrompt(Prefs::showNext()); - (void)new KAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(lsb), TQT_SLOT(moveLeft()), actionCollection(), "left"); - (void)new KAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(lsb), TQT_SLOT(moveRight()), actionCollection(), "right"); - (void)new KAction(i18n("Move Up"), Key_Up, TQT_TQOBJECT(lsb), TQT_SLOT(moveUp()), actionCollection(), "up"); - (void)new KAction(i18n("Move Down"), Key_Down, TQT_TQOBJECT(lsb), TQT_SLOT(moveDown()), actionCollection(), "down"); - (void)new KAction(i18n("Move Ball"), Key_Space, TQT_TQOBJECT(lsb), TQT_SLOT(placePlayerBall()), actionCollection(), "place_ball"); + (void)new TDEAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(lsb), TQT_SLOT(moveLeft()), actionCollection(), "left"); + (void)new TDEAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(lsb), TQT_SLOT(moveRight()), actionCollection(), "right"); + (void)new TDEAction(i18n("Move Up"), Key_Up, TQT_TQOBJECT(lsb), TQT_SLOT(moveUp()), actionCollection(), "up"); + (void)new TDEAction(i18n("Move Down"), Key_Down, TQT_TQOBJECT(lsb), TQT_SLOT(moveDown()), actionCollection(), "down"); + (void)new TDEAction(i18n("Move Ball"), Key_Space, TQT_TQOBJECT(lsb), TQT_SLOT(placePlayerBall()), actionCollection(), "place_ball"); - setupGUI( KMainWindow::Save | Keys | StatusBar | Create ); + setupGUI( TDEMainWindow::Save | Keys | StatusBar | Create ); } void KLines::startGame() @@ -421,7 +421,7 @@ void KLines::focusOutEvent(TQFocusEvent *ev) demoTimer.stop(); statusBar()->changeItem(i18n(" Level: %1").arg(i18n("Tutorial - Paused")), 0); } - KMainWindow::focusOutEvent(ev); + TDEMainWindow::focusOutEvent(ev); } void KLines::focusInEvent(TQFocusEvent *ev) @@ -431,7 +431,7 @@ void KLines::focusInEvent(TQFocusEvent *ev) statusBar()->changeItem(i18n(" Level: %1").arg(levelStr), 0); slotDemo(); } - KMainWindow::focusInEvent(ev); + TDEMainWindow::focusInEvent(ev); } void KLines::stopGame() @@ -581,5 +581,5 @@ void KLines::keyPressEvent(TQKeyEvent *e) startGame(); return; } - KMainWindow::keyPressEvent(e); + TDEMainWindow::keyPressEvent(e); } diff --git a/klines/klines.h b/klines/klines.h index 71e510c3..93f7f80f 100644 --- a/klines/klines.h +++ b/klines/klines.h @@ -22,11 +22,11 @@ #include "mwidget.h" #include "prompt.h" -class KSelectAction; -class KAction; -class KToggleAction; +class TDESelectAction; +class TDEAction; +class TDEToggleAction; -class KLines : public KMainWindow +class KLines : public TDEMainWindow { Q_OBJECT @@ -36,7 +36,7 @@ public: protected: void keyPressEvent(TQKeyEvent *e); - void initKAction(); + void initTDEAction(); void setLevel(int level); void focusOutEvent(TQFocusEvent *); @@ -62,10 +62,10 @@ private: LinesBoard* lsb; MainWidget *mwidget; LinesPrompt *lPrompt; - KAction *act_demo, *undoAction, *endTurnAction; - KSelectAction *levelAction; - KToggleAction *showNextAction; - KToggleAction *showNumberedAction; + TDEAction *act_demo, *undoAction, *endTurnAction; + TDESelectAction *levelAction; + TDEToggleAction *showNextAction; + TDEToggleAction *showNumberedAction; TQString levelStr; bool bNewTurn; |