summaryrefslogtreecommitdiffstats
path: root/ktuberling/toplevel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ktuberling/toplevel.cpp')
-rw-r--r--ktuberling/toplevel.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/ktuberling/toplevel.cpp b/ktuberling/toplevel.cpp
index d4ad647c..53566f17 100644
--- a/ktuberling/toplevel.cpp
+++ b/ktuberling/toplevel.cpp
@@ -15,7 +15,7 @@
#include <kstdgameaction.h>
#include <kprinter.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include "toplevel.moc"
#include "playground.h"
@@ -55,27 +55,27 @@ void TopLevel::enableRedo(bool enable) const
}
// Register an available gameboard
-void TopLevel::registerGameboard(const QString &menuItem, const char *actionId)
+void TopLevel::registerGameboard(const TQString &menuItem, const char *actionId)
{
KToggleAction *t = 0;
switch (gameboards)
{
- case 0: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(gameboard0()), actionCollection(), actionId);
+ case 0: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(gameboard0()), actionCollection(), actionId);
break;
- case 1: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(gameboard1()), actionCollection(), actionId);
+ case 1: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(gameboard1()), actionCollection(), actionId);
break;
- case 2: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(gameboard2()), actionCollection(), actionId);
+ case 2: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(gameboard2()), actionCollection(), actionId);
break;
- case 3: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(gameboard3()), actionCollection(), actionId);
+ case 3: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(gameboard3()), actionCollection(), actionId);
break;
- case 4: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(gameboard4()), actionCollection(), actionId);
+ case 4: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(gameboard4()), actionCollection(), actionId);
break;
- case 5: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(gameboard5()), actionCollection(), actionId);
+ case 5: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(gameboard5()), actionCollection(), actionId);
break;
- case 6: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(gameboard6()), actionCollection(), actionId);
+ case 6: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(gameboard6()), actionCollection(), actionId);
break;
- case 7: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(gameboard7()), actionCollection(), actionId);
+ case 7: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(gameboard7()), actionCollection(), actionId);
break;
}
@@ -87,43 +87,43 @@ void TopLevel::registerGameboard(const QString &menuItem, const char *actionId)
}
// Register an available language
-void TopLevel::registerLanguage(const QString &menuItem, const char *actionId, bool enabled)
+void TopLevel::registerLanguage(const TQString &menuItem, const char *actionId, bool enabled)
{
KToggleAction *t = 0;
switch (languages)
{
- case 0: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language0()), actionCollection(), actionId);
+ case 0: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language0()), actionCollection(), actionId);
break;
- case 1: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language1()), actionCollection(), actionId);
+ case 1: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language1()), actionCollection(), actionId);
break;
- case 2: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language2()), actionCollection(), actionId);
+ case 2: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language2()), actionCollection(), actionId);
break;
- case 3: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language3()), actionCollection(), actionId);
+ case 3: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language3()), actionCollection(), actionId);
break;
- case 4: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language4()), actionCollection(), actionId);
+ case 4: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language4()), actionCollection(), actionId);
break;
- case 5: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language5()), actionCollection(), actionId);
+ case 5: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language5()), actionCollection(), actionId);
break;
- case 6: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language6()), actionCollection(), actionId);
+ case 6: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language6()), actionCollection(), actionId);
break;
- case 7: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language7()), actionCollection(), actionId);
+ case 7: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language7()), actionCollection(), actionId);
break;
- case 8: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language8()), actionCollection(), actionId);
+ case 8: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language8()), actionCollection(), actionId);
break;
- case 9: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language9()), actionCollection(), actionId);
+ case 9: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language9()), actionCollection(), actionId);
break;
- case 10: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language10()), actionCollection(), actionId);
+ case 10: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language10()), actionCollection(), actionId);
break;
- case 11: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language11()), actionCollection(), actionId);
+ case 11: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language11()), actionCollection(), actionId);
break;
- case 12: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language12()), actionCollection(), actionId);
+ case 12: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language12()), actionCollection(), actionId);
break;
- case 13: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language13()), actionCollection(), actionId);
+ case 13: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language13()), actionCollection(), actionId);
break;
- case 14: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language14()), actionCollection(), actionId);
+ case 14: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language14()), actionCollection(), actionId);
break;
- case 15: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, SLOT(language15()), actionCollection(), actionId);
+ case 15: t = new KToggleAction(i18n(menuItem.latin1()), 0, this, TQT_SLOT(language15()), actionCollection(), actionId);
break;
}
@@ -187,9 +187,9 @@ void TopLevel::changeLanguage(uint newLanguage)
}
// Load the layouts file
-bool TopLevel::loadLayout(QDomDocument &layoutDocument)
+bool TopLevel::loadLayout(TQDomDocument &layoutDocument)
{
- QFile layoutFile(QFile::encodeName(locate("data", "ktuberling/pics/layout.xml")));
+ TQFile layoutFile(TQFile::encodeName(locate("data", "ktuberling/pics/layout.xml")));
if (!layoutFile.open(IO_ReadOnly))
return false;
@@ -204,7 +204,7 @@ bool TopLevel::loadLayout(QDomDocument &layoutDocument)
}
// Play a sound
-void TopLevel::playSound(const QString &ref) const
+void TopLevel::playSound(const TQString &ref) const
{
soundFactory->playSound(ref);
}
@@ -213,7 +213,7 @@ void TopLevel::playSound(const QString &ref) const
void TopLevel::readOptions()
{
KConfig *config;
- QString option;
+ TQString option;
config = KApplication::kApplication()->config();
@@ -254,22 +254,22 @@ void TopLevel::writeOptions()
void TopLevel::setupKAction()
{
//Game
- KStdGameAction::gameNew(this, SLOT(fileNew()), actionCollection());
- KStdGameAction::load(this, SLOT(fileOpen()), actionCollection());
- KStdGameAction::save(this, SLOT(fileSave()), actionCollection());
- KStdGameAction::print(this, SLOT(filePrint()), actionCollection());
- KStdGameAction::quit(kapp, SLOT(quit()), actionCollection());
- (void) new KAction(i18n("Save &as Picture..."), 0, this, SLOT(filePicture()), actionCollection(), "game_save_picture");
+ KStdGameAction::gameNew(this, TQT_SLOT(fileNew()), actionCollection());
+ KStdGameAction::load(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdGameAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ KStdGameAction::print(this, TQT_SLOT(filePrint()), actionCollection());
+ KStdGameAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
+ (void) new KAction(i18n("Save &as Picture..."), 0, this, TQT_SLOT(filePicture()), actionCollection(), "game_save_picture");
//Edit
- KStdAction::copy(this, SLOT(editCopy()), actionCollection());
- KStdAction::undo(this, SLOT(editUndo()), actionCollection());
- KStdAction::redo(this, SLOT(editRedo()), actionCollection());
+ KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
+ KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
+ KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
enableUndo(false);
enableRedo(false);
//Speech
- KToggleAction* t = new KToggleAction(i18n("&No Sound"), 0, this, SLOT(soundOff()), actionCollection(), "speech_no_sound");
+ KToggleAction* t = new KToggleAction(i18n("&No Sound"), 0, this, TQT_SLOT(soundOff()), actionCollection(), "speech_no_sound");
if (!soundEnabled) t->setChecked(true);
setupGUI();
@@ -289,7 +289,7 @@ void TopLevel::fileNew()
// Load gameboard
void TopLevel::fileOpen()
{
- QString dir = locate("data", "ktuberling/museum/miss.tuberling");
+ TQString dir = locate("data", "ktuberling/museum/miss.tuberling");
dir.truncate(dir.findRev('/') + 1);
KURL url = KFileDialog::getOpenURL(dir, "*.tuberling");
@@ -302,7 +302,7 @@ void TopLevel::open(const KURL &url)
if (url.isEmpty())
return;
- QString name;
+ TQString name;
KIO::NetAccess::download(url, name, this);
@@ -323,7 +323,7 @@ void TopLevel::open(const KURL &url)
void TopLevel::fileSave()
{
KURL url = KFileDialog::getSaveURL
- ( QString::null,
+ ( TQString::null,
"*.tuberling");
if (url.isEmpty())
@@ -337,7 +337,7 @@ void TopLevel::fileSave()
return;
}
- QString name = url.path();
+ TQString name = url.path();
int suffix;
suffix = name.findRev('.');
@@ -353,10 +353,10 @@ void TopLevel::fileSave()
// Save gameboard as picture
void TopLevel::filePicture()
{
- QPixmap picture(playGround->getPicture());
+ TQPixmap picture(playGround->getPicture());
KURL url = KFileDialog::getSaveURL
- ( QString::null,
+ ( TQString::null,
i18n( "*.xpm|UNIX Pixmaps (*.xpm)\n"
"*.jpg|JPEG Compressed Files (*.jpg)\n"
"*.png|Next Generation Pictures (*.png)\n"
@@ -374,10 +374,10 @@ void TopLevel::filePicture()
return;
}
- QString name = url.path();
+ TQString name = url.path();
const char *format;
int suffix;
- QString end;
+ TQString end;
suffix = name.findRev('.');
if (suffix == -1)
@@ -422,8 +422,8 @@ void TopLevel::filePrint()
// Copy modified area to clipboard
void TopLevel::editCopy()
{
- QClipboard *clipboard = QApplication::clipboard();
- QPixmap picture(playGround->getPicture());
+ QClipboard *clipboard = TQApplication::clipboard();
+ TQPixmap picture(playGround->getPicture());
clipboard->setPixmap(picture);
}