diff options
Diffstat (limited to 'ksmiletris/gamewindow.cpp')
-rw-r--r-- | ksmiletris/gamewindow.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/ksmiletris/gamewindow.cpp b/ksmiletris/gamewindow.cpp index d3bef18d..1937e996 100644 --- a/ksmiletris/gamewindow.cpp +++ b/ksmiletris/gamewindow.cpp @@ -43,7 +43,7 @@ const int default_width = 362; const int default_height = 460; GameWindow::GameWindow(TQWidget *, const char *name) - : KMainWindow(0, name) + : TDEMainWindow(0, name) { //New Games (void)KStdGameAction::gameNew(TQT_TQOBJECT(this), @@ -71,15 +71,15 @@ GameWindow::GameWindow(TQWidget *, const char *name) actionCollection()); TQStringList list; - KSelectAction* piecesAct = - new KSelectAction(i18n("&Pieces"), 0, TQT_TQOBJECT(this), TQT_SLOT(menu_pieces()), + TDESelectAction* piecesAct = + new TDESelectAction(i18n("&Pieces"), 0, TQT_TQOBJECT(this), TQT_SLOT(menu_pieces()), actionCollection(), "settings_pieces"); list.append(i18n("&Smiles")); list.append(i18n("S&ymbols")); list.append(i18n("&Icons")); piecesAct->setItems(list); - (void)new KToggleAction(i18n("&Sounds"), 0, TQT_TQOBJECT(this), + (void)new TDEToggleAction(i18n("&Sounds"), 0, TQT_TQOBJECT(this), TQT_SLOT(menu_sounds()), actionCollection(), "settings_sounds"); @@ -102,11 +102,11 @@ GameWindow::GameWindow(TQWidget *, const char *name) connect(game, TQT_SIGNAL(gameOver()), TQT_TQOBJECT(this), TQT_SLOT(gameOver())); //keys - (void)new KAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(game), TQT_SLOT(keyLeft()), actionCollection(), "left"); - (void)new KAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(game), TQT_SLOT(keyRight()), actionCollection(), "right"); - (void)new KAction(i18n("Rotate Left"), Key_Up, TQT_TQOBJECT(game), TQT_SLOT(keyUp()), actionCollection(), "up"); - (void)new KAction(i18n("Rotate Right"), Key_Down, TQT_TQOBJECT(game), TQT_SLOT(keyDown()), actionCollection(), "down"); - (void)new KAction(i18n("Drop Down"), Key_Space, TQT_TQOBJECT(game), TQT_SLOT(keySpace()), actionCollection(), "space"); + (void)new TDEAction(i18n("Move Left"), Key_Left, TQT_TQOBJECT(game), TQT_SLOT(keyLeft()), actionCollection(), "left"); + (void)new TDEAction(i18n("Move Right"), Key_Right, TQT_TQOBJECT(game), TQT_SLOT(keyRight()), actionCollection(), "right"); + (void)new TDEAction(i18n("Rotate Left"), Key_Up, TQT_TQOBJECT(game), TQT_SLOT(keyUp()), actionCollection(), "up"); + (void)new TDEAction(i18n("Rotate Right"), Key_Down, TQT_TQOBJECT(game), TQT_SLOT(keyDown()), actionCollection(), "down"); + (void)new TDEAction(i18n("Drop Down"), Key_Space, TQT_TQOBJECT(game), TQT_SLOT(keySpace()), actionCollection(), "space"); game->setFixedSize(default_width, default_height); adjustSize(); @@ -117,18 +117,18 @@ GameWindow::GameWindow(TQWidget *, const char *name) config->setGroup("Options"); PiecesType pieces_type = (PiecesType)config->readNumEntry("Pieces", static_cast<int>(Pieces_Smiles)); game->setPieces(pieces_type); - ((KSelectAction*)actionCollection()->action("settings_pieces"))->setCurrentItem((int)pieces_type); + ((TDESelectAction*)actionCollection()->action("settings_pieces"))->setCurrentItem((int)pieces_type); game->do_sounds = config->readBoolEntry("Sounds", true); - ((KToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); + ((TDEToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); - setupGUI(KMainWindow::Save | Keys | StatusBar | Create); + setupGUI(TDEMainWindow::Save | Keys | StatusBar | Create); } void GameWindow::menu_newGame() { - ((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false); + ((TDEToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false); game->newGame(); } @@ -136,7 +136,7 @@ void GameWindow::menu_pause() { if (game->in_game) { game->in_pause = !game->in_pause; - ((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(game->in_pause); + ((TDEToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(game->in_pause); game->repaintChilds(); } } @@ -146,7 +146,7 @@ void GameWindow::menu_endGame() if (game->in_game) { game->in_game = false; game->repaintChilds(); - ((KToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false); + ((TDEToggleAction*)actionCollection()->action(KStdGameAction::stdName(KStdGameAction::Pause)))->setChecked(false); gameOver(); } } @@ -159,7 +159,7 @@ void GameWindow::menu_highScores() void GameWindow::menu_pieces() { - int index = ((KSelectAction*)actionCollection()->action("settings_pieces"))->currentItem(); + int index = ((TDESelectAction*)actionCollection()->action("settings_pieces"))->currentItem(); game->setPieces((PiecesType)index); TDEConfig *config = kapp->config(); @@ -170,7 +170,7 @@ void GameWindow::menu_pieces() void GameWindow::menu_sounds() { game->do_sounds = !game->do_sounds; - ((KToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); + ((TDEToggleAction*)actionCollection()->action("settings_sounds"))->setChecked(game->do_sounds); TDEConfig *config = kapp->config(); config->setGroup("Options"); |