summaryrefslogtreecommitdiffstats
path: root/kmahjongg
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 15:12:46 -0600
committerTimothy Pearson <[email protected]>2013-02-01 15:12:46 -0600
commit58a97ed3af5e4df6c4a58d043b0c267bd97056a9 (patch)
tree5a2fde6842fd422cae2d8670d382be965098cc32 /kmahjongg
parent2ce15ee76fd2d9d18a63c035a0f5b00b94c60cdc (diff)
downloadtdegames-58a97ed3af5e4df6c4a58d043b0c267bd97056a9.tar.gz
tdegames-58a97ed3af5e4df6c4a58d043b0c267bd97056a9.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kmahjongg')
-rw-r--r--kmahjongg/Editor.cpp6
-rw-r--r--kmahjongg/Editor.h2
-rw-r--r--kmahjongg/kmahjongg.cpp24
-rw-r--r--kmahjongg/kmahjongg.h10
4 files changed, 21 insertions, 21 deletions
diff --git a/kmahjongg/Editor.cpp b/kmahjongg/Editor.cpp
index 8e143107..3d3166ca 100644
--- a/kmahjongg/Editor.cpp
+++ b/kmahjongg/Editor.cpp
@@ -106,8 +106,8 @@ void Editor::setupToolbar()
{
KIconLoader *loader = TDEGlobal::iconLoader();
- topToolbar = new KToolBar( this, "editToolBar" );
- KToolBarRadioGroup *radio = new KToolBarRadioGroup(topToolbar);
+ topToolbar = new TDEToolBar( this, "editToolBar" );
+ TDEToolBarRadioGroup *radio = new TDEToolBarRadioGroup(topToolbar);
// new game
topToolbar->insertButton(loader->loadIcon("filenew", KIcon::Toolbar),
@@ -180,7 +180,7 @@ void Editor::setupToolbar()
topToolbar->updateRects(0);
topToolbar->setFullSize(true);
- topToolbar->setBarPos(KToolBar::Top);
+ topToolbar->setBarPos(TDEToolBar::Top);
// topToolbar->enableMoving(false);
topToolbar->adjustSize();
setMinimumWidth(topToolbar->width());
diff --git a/kmahjongg/Editor.h b/kmahjongg/Editor.h
index 61634ae4..53537ba1 100644
--- a/kmahjongg/Editor.h
+++ b/kmahjongg/Editor.h
@@ -55,7 +55,7 @@ protected:
private:
int mode;
int numTiles;
- KToolBar *topToolbar;
+ TDEToolBar *topToolbar;
FrameImage * drawFrame;
Tileset tiles;
BoardLayout theBoard;
diff --git a/kmahjongg/kmahjongg.cpp b/kmahjongg/kmahjongg.cpp
index 6a63abc4..a55c7769 100644
--- a/kmahjongg/kmahjongg.cpp
+++ b/kmahjongg/kmahjongg.cpp
@@ -58,7 +58,7 @@ int is_paused = 0;
Constructor.
*/
KMahjongg::KMahjongg( TQWidget* parent, const char *name)
- : KMainWindow(parent, name)
+ : TDEMainWindow(parent, name)
{
boardEditor = 0;
@@ -69,7 +69,7 @@ KMahjongg::KMahjongg( TQWidget* parent, const char *name)
previewLoad = new Preview(this);
setupStatusBar();
- setupKAction();
+ setupTDEAction();
gameTimer = new GameTimer(toolBar());
toolBar()->insertWidget(ID_GAME_TIMER, gameTimer->width() , gameTimer);
@@ -125,7 +125,7 @@ KMahjongg::~KMahjongg()
}
// ---------------------------------------------------------
-void KMahjongg::setupKAction()
+void KMahjongg::setupTDEAction()
{
// game
KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection());
@@ -133,17 +133,17 @@ void KMahjongg::setupKAction()
KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(saveGame()), actionCollection());
KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
KStdGameAction::restart(TQT_TQOBJECT(this), TQT_SLOT(restartGame()), actionCollection());
- new KAction(i18n("New Numbered Game..."), "newnum", 0, TQT_TQOBJECT(this), TQT_SLOT(startNewNumeric()), actionCollection(), "game_new_numeric");
- new KAction(i18n("Open Th&eme..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openTheme()), actionCollection(), "game_open_theme");
- new KAction(i18n("Open &Tileset..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openTileset()), actionCollection(), "game_open_tileset");
- new KAction(i18n("Open &Background..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openBackground()), actionCollection(), "game_open_background");
- new KAction(i18n("Open La&yout..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openLayout()), actionCollection(), "game_open_layout");
- new KAction(i18n("Sa&ve Theme..."), 0, TQT_TQOBJECT(this), TQT_SLOT(saveTheme()), actionCollection(), "game_save_theme");
+ new TDEAction(i18n("New Numbered Game..."), "newnum", 0, TQT_TQOBJECT(this), TQT_SLOT(startNewNumeric()), actionCollection(), "game_new_numeric");
+ new TDEAction(i18n("Open Th&eme..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openTheme()), actionCollection(), "game_open_theme");
+ new TDEAction(i18n("Open &Tileset..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openTileset()), actionCollection(), "game_open_tileset");
+ new TDEAction(i18n("Open &Background..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openBackground()), actionCollection(), "game_open_background");
+ new TDEAction(i18n("Open La&yout..."), 0, TQT_TQOBJECT(this), TQT_SLOT(openLayout()), actionCollection(), "game_open_layout");
+ new TDEAction(i18n("Sa&ve Theme..."), 0, TQT_TQOBJECT(this), TQT_SLOT(saveTheme()), actionCollection(), "game_save_theme");
// originally "file" ends here
KStdGameAction::hint(TQT_TQOBJECT(bw), TQT_SLOT(helpMove()), actionCollection());
- new KAction(i18n("Shu&ffle"), "reload", 0, TQT_TQOBJECT(bw), TQT_SLOT(shuffle()), actionCollection(), "move_shuffle");
+ new TDEAction(i18n("Shu&ffle"), "reload", 0, TQT_TQOBJECT(bw), TQT_SLOT(shuffle()), actionCollection(), "move_shuffle");
demoAction = KStdGameAction::demo(TQT_TQOBJECT(this), TQT_SLOT(demoMode()), actionCollection());
- showMatchingTilesAction = new KToggleAction(i18n("Show &Matching Tiles"), 0, TQT_TQOBJECT(this), TQT_SLOT(showMatchingTiles()), actionCollection(), "options_show_matching_tiles");
+ showMatchingTilesAction = new TDEToggleAction(i18n("Show &Matching Tiles"), 0, TQT_TQOBJECT(this), TQT_SLOT(showMatchingTiles()), actionCollection(), "options_show_matching_tiles");
showMatchingTilesAction->setCheckedState(i18n("Hide &Matching Tiles"));
showMatchingTilesAction->setChecked(Prefs::showMatchingTiles());
bw->setShowMatch( Prefs::showMatchingTiles() );
@@ -159,7 +159,7 @@ void KMahjongg::setupKAction()
redoAction = KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection());
// edit
- new KAction(i18n("&Board Editor"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBoardEditor()), actionCollection(), "edit_board_editor");
+ new TDEAction(i18n("&Board Editor"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBoardEditor()), actionCollection(), "edit_board_editor");
// settings
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection());
diff --git a/kmahjongg/kmahjongg.h b/kmahjongg/kmahjongg.h
index 5bee8b2e..7a0f5839 100644
--- a/kmahjongg/kmahjongg.h
+++ b/kmahjongg/kmahjongg.h
@@ -41,14 +41,14 @@
class GameTimer;
class Editor;
-class KToggleAction;
+class TDEToggleAction;
class TQLabel;
/**
...
@author Mathias
*/
-class KMahjongg : public KMainWindow
+class KMahjongg : public TDEMainWindow
{
Q_OBJECT
@@ -92,7 +92,7 @@ private slots:
void openTileset();
protected:
- void setupKAction();
+ void setupTDEAction();
void setupStatusBar();
private:
@@ -111,8 +111,8 @@ private:
bool bDemoModeActive;
- KToggleAction *showMatchingTilesAction, *pauseAction, *demoAction;
- KAction *undoAction, *redoAction;
+ TDEToggleAction *showMatchingTilesAction, *pauseAction, *demoAction;
+ TDEAction *undoAction, *redoAction;
};