summaryrefslogtreecommitdiffstats
path: root/kmahjongg/kmahjongg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmahjongg/kmahjongg.cpp')
-rw-r--r--kmahjongg/kmahjongg.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kmahjongg/kmahjongg.cpp b/kmahjongg/kmahjongg.cpp
index dd49fedd..d9f20522 100644
--- a/kmahjongg/kmahjongg.cpp
+++ b/kmahjongg/kmahjongg.cpp
@@ -4,7 +4,7 @@
kmahjongg, the classic mahjongg game for KDE project
- Requires the Qt widget libraries, available at no cost at
+ Requires the TQt widget libraries, available at no cost at
http://www.troll.no
Copyright (C) 1997 Mathias Mueller <in5y158@public.uni-hamburg.de>
@@ -57,8 +57,8 @@ int is_paused = 0;
/**
Constructor.
*/
-KMahjongg::KMahjongg( TQWidget* parent, const char *name)
- : KMainWindow(parent, name)
+KMahjongg::KMahjongg( TQWidget* tqparent, const char *name)
+ : KMainWindow(tqparent, name)
{
boardEditor = 0;
@@ -100,7 +100,7 @@ KMahjongg::KMahjongg( TQWidget* parent, const char *name)
connect( previewLoad, TQT_SIGNAL( boardRedraw(bool) ),
bw, TQT_SLOT( drawBoard(bool) ) );
- connect( previewLoad, TQT_SIGNAL( layoutChange() ),
+ connect( previewLoad, TQT_SIGNAL( tqlayoutChange() ),
this, TQT_SLOT( newGame() ) );
@@ -128,41 +128,41 @@ KMahjongg::~KMahjongg()
void KMahjongg::setupKAction()
{
// game
- KStdGameAction::gameNew(this, TQT_SLOT(newGame()), actionCollection());
- KStdGameAction::load(this, TQT_SLOT(loadGame()), actionCollection());
- KStdGameAction::save(this, TQT_SLOT(saveGame()), actionCollection());
- KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
- KStdGameAction::restart(this, TQT_SLOT(restartGame()), actionCollection());
- new KAction(i18n("New Numbered Game..."), "newnum", 0, this, TQT_SLOT(startNewNumeric()), actionCollection(), "game_new_numeric");
- new KAction(i18n("Open Th&eme..."), 0, this, TQT_SLOT(openTheme()), actionCollection(), "game_open_theme");
- new KAction(i18n("Open &Tileset..."), 0, this, TQT_SLOT(openTileset()), actionCollection(), "game_open_tileset");
- new KAction(i18n("Open &Background..."), 0, this, TQT_SLOT(openBackground()), actionCollection(), "game_open_background");
- new KAction(i18n("Open La&yout..."), 0, this, TQT_SLOT(openLayout()), actionCollection(), "game_open_layout");
- new KAction(i18n("Sa&ve Theme..."), 0, this, TQT_SLOT(saveTheme()), actionCollection(), "game_save_theme");
+ KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection());
+ KStdGameAction::load(TQT_TQOBJECT(this), TQT_SLOT(loadGame()), actionCollection());
+ 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");
// originally "file" ends here
- KStdGameAction::hint(bw, TQT_SLOT(helpMove()), actionCollection());
- new KAction(i18n("Shu&ffle"), "reload", 0, bw, TQT_SLOT(shuffle()), actionCollection(), "move_shuffle");
- demoAction = KStdGameAction::demo(this, TQT_SLOT(demoMode()), actionCollection());
- showMatchingTilesAction = new KToggleAction(i18n("Show &Matching Tiles"), 0, this, TQT_SLOT(showMatchingTiles()), actionCollection(), "options_show_matching_tiles");
+ 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");
+ 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->setCheckedState(i18n("Hide &Matching Tiles"));
showMatchingTilesAction->setChecked(Prefs::showMatchingTiles());
bw->setShowMatch( Prefs::showMatchingTiles() );
- KStdGameAction::highscores(this, TQT_SLOT(showHighscores()), actionCollection());
- pauseAction = KStdGameAction::pause(this, TQT_SLOT(pause()), actionCollection());
+ KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighscores()), actionCollection());
+ pauseAction = KStdGameAction::pause(TQT_TQOBJECT(this), TQT_SLOT(pause()), actionCollection());
// TODO: store the background ; open on startup
- // TODO: same about layout
+ // TODO: same about tqlayout
// TODO: same about theme
// move
- undoAction = KStdGameAction::undo(this, TQT_SLOT(undo()), actionCollection());
- redoAction = KStdGameAction::redo(this, TQT_SLOT(redo()), actionCollection());
+ undoAction = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection());
+ redoAction = KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection());
// edit
- new KAction(i18n("&Board Editor"), 0, this, TQT_SLOT(slotBoardEditor()), actionCollection(), "edit_board_editor");
+ new KAction(i18n("&Board Editor"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBoardEditor()), actionCollection(), "edit_board_editor");
// settings
- KStdAction::preferences(this, TQT_SLOT(showSettings()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection());
setupGUI();
}
@@ -179,19 +179,19 @@ void KMahjongg::setupStatusBar()
tilesLeftLabel= new TQLabel("Removed: 0000/0000", statusBar());
tilesLeftLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- statusBar()->addWidget(tilesLeftLabel, tilesLeftLabel->sizeHint().width(), ID_STATUS_GAME);
+ statusBar()->addWidget(tilesLeftLabel, tilesLeftLabel->tqsizeHint().width(), ID_STATUS_GAME);
gameNumLabel = new TQLabel("Game: 000000000000000000000", statusBar());
gameNumLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- statusBar()->addWidget(gameNumLabel, gameNumLabel->sizeHint().width(), ID_STATUS_TILENUMBER);
+ statusBar()->addWidget(gameNumLabel, gameNumLabel->tqsizeHint().width(), ID_STATUS_TILENUMBER);
statusLabel= new TQLabel("Kmahjongg", statusBar());
statusLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- statusBar()->addWidget(statusLabel, statusLabel->sizeHint().width(), ID_STATUS_MESSAGE);
+ statusBar()->addWidget(statusLabel, statusLabel->tqsizeHint().width(), ID_STATUS_MESSAGE);
- // pStatusBar->setAlignment( ID_STATUS_TILENUMBER, AlignCenter );
+ // pStatusBar->tqsetAlignment( ID_STATUS_TILENUMBER, AlignCenter );
}
void KMahjongg::setDisplayedWidth()
@@ -239,7 +239,7 @@ void KMahjongg::showSettings(){
KConfigDialog *dialog = new KConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings");
connect(dialog, TQT_SIGNAL(settingsChanged()), bw, TQT_SLOT(loadSettings()));
- connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(setDisplayedWidth()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(setDisplayedWidth()));
dialog->show();
}
@@ -397,7 +397,7 @@ void KMahjongg::gameOver(
void KMahjongg::showStatusText( const TQString &msg, long board )
{
statusLabel->setText(msg);
- TQString str = i18n("Game number: %1").arg(board);
+ TQString str = i18n("Game number: %1").tqarg(board);
gameNumLabel->setText(str);
}
@@ -406,8 +406,8 @@ void KMahjongg::showStatusText( const TQString &msg, long board )
void KMahjongg::showTileNumber( int iMaximum, int iCurrent, int iLeft )
{
// Hmm... seems iCurrent is the number of remaining tiles, not removed ...
- //TQString szBuffer = i18n("Removed: %1/%2").arg(iCurrent).arg(iMaximum);
- TQString szBuffer = i18n("Removed: %1/%2 Combinations left: %3").arg(iMaximum-iCurrent).arg(iMaximum).arg(iLeft);
+ //TQString szBuffer = i18n("Removed: %1/%2").tqarg(iCurrent).tqarg(iMaximum);
+ TQString szBuffer = i18n("Removed: %1/%2 Combinations left: %3").tqarg(iMaximum-iCurrent).tqarg(iMaximum).tqarg(iLeft);
tilesLeftLabel->setText(szBuffer);
// Update here since undo allow is effected by demo mode