summaryrefslogtreecommitdiffstats
path: root/kwin4/kwin4/kwin4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kwin4/kwin4/kwin4.cpp')
-rw-r--r--kwin4/kwin4/kwin4.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kwin4/kwin4/kwin4.cpp b/kwin4/kwin4/kwin4.cpp
index 16b37da5..84056254 100644
--- a/kwin4/kwin4/kwin4.cpp
+++ b/kwin4/kwin4/kwin4.cpp
@@ -63,8 +63,8 @@
* Constructor for the chat widget. This widget
* is derived from the libkdegames chat widget
*/
-ChatDlg::ChatDlg(KGame *game,TQWidget *parent)
- : KDialogBase(Plain,i18n("Chat Dlg"),Ok,Ok,parent,0,false,true),mChat(0), mChatDlg(0)
+ChatDlg::ChatDlg(KGame *game,TQWidget *tqparent)
+ : KDialogBase(Plain,i18n("Chat Dlg"),Ok,Ok,tqparent,0,false,true),mChat(0), mChatDlg(0)
{
setMinimumSize(TQSize(200,200));
@@ -107,7 +107,7 @@ void ChatDlg::setPlayer(Kwin4Player *p)
/**
* Construct the main application window
*/
-Kwin4App::Kwin4App(TQWidget *parent, const char *name) : KMainWindow(parent,name), view(0), doc(0), mChat(0), mMyChatDlg(0)
+Kwin4App::Kwin4App(TQWidget *tqparent, const char *name) : KMainWindow(tqparent,name), view(0), doc(0), mChat(0), mMyChatDlg(0)
{
initGUI();
initStatusBar();
@@ -138,7 +138,7 @@ Kwin4App::Kwin4App(TQWidget *parent, const char *name) : KMainWindow(parent,name
void Kwin4App::checkMenus(CheckFlags menu)
{
bool localgame=(!doc->isNetwork());
- bool isRunning = (doc->gameStatus()==KGame::Run);
+ bool isRunning = (doc->gametqStatus()==KGame::Run);
if (!menu || (menu&CheckFileMenu))
{
changeAction("hint", !(!isRunning && localgame));
@@ -188,50 +188,50 @@ void Kwin4App::checkMenus(CheckFlags menu)
*/
void Kwin4App::initGUI()
{
- KStdGameAction::gameNew(this, TQT_SLOT(newGame()), actionCollection(), "new_game");
+ KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection(), "new_game");
ACTION("new_game")->setStatusText(i18n("Start a new game"));
- KStdGameAction::load(this, TQT_SLOT(slotOpenGame()), actionCollection(), "open");
+ KStdGameAction::load(TQT_TQOBJECT(this), TQT_SLOT(slotOpenGame()), actionCollection(), "open");
ACTION("open")->setStatusText(i18n("Open a saved game..."));
- KStdGameAction::save(this, TQT_SLOT(slotSaveGame()), actionCollection(), "save");
+ KStdGameAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSaveGame()), actionCollection(), "save");
ACTION("save")->setStatusText(i18n("Save a game..."));
- KStdGameAction::end(this, TQT_SLOT(endGame()), actionCollection(), "end_game");
+ KStdGameAction::end(TQT_TQOBJECT(this), TQT_SLOT(endGame()), actionCollection(), "end_game");
ACTION("end_game")->setStatusText(i18n("Ending the current game..."));
ACTION("end_game")->setWhatsThis(i18n("Aborts a currently played game. No winner will be declared."));
- new KAction(i18n("&Network Configuration..."),0, this, TQT_SLOT(slotInitNetwork()),
+ new KAction(i18n("&Network Configuration..."),0, TQT_TQOBJECT(this), TQT_SLOT(slotInitNetwork()),
actionCollection(), "network_conf");
- new KAction(i18n("Network Chat..."),0, this, TQT_SLOT(slotChat()),
+ new KAction(i18n("Network Chat..."),0, TQT_TQOBJECT(this), TQT_SLOT(slotChat()),
actionCollection(), "network_chat");
if (global_debug>0)
- new KAction(i18n("Debug KGame"), 0, this, TQT_SLOT(slotDebugKGame()),
+ new KAction(i18n("Debug KGame"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDebugKGame()),
actionCollection(), "file_debug");
- new KAction(i18n("&Show Statistics"),"flag", 0, this,
+ new KAction(i18n("&Show Statistics"),"flag", 0, TQT_TQOBJECT(this),
TQT_SLOT(showStatistics()), actionCollection(), "statistics");
ACTION("statistics")->setStatusText(i18n("Show statistics."));
- KStdGameAction::hint(doc, TQT_SLOT(calcHint()), actionCollection(), "hint");
+ KStdGameAction::hint(TQT_TQOBJECT(doc), TQT_SLOT(calcHint()), actionCollection(), "hint");
ACTION("hint")->setStatusText(i18n("Shows a hint on how to move."));
- KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection(), "game_exit");
+ KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection(), "game_exit");
ACTION("game_exit")->setStatusText(i18n("Quits the program."));
- KStdGameAction::undo(this, TQT_SLOT(slotUndo()), actionCollection(), "edit_undo");
+ KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), actionCollection(), "edit_undo");
ACTION("edit_undo")->setStatusText(i18n("Undo last move."));
- KStdGameAction::redo(this, TQT_SLOT(slotRedo()), actionCollection(), "edit_redo");
+ KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(slotRedo()), actionCollection(), "edit_redo");
ACTION("edit_redo")->setStatusText(i18n("Redo last move."));
actionCollection()->setHighlightingEnabled(true);
connect(actionCollection(), TQT_SIGNAL(actionStatusText(const TQString &)), TQT_SLOT(slotStatusMsg(const TQString &)));
connect(actionCollection(), TQT_SIGNAL(clearStatusText()), TQT_SLOT(slotClearStatusText()));
- KStdAction::preferences(this, TQT_SLOT(showSettings()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showSettings()), actionCollection());
}
/**
@@ -338,11 +338,11 @@ void Kwin4App::slotSaveGame()
void Kwin4App::newGame()
{
// End the intro if it is running
- doc->setGameStatus(Kwin4Doc::End);
+ doc->setGametqStatus(Kwin4Doc::End);
// Init the board and Clear the old game out
- doc->setGameStatus(Kwin4Doc::Init);
+ doc->setGametqStatus(Kwin4Doc::Init);
// Run it
- doc->setGameStatus(Kwin4Doc::Run);
+ doc->setGametqStatus(Kwin4Doc::Run);
}
/**
@@ -360,7 +360,7 @@ void Kwin4App::slotNewGame()
*/
void Kwin4App::endGame()
{
- doc->setGameStatus(Kwin4Doc::Abort);
+ doc->setGametqStatus(Kwin4Doc::Abort);
}
/**
@@ -453,7 +453,7 @@ void Kwin4App::EndGame(TABLE mode)
*/
void Kwin4App::slotStatusNames(){
TQString msg;
- if (!(doc->gameStatus()==KGame::Run))
+ if (!(doc->gametqStatus()==KGame::Run))
msg=i18n("No game ");
else if (doc->QueryCurrentPlayer()==Gelb)
msg=TQString(" ")+doc->QueryName(Gelb)+ i18n(" - Yellow ");
@@ -480,7 +480,7 @@ void Kwin4App::slotNetworkBroken(int /*id*/, int oldstatus ,KGame * /*game */)
doc->getPlayer(doc->QueryCurrentPlayer())->setTurn(true,true);
KMessageBox::information(this,i18n("The network game ended!\n"));
- doc->setGameStatus(oldstatus);
+ doc->setGametqStatus(oldstatus);
}
/**
@@ -509,7 +509,7 @@ void Kwin4App::slotGameOver(int status, KPlayer * p, KGame * /*me*/)
EndGame(TWin);
else
EndGame(TLost);
- TQString msg=i18n("%1 won the game. Please restart next round.").arg(doc->QueryName(((FARBE)p->userId())));
+ TQString msg=i18n("%1 won the game. Please restart next round.").tqarg(doc->QueryName(((FARBE)p->userId())));
slotStatusMsg(msg);
}
else if (status==2) // Abort
@@ -527,7 +527,7 @@ void Kwin4App::slotGameOver(int status, KPlayer * p, KGame * /*me*/)
void Kwin4App::slotInitNetwork()
{
- if (doc->gameStatus()==Kwin4Doc::Intro) doc->setGameStatus(Kwin4Doc::Pause);
+ if (doc->gametqStatus()==Kwin4Doc::Intro) doc->setGametqStatus(Kwin4Doc::Pause);
TQString host = Prefs::host();
int port=Prefs::port();
@@ -539,11 +539,11 @@ void Kwin4App::slotInitNetwork()
dlg.networkConfig()->setDiscoveryInfo("_kwin4._tcp",Prefs::gamename());
TQVBox *box=dlg.configPage(KGameDialog::NetworkConfig);
- TQVBoxLayout *l=(TQVBoxLayout *)(box->layout());
+ TQVBoxLayout *l=(TQVBoxLayout *)(box->tqlayout());
mColorGroup=new TQVButtonGroup(box);
- connect(mColorGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotRemoteChanged(int)));
- connect(dlg.networkConfig(), TQT_SIGNAL(signalServerTypeChanged(int)), this, TQT_SLOT(slotServerTypeChanged(int)));
+ connect(mColorGroup, TQT_SIGNAL(clicked(int)), TQT_TQOBJECT(this), TQT_SLOT(slotRemoteChanged(int)));
+ connect(dlg.networkConfig(), TQT_SIGNAL(signalServerTypeChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(slotServerTypeChanged(int)));
new TQRadioButton(i18n("Yellow should be played by remote"), mColorGroup);
new TQRadioButton(i18n("Red should be played by remote"), mColorGroup);