From 58a97ed3af5e4df6c4a58d043b0c267bd97056a9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:12:46 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- kshisen/app.cpp | 22 +++++++++++----------- kshisen/app.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'kshisen') diff --git a/kshisen/app.cpp b/kshisen/app.cpp index 77a96b5c..87d14fae 100644 --- a/kshisen/app.cpp +++ b/kshisen/app.cpp @@ -62,7 +62,7 @@ #include "prefs.h" #include "settings.h" -App::App(TQWidget *parent, const char *name) : KMainWindow(parent, name), +App::App(TQWidget *parent, const char *name) : TDEMainWindow(parent, name), cheat(false) { highscoreTable = new KHighscore(TQT_TQOBJECT(this)); @@ -80,7 +80,7 @@ App::App(TQWidget *parent, const char *name) : KMainWindow(parent, name), statusBar()->insertFixedItem(i18n(" Cheat mode "), SBI_CHEAT); statusBar()->changeItem("", SBI_CHEAT); - initKAction(); + initTDEAction(); board = new Board(this, "board"); loadSettings(); @@ -103,7 +103,7 @@ App::App(TQWidget *parent, const char *name) : KMainWindow(parent, name), enableItems(); } -void App::initKAction() +void App::initTDEAction() { // Game KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection()); @@ -116,11 +116,11 @@ void App::initKAction() KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection()); KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection()); KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(hint()), actionCollection()); - //new KAction(i18n("Is Game Solvable?"), 0, this, + //new TDEAction(i18n("Is Game Solvable?"), 0, this, // TQT_SLOT(isSolvable()), actionCollection(), "move_solvable"); #ifdef DEBUGGING - (void)new KAction(i18n("&Finish"), 0, board, TQT_SLOT(finish()), actionCollection(), "move_finish"); + (void)new TDEAction(i18n("&Finish"), 0, board, TQT_SLOT(finish()), actionCollection(), "move_finish"); #endif // Settings @@ -209,7 +209,7 @@ void App::loadSettings() { TQSize s = board->unscaledSize(); - // We would have liked to have used KMainWindow::sizeForCentralWidgetSize(), + // We would have liked to have used TDEMainWindow::sizeForCentralWidgetSize(), // but this function does not seem to work when the toolbar is docked on the // left. sizeForCentralWidgetSize() even reports a value 1 pixel too small // when the toolbar is docked at the top... @@ -227,14 +227,14 @@ void App::lockMenus(bool lock) // Disable all actions apart from (un)pause, quit and those that are help-related. // (Only undo/redo and hint actually *need* to be disabled, but disabling everything // provides a good visual hint to the user, that they need to unpause to continue. - KPopupMenu* help = dynamic_cast(child("help", "KPopupMenu", false)); - KActionPtrList actions = actionCollection()->actions(); - KActionPtrList::iterator actionIter = actions.begin(); - KActionPtrList::iterator actionIterEnd = actions.end(); + TDEPopupMenu* help = dynamic_cast(child("help", "TDEPopupMenu", false)); + TDEActionPtrList actions = actionCollection()->actions(); + TDEActionPtrList::iterator actionIter = actions.begin(); + TDEActionPtrList::iterator actionIterEnd = actions.end(); while(actionIter != actionIterEnd) { - KAction* a = *actionIter; + TDEAction* a = *actionIter; if(!a->isPlugged(help)) a->setEnabled(!lock); ++actionIter; diff --git a/kshisen/app.h b/kshisen/app.h index 9852c88f..06ac6957 100644 --- a/kshisen/app.h +++ b/kshisen/app.h @@ -59,7 +59,7 @@ struct HighScore const unsigned HIGHSCORE_MAX = 10; -class App : public KMainWindow +class App : public TDEMainWindow { Q_OBJECT @@ -105,7 +105,7 @@ private: bool isBetter(const HighScore &, const HighScore &); void showHighscore(int focusitem = -1); - void initKAction(); + void initTDEAction(); void setCheatMode(); void resetCheatMode(); -- cgit v1.2.1