summaryrefslogtreecommitdiffstats
path: root/kolf/kolf.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /kolf/kolf.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolf/kolf.cpp')
-rw-r--r--kolf/kolf.cpp246
1 files changed, 123 insertions, 123 deletions
diff --git a/kolf/kolf.cpp b/kolf/kolf.cpp
index 33155b6a..696ddc72 100644
--- a/kolf/kolf.cpp
+++ b/kolf/kolf.cpp
@@ -19,21 +19,21 @@
#include <kstdgameaction.h>
#include <kstdguiitem.h>
-#include <qcolor.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qobject.h>
-#include <qmap.h>
-#include <qpoint.h>
-#include <qtimer.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qlayout.h>
-#include <qwidget.h>
+#include <tqcolor.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqpoint.h>
+#include <tqtimer.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
#include <stdlib.h>
@@ -62,10 +62,10 @@ Kolf::Kolf()
obj = new ObjectList;
initPlugins();
- filename = QString::null;
- dummy = new QWidget(this);
+ filename = TQString::null;
+ dummy = new TQWidget(this);
setCentralWidget(dummy);
- layout = new QGridLayout(dummy, 3, 1);
+ layout = new TQGridLayout(dummy, 3, 1);
resize(420, 480);
}
@@ -79,75 +79,75 @@ Kolf::~Kolf()
void Kolf::initGUI()
{
- newAction = KStdGameAction::gameNew(this, SLOT(newGame()), actionCollection());
- newAction->setText(newAction->text() + QString("..."));
+ newAction = KStdGameAction::gameNew(this, TQT_SLOT(newGame()), actionCollection());
+ newAction->setText(newAction->text() + TQString("..."));
- endAction = KStdGameAction::end(this, SLOT(closeGame()), actionCollection());
- printAction = KStdGameAction::print(this, SLOT(print()), actionCollection());
+ endAction = KStdGameAction::end(this, TQT_SLOT(closeGame()), actionCollection());
+ printAction = KStdGameAction::print(this, TQT_SLOT(print()), actionCollection());
- (void) KStdGameAction::quit(this, SLOT(close()), actionCollection());
- saveAction = KStdAction::save(this, SLOT(save()), actionCollection(), "game_save");
+ (void) KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
+ saveAction = KStdAction::save(this, TQT_SLOT(save()), actionCollection(), "game_save");
saveAction->setText(i18n("Save &Course"));
- saveAsAction = KStdAction::saveAs(this, SLOT(saveAs()), actionCollection(), "game_save_as");
+ saveAsAction = KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection(), "game_save_as");
saveAsAction->setText(i18n("Save &Course As..."));
- saveGameAction = new KAction(i18n("&Save Game"), 0, this, SLOT(saveGame()), actionCollection(), "savegame");
- saveGameAsAction = new KAction(i18n("&Save Game As..."), 0, this, SLOT(saveGameAs()), actionCollection(), "savegameas");
+ saveGameAction = new KAction(i18n("&Save Game"), 0, this, TQT_SLOT(saveGame()), actionCollection(), "savegame");
+ saveGameAsAction = new KAction(i18n("&Save Game As..."), 0, this, TQT_SLOT(saveGameAs()), actionCollection(), "savegameas");
- loadGameAction = KStdGameAction::load(this, SLOT(loadGame()), actionCollection());
+ loadGameAction = KStdGameAction::load(this, TQT_SLOT(loadGame()), actionCollection());
loadGameAction->setText(i18n("Load Saved Game..."));
- highScoreAction = KStdGameAction::highscores(this, SLOT(showHighScores()), actionCollection());
+ highScoreAction = KStdGameAction::highscores(this, TQT_SLOT(showHighScores()), actionCollection());
- editingAction = new KToggleAction(i18n("&Edit"), "pencil", CTRL+Key_E, this, SLOT(emptySlot()), actionCollection(), "editing");
- newHoleAction = new KAction(i18n("&New"), "filenew", CTRL+SHIFT+Key_N, this, SLOT(emptySlot()), actionCollection(), "newhole");
- clearHoleAction = new KAction(KStdGuiItem::clear().text(), "locationbar_erase", CTRL+Key_Delete, this, SLOT(emptySlot()), actionCollection(), "clearhole");
- resetHoleAction = new KAction(i18n("&Reset"), CTRL+Key_R, this, SLOT(emptySlot()), actionCollection(), "resethole");
- undoShotAction = KStdAction::undo(this, SLOT(emptySlot()), actionCollection(), "undoshot");
+ editingAction = new KToggleAction(i18n("&Edit"), "pencil", CTRL+Key_E, this, TQT_SLOT(emptySlot()), actionCollection(), "editing");
+ newHoleAction = new KAction(i18n("&New"), "filenew", CTRL+SHIFT+Key_N, this, TQT_SLOT(emptySlot()), actionCollection(), "newhole");
+ clearHoleAction = new KAction(KStdGuiItem::clear().text(), "locationbar_erase", CTRL+Key_Delete, this, TQT_SLOT(emptySlot()), actionCollection(), "clearhole");
+ resetHoleAction = new KAction(i18n("&Reset"), CTRL+Key_R, this, TQT_SLOT(emptySlot()), actionCollection(), "resethole");
+ undoShotAction = KStdAction::undo(this, TQT_SLOT(emptySlot()), actionCollection(), "undoshot");
undoShotAction->setText(i18n("&Undo Shot"));
- //replayShotAction = new KAction(i18n("&Replay Shot"), 0, this, SLOT(emptySlot()), actionCollection(), "replay");
+ //replayShotAction = new KAction(i18n("&Replay Shot"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "replay");
- holeAction = new KListAction(i18n("Switch to Hole"), 0, this, SLOT(emptySlot()), actionCollection(), "switchhole");
- nextAction = new KAction(i18n("&Next Hole"), "forward", KStdAccel::shortcut(KStdAccel::Forward), this, SLOT(emptySlot()), actionCollection(), "nexthole");
- prevAction = new KAction(i18n("&Previous Hole"), "back", KStdAccel::shortcut(KStdAccel::Back), this, SLOT(emptySlot()), actionCollection(), "prevhole");
- firstAction = new KAction(i18n("&First Hole"), "gohome", KStdAccel::shortcut(KStdAccel::Home), this, SLOT(emptySlot()), actionCollection(), "firsthole");
- lastAction = new KAction(i18n("&Last Hole"), CTRL+SHIFT+Key_End, this, SLOT(emptySlot()), actionCollection(), "lasthole");
- randAction = new KAction(i18n("&Random Hole"), "goto", 0, this, SLOT(emptySlot()), actionCollection(), "randhole");
+ holeAction = new KListAction(i18n("Switch to Hole"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "switchhole");
+ nextAction = new KAction(i18n("&Next Hole"), "forward", KStdAccel::shortcut(KStdAccel::Forward), this, TQT_SLOT(emptySlot()), actionCollection(), "nexthole");
+ prevAction = new KAction(i18n("&Previous Hole"), "back", KStdAccel::shortcut(KStdAccel::Back), this, TQT_SLOT(emptySlot()), actionCollection(), "prevhole");
+ firstAction = new KAction(i18n("&First Hole"), "gohome", KStdAccel::shortcut(KStdAccel::Home), this, TQT_SLOT(emptySlot()), actionCollection(), "firsthole");
+ lastAction = new KAction(i18n("&Last Hole"), CTRL+SHIFT+Key_End, this, TQT_SLOT(emptySlot()), actionCollection(), "lasthole");
+ randAction = new KAction(i18n("&Random Hole"), "goto", 0, this, TQT_SLOT(emptySlot()), actionCollection(), "randhole");
- useMouseAction = new KToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, this, SLOT(emptySlot()), actionCollection(), "usemouse");
+ useMouseAction = new KToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "usemouse");
useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter"));
- connect(useMouseAction, SIGNAL(toggled(bool)), this, SLOT(useMouseChanged(bool)));
+ connect(useMouseAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(useMouseChanged(bool)));
KConfig *config = kapp->config();
config->setGroup("Settings");
useMouseAction->setChecked(config->readBoolEntry("useMouse", true));
- useAdvancedPuttingAction = new KToggleAction(i18n("Enable &Advanced Putting"), 0, this, SLOT(emptySlot()), actionCollection(), "useadvancedputting");
+ useAdvancedPuttingAction = new KToggleAction(i18n("Enable &Advanced Putting"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "useadvancedputting");
useAdvancedPuttingAction->setCheckedState(i18n("Disable &Advanced Putting"));
- connect(useAdvancedPuttingAction, SIGNAL(toggled(bool)), this, SLOT(useAdvancedPuttingChanged(bool)));
+ connect(useAdvancedPuttingAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(useAdvancedPuttingChanged(bool)));
useAdvancedPuttingAction->setChecked(config->readBoolEntry("useAdvancedPutting", false));
- showInfoAction = new KToggleAction(i18n("Show &Info"), "info", CTRL+Key_I, this, SLOT(emptySlot()), actionCollection(), "showinfo");
+ showInfoAction = new KToggleAction(i18n("Show &Info"), "info", CTRL+Key_I, this, TQT_SLOT(emptySlot()), actionCollection(), "showinfo");
showInfoAction->setCheckedState(i18n("Hide &Info"));
- connect(showInfoAction, SIGNAL(toggled(bool)), this, SLOT(showInfoChanged(bool)));
+ connect(showInfoAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showInfoChanged(bool)));
showInfoAction->setChecked(config->readBoolEntry("showInfo", false));
- showGuideLineAction = new KToggleAction(i18n("Show Putter &Guideline"), 0, this, SLOT(emptySlot()), actionCollection(), "showguideline");
+ showGuideLineAction = new KToggleAction(i18n("Show Putter &Guideline"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "showguideline");
showGuideLineAction->setCheckedState(i18n("Hide Putter &Guideline"));
- connect(showGuideLineAction, SIGNAL(toggled(bool)), this, SLOT(showGuideLineChanged(bool)));
+ connect(showGuideLineAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showGuideLineChanged(bool)));
showGuideLineAction->setChecked(config->readBoolEntry("showGuideLine", true));
- KToggleAction *act=new KToggleAction(i18n("Enable All Dialog Boxes"), 0, this, SLOT(enableAllMessages()), actionCollection(), "enableAll");
+ KToggleAction *act=new KToggleAction(i18n("Enable All Dialog Boxes"), 0, this, TQT_SLOT(enableAllMessages()), actionCollection(), "enableAll");
act->setCheckedState(i18n("Disable All Dialog Boxes"));
- soundAction = new KToggleAction(i18n("Play &Sounds"), 0, this, SLOT(emptySlot()), actionCollection(), "sound");
- connect(soundAction, SIGNAL(toggled(bool)), this, SLOT(soundChanged(bool)));
+ soundAction = new KToggleAction(i18n("Play &Sounds"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "sound");
+ connect(soundAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(soundChanged(bool)));
soundAction->setChecked(config->readBoolEntry("sound", true));
- (void) new KAction(i18n("&Reload Plugins"), 0, this, SLOT(initPlugins()), actionCollection(), "reloadplugins");
- (void) new KAction(i18n("Show &Plugins"), 0, this, SLOT(showPlugins()), actionCollection(), "showplugins");
+ (void) new KAction(i18n("&Reload Plugins"), 0, this, TQT_SLOT(initPlugins()), actionCollection(), "reloadplugins");
+ (void) new KAction(i18n("Show &Plugins"), 0, this, TQT_SLOT(showPlugins()), actionCollection(), "showplugins");
- aboutAction = new KAction(i18n("&About Course"), 0, this, SLOT(emptySlot()), actionCollection(), "aboutcourse");
- tutorialAction = new KAction(i18n("&Tutorial"), 0, this, SLOT(tutorial()), actionCollection(), "tutorial");
+ aboutAction = new KAction(i18n("&About Course"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "aboutcourse");
+ tutorialAction = new KAction(i18n("&Tutorial"), 0, this, TQT_SLOT(tutorial()), actionCollection(), "tutorial");
statusBar();
setupGUI();
@@ -169,7 +169,7 @@ void Kolf::startNewGame()
if (loadedGame.isNull())
{
dialog = new NewGameDialog(filename.isNull(), dummy, "New Game Dialog");
- if (dialog->exec() != QDialog::Accepted)
+ if (dialog->exec() != TQDialog::Accepted)
goto end;
}
@@ -202,7 +202,7 @@ void Kolf::startNewGame()
if (isTutorial)
filename = KGlobal::dirs()->findResource("appdata", "tutorial.kolf");
else
- filename = config.readEntry("Course", QString::null);
+ filename = config.readEntry("Course", TQString::null);
if (filename.isNull())
return;
@@ -223,40 +223,40 @@ void Kolf::startNewGame()
game = new KolfGame(obj, &players, filename, dummy);
game->setStrict(competition);
- connect(game, SIGNAL(newHole(int)), scoreboard, SLOT(newHole(int)));
- connect(game, SIGNAL(scoreChanged(int, int, int)), scoreboard, SLOT(setScore(int, int, int)));
- connect(game, SIGNAL(parChanged(int, int)), scoreboard, SLOT(parChanged(int, int)));
- connect(game, SIGNAL(modifiedChanged(bool)), this, SLOT(updateModified(bool)));
- connect(game, SIGNAL(newPlayersTurn(Player *)), this, SLOT(newPlayersTurn(Player *)));
- connect(game, SIGNAL(holesDone()), this, SLOT(gameOver()));
- connect(game, SIGNAL(checkEditing()), this, SLOT(checkEditing()));
- connect(game, SIGNAL(editingStarted()), this, SLOT(editingStarted()));
- connect(game, SIGNAL(editingEnded()), this, SLOT(editingEnded()));
- connect(game, SIGNAL(inPlayStart()), this, SLOT(inPlayStart()));
- connect(game, SIGNAL(inPlayEnd()), this, SLOT(inPlayEnd()));
- connect(game, SIGNAL(maxStrokesReached(const QString &)), this, SLOT(maxStrokesReached(const QString &)));
- connect(game, SIGNAL(largestHole(int)), this, SLOT(updateHoleMenu(int)));
- connect(game, SIGNAL(titleChanged(const QString &)), this, SLOT(titleChanged(const QString &)));
- connect(game, SIGNAL(newStatusText(const QString &)), this, SLOT(newStatusText(const QString &)));
- connect(game, SIGNAL(currentHole(int)), this, SLOT(setCurrentHole(int)));
- connect(holeAction, SIGNAL(activated(const QString &)), game, SLOT(switchHole(const QString &)));
- connect(nextAction, SIGNAL(activated()), game, SLOT(nextHole()));
- connect(prevAction, SIGNAL(activated()), game, SLOT(prevHole()));
- connect(firstAction, SIGNAL(activated()), game, SLOT(firstHole()));
- connect(lastAction, SIGNAL(activated()), game, SLOT(lastHole()));
- connect(randAction, SIGNAL(activated()), game, SLOT(randHole()));
- connect(editingAction, SIGNAL(activated()), game, SLOT(toggleEditMode()));
- connect(newHoleAction, SIGNAL(activated()), game, SLOT(addNewHole()));
- connect(clearHoleAction, SIGNAL(activated()), game, SLOT(clearHole()));
- connect(resetHoleAction, SIGNAL(activated()), game, SLOT(resetHole()));
- connect(undoShotAction, SIGNAL(activated()), game, SLOT(undoShot()));
- //connect(replayShotAction, SIGNAL(activated()), game, SLOT(replay()));
- connect(aboutAction, SIGNAL(activated()), game, SLOT(showInfoDlg()));
- connect(useMouseAction, SIGNAL(toggled(bool)), game, SLOT(setUseMouse(bool)));
- connect(useAdvancedPuttingAction, SIGNAL(toggled(bool)), game, SLOT(setUseAdvancedPutting(bool)));
- connect(soundAction, SIGNAL(toggled(bool)), game, SLOT(setSound(bool)));
- connect(showGuideLineAction, SIGNAL(toggled(bool)), game, SLOT(setShowGuideLine(bool)));
- connect(showInfoAction, SIGNAL(toggled(bool)), game, SLOT(setShowInfo(bool)));
+ connect(game, TQT_SIGNAL(newHole(int)), scoreboard, TQT_SLOT(newHole(int)));
+ connect(game, TQT_SIGNAL(scoreChanged(int, int, int)), scoreboard, TQT_SLOT(setScore(int, int, int)));
+ connect(game, TQT_SIGNAL(parChanged(int, int)), scoreboard, TQT_SLOT(parChanged(int, int)));
+ connect(game, TQT_SIGNAL(modifiedChanged(bool)), this, TQT_SLOT(updateModified(bool)));
+ connect(game, TQT_SIGNAL(newPlayersTurn(Player *)), this, TQT_SLOT(newPlayersTurn(Player *)));
+ connect(game, TQT_SIGNAL(holesDone()), this, TQT_SLOT(gameOver()));
+ connect(game, TQT_SIGNAL(checkEditing()), this, TQT_SLOT(checkEditing()));
+ connect(game, TQT_SIGNAL(editingStarted()), this, TQT_SLOT(editingStarted()));
+ connect(game, TQT_SIGNAL(editingEnded()), this, TQT_SLOT(editingEnded()));
+ connect(game, TQT_SIGNAL(inPlayStart()), this, TQT_SLOT(inPlayStart()));
+ connect(game, TQT_SIGNAL(inPlayEnd()), this, TQT_SLOT(inPlayEnd()));
+ connect(game, TQT_SIGNAL(maxStrokesReached(const TQString &)), this, TQT_SLOT(maxStrokesReached(const TQString &)));
+ connect(game, TQT_SIGNAL(largestHole(int)), this, TQT_SLOT(updateHoleMenu(int)));
+ connect(game, TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(titleChanged(const TQString &)));
+ connect(game, TQT_SIGNAL(newStatusText(const TQString &)), this, TQT_SLOT(newStatusText(const TQString &)));
+ connect(game, TQT_SIGNAL(currentHole(int)), this, TQT_SLOT(setCurrentHole(int)));
+ connect(holeAction, TQT_SIGNAL(activated(const TQString &)), game, TQT_SLOT(switchHole(const TQString &)));
+ connect(nextAction, TQT_SIGNAL(activated()), game, TQT_SLOT(nextHole()));
+ connect(prevAction, TQT_SIGNAL(activated()), game, TQT_SLOT(prevHole()));
+ connect(firstAction, TQT_SIGNAL(activated()), game, TQT_SLOT(firstHole()));
+ connect(lastAction, TQT_SIGNAL(activated()), game, TQT_SLOT(lastHole()));
+ connect(randAction, TQT_SIGNAL(activated()), game, TQT_SLOT(randHole()));
+ connect(editingAction, TQT_SIGNAL(activated()), game, TQT_SLOT(toggleEditMode()));
+ connect(newHoleAction, TQT_SIGNAL(activated()), game, TQT_SLOT(addNewHole()));
+ connect(clearHoleAction, TQT_SIGNAL(activated()), game, TQT_SLOT(clearHole()));
+ connect(resetHoleAction, TQT_SIGNAL(activated()), game, TQT_SLOT(resetHole()));
+ connect(undoShotAction, TQT_SIGNAL(activated()), game, TQT_SLOT(undoShot()));
+ //connect(replayShotAction, TQT_SIGNAL(activated()), game, TQT_SLOT(replay()));
+ connect(aboutAction, TQT_SIGNAL(activated()), game, TQT_SLOT(showInfoDlg()));
+ connect(useMouseAction, TQT_SIGNAL(toggled(bool)), game, TQT_SLOT(setUseMouse(bool)));
+ connect(useAdvancedPuttingAction, TQT_SIGNAL(toggled(bool)), game, TQT_SLOT(setUseAdvancedPutting(bool)));
+ connect(soundAction, TQT_SIGNAL(toggled(bool)), game, TQT_SLOT(setSound(bool)));
+ connect(showGuideLineAction, TQT_SIGNAL(toggled(bool)), game, TQT_SLOT(setShowGuideLine(bool)));
+ connect(showInfoAction, TQT_SIGNAL(toggled(bool)), game, TQT_SLOT(setShowInfo(bool)));
game->setUseMouse(useMouseAction->isChecked());
game->setUseAdvancedPutting(useAdvancedPuttingAction->isChecked());
@@ -299,23 +299,23 @@ void Kolf::startNewGame()
void Kolf::newGame()
{
isTutorial = false;
- filename = QString::null;
+ filename = TQString::null;
startNewGame();
}
void Kolf::tutorial()
{
- QString newfilename = KGlobal::dirs()->findResource("appdata", "tutorial.kolfgame");
+ TQString newfilename = KGlobal::dirs()->findResource("appdata", "tutorial.kolfgame");
if (newfilename.isNull())
return;
- filename = QString::null;
+ filename = TQString::null;
loadedGame = newfilename;
isTutorial = true;
startNewGame();
- loadedGame = QString::null;
+ loadedGame = TQString::null;
}
void Kolf::closeGame()
@@ -327,12 +327,12 @@ void Kolf::closeGame()
game->pause();
}
- filename = QString::null;
+ filename = TQString::null;
editingEnded();
delete game;
game = 0;
- loadedGame = QString::null;
+ loadedGame = TQString::null;
editingAction->setChecked(false);
setEditingEnabled(false);
@@ -353,10 +353,10 @@ void Kolf::closeGame()
loadGameAction->setEnabled(true);
tutorialAction->setEnabled(true);
- titleChanged(QString::null);
+ titleChanged(TQString::null);
updateModified(false);
- QTimer::singleShot(100, this, SLOT(createSpacer()));
+ TQTimer::singleShot(100, this, TQT_SLOT(createSpacer()));
}
void Kolf::createSpacer()
@@ -386,14 +386,14 @@ void Kolf::gameOver()
int curScore = 1;
// names of people who had the lowest score
- QStringList names;
+ TQStringList names;
HighScoreList highScores;
int scoreBoardIndex = 1;
while (curScore != 0)
{
- QString curName;
+ TQString curName;
// name taken as a reference and filled out
curScore = scoreboard->total(scoreBoardIndex, curName);
@@ -430,7 +430,7 @@ void Kolf::gameOver()
{
if (names.count() > 1)
{
- QString winners = names.join(i18n(" and "));
+ TQString winners = names.join(i18n(" and "));
KMessageBox::information(this, i18n("%1 tied").arg(winners));
}
else
@@ -448,13 +448,13 @@ void Kolf::gameOver()
CourseInfo courseInfo;
game->courseInfo(courseInfo, game->curFilename());
- scoreDialog->setConfigGroup(courseInfo.untranslatedName + QString(" Highscores"));
+ scoreDialog->setConfigGroup(courseInfo.untranslatedName + TQString(" Highscores"));
for (HighScoreList::Iterator it = highScores.begin(); it != highScores.end(); ++it)
{
KScoreDialog::FieldInfo info;
info[KScoreDialog::Name] = (*it).name;
- info[KScoreDialog::Custom1] = QString::number(curPar);
+ info[KScoreDialog::Custom1] = TQString::number(curPar);
scoreDialog->addScore((*it).score, info, false, true);
}
@@ -463,7 +463,7 @@ void Kolf::gameOver()
scoreDialog->show();
}
- QTimer::singleShot(700, this, SLOT(closeGame()));
+ TQTimer::singleShot(700, this, TQT_SLOT(closeGame()));
}
void Kolf::showHighScores()
@@ -474,7 +474,7 @@ void Kolf::showHighScores()
CourseInfo courseInfo;
game->courseInfo(courseInfo, game->curFilename());
- scoreDialog->setConfigGroup(courseInfo.untranslatedName + QString(" Highscores"));
+ scoreDialog->setConfigGroup(courseInfo.untranslatedName + TQString(" Highscores"));
scoreDialog->setComment(i18n("High Scores for %1").arg(courseInfo.name));
scoreDialog->show();
}
@@ -495,7 +495,7 @@ void Kolf::save()
void Kolf::saveAs()
{
- QString newfilename = KFileDialog::getSaveFileName(":kourses", "application/x-kourse", this, i18n("Pick Kolf Course to Save To"));
+ TQString newfilename = KFileDialog::getSaveFileName(":kourses", "application/x-kourse", this, i18n("Pick Kolf Course to Save To"));
if (!newfilename.isNull())
{
filename = newfilename;
@@ -507,7 +507,7 @@ void Kolf::saveAs()
void Kolf::saveGameAs()
{
- QString newfilename = KFileDialog::getSaveFileName(":savedkolf", "application/x-kolf", this, i18n("Pick Saved Game to Save To"));
+ TQString newfilename = KFileDialog::getSaveFileName(":savedkolf", "application/x-kolf", this, i18n("Pick Saved Game to Save To"));
if (newfilename.isNull())
return;
@@ -537,7 +537,7 @@ void Kolf::saveGame()
void Kolf::loadGame()
{
- loadedGame = KFileDialog::getOpenFileName(":savedkolf", QString::fromLatin1("application/x-kolf"), this, i18n("Pick Kolf Saved Game"));
+ loadedGame = KFileDialog::getOpenFileName(":savedkolf", TQString::fromLatin1("application/x-kolf"), this, i18n("Pick Kolf Saved Game"));
if (loadedGame.isNull())
return;
@@ -549,11 +549,11 @@ void Kolf::loadGame()
// called by main for commmand line files
void Kolf::openURL(KURL url)
{
- QString target;
+ TQString target;
if (KIO::NetAccess::download(url, target, this))
{
isTutorial = false;
- QString mimeType = KMimeType::findByPath(target)->name();
+ TQString mimeType = KMimeType::findByPath(target)->name();
if (mimeType == "application/x-kourse")
filename = target;
else if (mimeType == "application/x-kolf")
@@ -564,7 +564,7 @@ void Kolf::openURL(KURL url)
return;
}
- QTimer::singleShot(10, this, SLOT(startNewGame()));
+ TQTimer::singleShot(10, this, TQT_SLOT(startNewGame()));
}
else
closeGame();
@@ -582,7 +582,7 @@ void Kolf::newPlayersTurn(Player *player)
scoreboard->setCurrentCell(player->id() - 1, game->currentHole() - 1);
}
-void Kolf::newStatusText(const QString &text)
+void Kolf::newStatusText(const TQString &text)
{
if (text.isEmpty())
statusBar()->message(tempStatusBarText);
@@ -594,10 +594,10 @@ void Kolf::editingStarted()
{
delete editor;
editor = new Editor(obj, dummy, "Editor");
- connect(editor, SIGNAL(addNewItem(Object *)), game, SLOT(addNewObject(Object *)));
- connect(editor, SIGNAL(changed()), game, SLOT(setModified()));
- connect(editor, SIGNAL(addNewItem(Object *)), this, SLOT(setHoleFocus()));
- connect(game, SIGNAL(newSelectedItem(CanvasItem *)), editor, SLOT(setItem(CanvasItem *)));
+ connect(editor, TQT_SIGNAL(addNewItem(Object *)), game, TQT_SLOT(addNewObject(Object *)));
+ connect(editor, TQT_SIGNAL(changed()), game, TQT_SLOT(setModified()));
+ connect(editor, TQT_SIGNAL(addNewItem(Object *)), this, TQT_SLOT(setHoleFocus()));
+ connect(game, TQT_SIGNAL(newSelectedItem(CanvasItem *)), editor, TQT_SLOT(setItem(CanvasItem *)));
scoreboard->hide();
@@ -641,16 +641,16 @@ void Kolf::inPlayEnd()
setHoleMovementEnabled(true);
}
-void Kolf::maxStrokesReached(const QString &name)
+void Kolf::maxStrokesReached(const TQString &name)
{
KMessageBox::sorry(this, i18n("%1's score has reached the maximum for this hole.").arg(name));
}
void Kolf::updateHoleMenu(int largest)
{
- QStringList items;
+ TQStringList items;
for (int i = 1; i <= largest; ++i)
- items.append(QString::number(i));
+ items.append(TQString::number(i));
// setItems for some reason enables the action
bool shouldbe = holeAction->isEnabled();
@@ -711,7 +711,7 @@ void Kolf::updateModified(bool mod)
titleChanged(title);
}
-void Kolf::titleChanged(const QString &newTitle)
+void Kolf::titleChanged(const TQString &newTitle)
{
title = newTitle;
setCaption(title, courseModified);
@@ -785,7 +785,7 @@ void Kolf::initPlugins()
void Kolf::showPlugins()
{
- QString text = QString("<h2>%1</h2><ol>").arg(i18n("Currently Loaded Plugins"));
+ TQString text = TQString("<h2>%1</h2><ol>").arg(i18n("Currently Loaded Plugins"));
Object *object = 0;
for (object = plugins.first(); object; object = plugins.next())
{