summaryrefslogtreecommitdiffstats
path: root/kgoldrunner/src/kgrgame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kgoldrunner/src/kgrgame.cpp')
-rw-r--r--kgoldrunner/src/kgrgame.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kgoldrunner/src/kgrgame.cpp b/kgoldrunner/src/kgrgame.cpp
index a52abe01..6962d7a1 100644
--- a/kgoldrunner/src/kgrgame.cpp
+++ b/kgoldrunner/src/kgrgame.cpp
@@ -190,7 +190,7 @@ void KGrGame::goUpOneLevel()
KGrMessage::information (view, collection->name,
i18n("<b>CONGRATULATIONS !!!!</b>"
"<p>You have conquered the last level in the %1 game !!</p>")
- .tqarg("<b>\"" + collection->name + "\"</b>"));
+ .arg("<b>\"" + collection->name + "\"</b>"));
checkHighScore(); // Check if there is a high score for this game.
unfreeze();
@@ -384,7 +384,7 @@ void KGrGame::startTutorial()
KGrMessage::information (view, i18n("Start Tutorial"),
i18n("Cannot find the tutorial game (file-prefix %1) in "
"the %2 files.")
- .tqarg("'tute'").tqarg("'games.dat'"));
+ .arg("'tute'").arg("'games.dat'"));
}
}
@@ -514,14 +514,14 @@ bool KGrGame::openLevelFile (int levelNo, TQFile & openlevel)
KGrMessage::information (view, i18n("Load Level"),
i18n("Cannot find file '%1'. Please make sure '%2' has been "
"run in the '%3' folder.")
- .tqarg(filePath).tqarg("tar xf levels.tar").tqarg(systemDataDir.myStr()));
+ .arg(filePath).arg("tar xf levels.tar").arg(systemDataDir.myStr()));
return (FALSE);
}
// �ffne Level zum lesen
if (! openlevel.open (IO_ReadOnly)) {
KGrMessage::information (view, i18n("Load Level"),
- i18n("Cannot open file '%1' for read-only.").tqarg(filePath));
+ i18n("Cannot open file '%1' for read-only.").arg(filePath));
return (FALSE);
}
@@ -769,7 +769,7 @@ void KGrGame::saveGame() // Save game ID, score and level.
{
if (editMode) {myMessage (view, i18n("Save Game"),
i18n("Sorry, you cannot save your game play while you are editing. "
- "Please try menu item %1.").tqarg("\"" + i18n("&Save Edits...") + "\""));
+ "Please try menu item %1.").arg("\"" + i18n("&Save Edits...") + "\""));
return;
}
if (hero->started) {myMessage (view, i18n("Save Game"),
@@ -778,7 +778,7 @@ void KGrGame::saveGame() // Save game ID, score and level.
"level, not as they are now."));
}
- TQDate today = TQDate::tqcurrentDate();
+ TQDate today = TQDate::currentDate();
TQTime now = TQTime::currentTime();
TQString saved;
TQString day;
@@ -800,7 +800,7 @@ void KGrGame::saveGame() // Save game ID, score and level.
if (! file2.open (IO_WriteOnly)) {
KGrMessage::information (view, i18n("Save Game"),
i18n("Cannot open file '%1' for output.")
- .tqarg(userDataDir + "savegame.tmp"));
+ .arg(userDataDir + "savegame.tmp"));
return;
}
TQTextStream text2 (&file2);
@@ -810,7 +810,7 @@ void KGrGame::saveGame() // Save game ID, score and level.
if (! file1.open (IO_ReadOnly)) {
KGrMessage::information (view, i18n("Save Game"),
i18n("Cannot open file '%1' for read-only.")
- .tqarg(userDataDir + "savegame.dat"));
+ .arg(userDataDir + "savegame.dat"));
return;
}
@@ -848,7 +848,7 @@ void KGrGame::loadGame() // Re-load game, score and level.
if (! savedGames.open (IO_ReadOnly)) {
KGrMessage::information (view, i18n("Load Game"),
i18n("Cannot open file '%1' for read-only.")
- .tqarg(userDataDir + "savegame.dat"));
+ .arg(userDataDir + "savegame.dat"));
return;
}
@@ -899,7 +899,7 @@ void KGrGame::loadGame() // Re-load game, score and level.
}
else {
KGrMessage::information (view, i18n("Load Game"),
- i18n("Cannot find the game with prefix '%1'.").tqarg(pr));
+ i18n("Cannot find the game with prefix '%1'.").arg(pr));
}
}
@@ -947,7 +947,7 @@ void KGrGame::checkHighScore()
if (! high1.open (IO_ReadOnly)) {
TQString high1_name = high1.name();
KGrMessage::information (view, i18n("Check for High Score"),
- i18n("Cannot open file '%1' for read-only.").tqarg(high1_name));
+ i18n("Cannot open file '%1' for read-only.").arg(high1_name));
return;
}
@@ -987,7 +987,7 @@ void KGrGame::checkHighScore()
if (! high2.open (IO_WriteOnly)) {
KGrMessage::information (view, i18n("Check for High Score"),
i18n("Cannot open file '%1' for output.")
- .tqarg(userDataDir + "hi_" + collection->prefix + ".tmp"));
+ .arg(userDataDir + "hi_" + collection->prefix + ".tmp"));
return;
}
@@ -1034,7 +1034,7 @@ void KGrGame::checkHighScore()
delete hsn;
- TQDate today = TQDate::tqcurrentDate();
+ TQDate today = TQDate::currentDate();
TQString hsDate;
#ifdef QT3
TQString day = today.shortDayName(today.dayOfWeek());
@@ -1132,7 +1132,7 @@ void KGrGame::showHighScores()
if (! high1.exists()) {
KGrMessage::information (view, i18n("Show High Scores"),
i18n("Sorry, there are no high scores for the %1 game yet.")
- .tqarg("\"" + collection->name + "\""));
+ .arg("\"" + collection->name + "\""));
return;
}
}
@@ -1140,7 +1140,7 @@ void KGrGame::showHighScores()
if (! high1.open (IO_ReadOnly)) {
TQString high1_name = high1.name();
KGrMessage::information (view, i18n("Show High Scores"),
- i18n("Cannot open file '%1' for read-only.").tqarg(high1_name));
+ i18n("Cannot open file '%1' for read-only.").arg(high1_name));
return;
}
@@ -1154,7 +1154,7 @@ void KGrGame::showHighScores()
TQLabel * hsHeader = new TQLabel (i18n (
"<center><h2>KGoldrunner Hall of Fame</h2></center><br>"
"<center><h3>\"%1\" Game</h3></center>")
- .tqarg(collection->name),
+ .arg(collection->name),
hs);
TQLabel * hsColHeader = new TQLabel (
i18n(" Name "
@@ -1584,7 +1584,7 @@ bool KGrGame::saveLevelFile()
// Open the output file.
if (! levelFile.open (IO_WriteOnly)) {
KGrMessage::information (view, i18n("Save Level"),
- i18n("Cannot open file '%1' for output.").tqarg(filePath));
+ i18n("Cannot open file '%1' for output.").arg(filePath));
return (FALSE);
}
@@ -1642,8 +1642,8 @@ void KGrGame::moveLevelFile ()
KGrMessage::information (view, i18n("Move Level"),
i18n("You must first load a level to be moved. Use "
"the %1 or %2 menu.")
- .tqarg("\"" + i18n("Game") + "\"")
- .tqarg("\"" + i18n("Editor") + "\""));
+ .arg("\"" + i18n("Game") + "\"")
+ .arg("\"" + i18n("Editor") + "\""));
return;
}
@@ -1780,7 +1780,7 @@ void KGrGame::deleteLevelFile ()
}
else {
KGrMessage::information (view, i18n("Delete Level"),
- i18n("Cannot find file '%1' to be deleted.").tqarg(filePath));
+ i18n("Cannot find file '%1' to be deleted.").arg(filePath));
return;
}
@@ -1883,7 +1883,7 @@ void KGrGame::editCollection (int action)
if (duplicatePrefix) {
KGrMessage::information (view, i18n("Save Game Info"),
i18n("The filename prefix '%1' is already in use.")
- .tqarg(ecPrefix));
+ .arg(ecPrefix));
continue;
}
}
@@ -2061,7 +2061,7 @@ bool KGrGame::reNumberLevels (int cIndex, int first, int last, int inc)
if (! dir.rename (file1, file2, TRUE)) { // Allow absolute paths.
KGrMessage::information (view, i18n("Save Level"),
i18n("Cannot rename file '%1' to '%2'.")
- .tqarg(file1).tqarg(file2));
+ .arg(file1).arg(file2));
return (FALSE);
}
i = i + step;
@@ -2181,8 +2181,8 @@ int KGrGame::selectLevel (int action, int requestedLevel)
KGrMessage::information (view, i18n("Select Level"),
i18n("There is no level %1 in %2, "
"so you cannot play or edit it.")
- .tqarg(selectedLevel)
- .tqarg("\"" + collections.at(selectedGame)->name + "\""));
+ .arg(selectedLevel)
+ .arg("\"" + collections.at(selectedGame)->name + "\""));
selectedLevel = 0; // Set an invalid selection.
continue; // Re-run the dialog box.
}
@@ -2372,10 +2372,10 @@ void KGrGame::mapCollections()
i18n("There is no folder '%1' to hold levels for"
" the '%2' game. Please make sure '%3' "
"has been run in the '%4' folder.")
- .tqarg(d_path)
- .tqarg(colln->name)
- .tqarg("tar xf levels.tar")
- .tqarg(systemDataDir));
+ .arg(d_path)
+ .arg(colln->name)
+ .arg("tar xf levels.tar")
+ .arg(systemDataDir));
}
continue;
}
@@ -2388,9 +2388,9 @@ void KGrGame::mapCollections()
if ((files->count() <= 0) && (colln->nLevels > 0)) {
KGrMessage::information (view, i18n("Check Games & Levels"),
i18n("There are no files '%1/%2???.grl' for the %3 game.")
- .tqarg(d_path)
- .tqarg(colln->prefix)
- .tqarg("\"" + colln->name + "\""));
+ .arg(d_path)
+ .arg(colln->prefix)
+ .arg("\"" + colln->name + "\""));
continue;
}
@@ -2413,8 +2413,8 @@ void KGrGame::mapCollections()
i18n("Check Games & Levels"),
i18n("File '%1' is beyond the highest level for "
"the %2 game and cannot be played.")
- .tqarg(fileName1)
- .tqarg("\"" + colln->name + "\""));
+ .arg(fileName1)
+ .arg("\"" + colln->name + "\""));
break;
}
else if (fileName1 == fileName2) {
@@ -2426,16 +2426,16 @@ void KGrGame::mapCollections()
i18n("Check Games & Levels"),
i18n("File '%1' is before the lowest level for "
"the %2 game and cannot be played.")
- .tqarg(fileName1)
- .tqarg("\"" + colln->name + "\""));
+ .arg(fileName1)
+ .arg("\"" + colln->name + "\""));
break;
}
else {
KGrMessage::information (view,
i18n("Check Games & Levels"),
i18n("Cannot find file '%1' for the %2 game.")
- .tqarg(fileName2)
- .tqarg("\"" + colln->name + "\""));
+ .arg(fileName2)
+ .arg("\"" + colln->name + "\""));
lev++;
}
}
@@ -2457,14 +2457,14 @@ bool KGrGame::loadCollections (Owner o)
if (o == SYSTEM) {
KGrMessage::information (view, i18n("Load Game Info"),
i18n("Cannot find game info file '%1'.")
- .tqarg(filePath));
+ .arg(filePath));
}
return (FALSE);
}
if (! c.open (IO_ReadOnly)) {
KGrMessage::information (view, i18n("Load Game Info"),
- i18n("Cannot open file '%1' for read-only.").tqarg(filePath));
+ i18n("Cannot open file '%1' for read-only.").arg(filePath));
return (FALSE);
}
@@ -2513,7 +2513,7 @@ bool KGrGame::loadCollections (Owner o)
// Not EOF: it's an empty line or out-of-context "about" line.
KGrMessage::information (view, i18n("Load Game Info"),
i18n("Format error in game info file '%1'.")
- .tqarg(filePath));
+ .arg(filePath));
c.close();
return (FALSE);
}
@@ -2542,7 +2542,7 @@ bool KGrGame::saveCollections (Owner o)
// Open the output file.
if (! c.open (IO_WriteOnly)) {
KGrMessage::information (view, i18n("Save Game Info"),
- i18n("Cannot open file '%1' for output.").tqarg(filePath));
+ i18n("Cannot open file '%1' for output.").arg(filePath));
return (FALSE);
}