diff options
Diffstat (limited to 'ksame/KSameWidget.cpp')
-rw-r--r-- | ksame/KSameWidget.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/ksame/KSameWidget.cpp b/ksame/KSameWidget.cpp index a0e0142e..28329b06 100644 --- a/ksame/KSameWidget.cpp +++ b/ksame/KSameWidget.cpp @@ -46,20 +46,20 @@ static int default_colors=3; #define Board KScoreDialog::Custom1 -KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) : - KMainWindow(parent,name,fl) +KSameWidget::KSameWidget(TQWidget *tqparent, const char* name, WFlags fl) : + KMainWindow(tqparent,name,fl) { - KStdGameAction::gameNew(this, TQT_SLOT(m_new()), actionCollection(), "game_new"); - restart = new KAction(i18n("&Restart This Board"), CTRL+Key_R, this, + KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(m_new()), actionCollection(), "game_new"); + restart = new KAction(i18n("&Restart This Board"), CTRL+Key_R, TQT_TQOBJECT(this), TQT_SLOT(m_restart()), actionCollection(), "game_restart"); - KStdGameAction::highscores(this, TQT_SLOT(m_showhs()), actionCollection(), "game_highscores"); - KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection(), "game_quit"); - undo = KStdGameAction::undo(this, TQT_SLOT(m_undo()), actionCollection(), "edit_undo"); + KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(m_showhs()), actionCollection(), "game_highscores"); + KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection(), "game_quit"); + undo = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(m_undo()), actionCollection(), "edit_undo"); random = new KToggleAction(i18n("&Random Board"), 0, 0, 0, actionCollection(), "random_board"); - showNumberRemaining = new KToggleAction(i18n("&Show Number Remaining"), 0, this, TQT_SLOT(showNumberRemainingToggled()), actionCollection(), "showNumberRemaining"); + showNumberRemaining = new KToggleAction(i18n("&Show Number Remaining"), 0, TQT_TQOBJECT(this), TQT_SLOT(showNumberRemainingToggled()), actionCollection(), "showNumberRemaining"); - KStdAction::configureNotifications(this, TQT_SLOT(configureNotifications()), + KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(configureNotifications()), actionCollection()); status=statusBar(); @@ -70,14 +70,14 @@ KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) : stone = new StoneWidget(this,15,10); - connect( stone, TQT_SIGNAL(s_gameover()), this, TQT_SLOT(gameover())); - connect( stone, TQT_SIGNAL(s_colors(int)), this, TQT_SLOT(setColors(int))); - connect( stone, TQT_SIGNAL(s_board(int)), this, TQT_SLOT(setBoard(int))); - connect( stone, TQT_SIGNAL(s_marked(int)), this, TQT_SLOT(setMarked(int))); - connect( stone, TQT_SIGNAL(s_score(int)), this, TQT_SLOT(setScore(int))); - connect( stone, TQT_SIGNAL(s_remove(int,int)), this, TQT_SLOT(stonesRemoved(int,int))); + connect( stone, TQT_SIGNAL(s_gameover()), TQT_TQOBJECT(this), TQT_SLOT(gameover())); + connect( stone, TQT_SIGNAL(s_colors(int)), TQT_TQOBJECT(this), TQT_SLOT(setColors(int))); + connect( stone, TQT_SIGNAL(s_board(int)), TQT_TQOBJECT(this), TQT_SLOT(setBoard(int))); + connect( stone, TQT_SIGNAL(s_marked(int)), TQT_TQOBJECT(this), TQT_SLOT(setMarked(int))); + connect( stone, TQT_SIGNAL(s_score(int)), TQT_TQOBJECT(this), TQT_SLOT(setScore(int))); + connect( stone, TQT_SIGNAL(s_remove(int,int)), TQT_TQOBJECT(this), TQT_SLOT(stonesRemoved(int,int))); - connect(stone, TQT_SIGNAL(s_sizechanged()), this, TQT_SLOT(sizeChanged())); + connect(stone, TQT_SIGNAL(s_sizechanged()), TQT_TQOBJECT(this), TQT_SLOT(sizeChanged())); sizeChanged(); setCentralWidget(stone); @@ -113,7 +113,7 @@ void KSameWidget::saveProperties(KConfig *conf) { } void KSameWidget::sizeChanged() { - stone->setFixedSize(stone->sizeHint()); + stone->setFixedSize(stone->tqsizeHint()); } void KSameWidget::showNumberRemainingToggled() @@ -121,11 +121,11 @@ void KSameWidget::showNumberRemainingToggled() if(showNumberRemaining->isChecked()){ TQStringList list; for(int i=1;i<=stone->colors();i++) - list.append(TQString("%1").arg(stone->count(i))); - TQString count = TQString(" (%1)").arg(list.join(",")); - status->changeItem(i18n("%1 Colors%2").arg(stone->colors()).arg(count),1); + list.append(TQString("%1").tqarg(stone->count(i))); + TQString count = TQString(" (%1)").tqarg(list.join(",")); + status->changeItem(i18n("%1 Colors%2").tqarg(stone->colors()).tqarg(count),1); } - else status->changeItem(i18n("%1 Colors").arg(stone->colors()),1); + else status->changeItem(i18n("%1 Colors").tqarg(stone->colors()),1); KConfig *cfg = kapp->config(); cfg->writeEntry("showRemaining", showNumberRemaining->isChecked()); @@ -162,7 +162,7 @@ void KSameWidget::m_new() { bno.setRange(0, 1000000, 1); bno.setLabel(i18n("Select a board:")); bno.setFocus(); - bno.setFixedSize(bno.sizeHint()); + bno.setFixedSize(bno.tqsizeHint()); bno.setValue(stone->board()); if (dlg.exec()) newGame(bno.value(),default_colors); @@ -188,15 +188,15 @@ void KSameWidget::m_showhs() { } void KSameWidget::setColors(int colors) { - status->changeItem(i18n("%1 Colors").arg(colors),1); + status->changeItem(i18n("%1 Colors").tqarg(colors),1); } void KSameWidget::setBoard(int board) { - status->changeItem(i18n("Board: %1").arg(board, 6), 2); + status->changeItem(i18n("Board: %1").tqarg(board, 6), 2); } void KSameWidget::setMarked(int m) { - status->changeItem(i18n("Marked: %1").arg(m, 6),3); + status->changeItem(i18n("Marked: %1").tqarg(m, 6),3); m_markedStones=m; } @@ -209,11 +209,11 @@ void KSameWidget::setScore(int score) { if(showNumberRemaining->isChecked()){ TQStringList list; for(int i=1;i<=stone->colors();i++) - list.append(TQString("%1").arg(stone->count(i))); - TQString count = TQString(" (%1)").arg(list.join(",")); - status->changeItem(i18n("%1 Colors%2").arg(stone->colors()).arg(count),1); + list.append(TQString("%1").tqarg(stone->count(i))); + TQString count = TQString(" (%1)").tqarg(list.join(",")); + status->changeItem(i18n("%1 Colors%2").tqarg(stone->colors()).tqarg(count),1); } - status->changeItem(i18n("Score: %1").arg(score, 6),4); + status->changeItem(i18n("Score: %1").tqarg(score, 6),4); undo->setEnabled(stone->undoPossible()); restart->setEnabled(!stone->isOriginalBoard()); } @@ -222,11 +222,11 @@ void KSameWidget::gameover() { if (stone->hasBonus()) { KNotifyClient::event(winId(), "game won", i18n("You even removed the last stone, great job! " - "This gave you a score of %1 in total.").arg(stone->score())); + "This gave you a score of %1 in total.").tqarg(stone->score())); } else { KNotifyClient::event(winId(), "game over", i18n("There are no more removeable stones. " - "You got a score of %1 in total.").arg(stone->score())); + "You got a score of %1 in total.").tqarg(stone->score())); } stone->unmark(); KScoreDialog d(KScoreDialog::Name | KScoreDialog::Score, this); |