summaryrefslogtreecommitdiffstats
path: root/kpat/pwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpat/pwidget.cpp')
-rw-r--r--kpat/pwidget.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kpat/pwidget.cpp b/kpat/pwidget.cpp
index eb12a1c8..e8353dee 100644
--- a/kpat/pwidget.cpp
+++ b/kpat/pwidget.cpp
@@ -59,28 +59,28 @@ pWidget::pWidget()
{
current_pwidget = this;
// KCrash::setEmergencySaveFunction(::saveGame);
- KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection(), "game_exit");
+ KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection(), "game_exit");
- undo = KStdAction::undo(this, TQT_SLOT(undoMove()),
+ undo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undoMove()),
actionCollection(), "undo_move");
undo->setEnabled(false);
- (void)KStdAction::openNew(this, TQT_SLOT(newGame()),
+ (void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()),
actionCollection(), "new_game");
- (void)KStdAction::open(this, TQT_SLOT(openGame()),
+ (void)KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(openGame()),
actionCollection(), "open");
- recent = KStdAction::openRecent(this, TQT_SLOT(openGame(const KURL&)),
+ recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openGame(const KURL&)),
actionCollection(), "open_recent");
recent->loadEntries(KGlobal::config());
- (void)KStdAction::saveAs(this, TQT_SLOT(saveGame()),
+ (void)KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveGame()),
actionCollection(), "save");
- (void)new KAction(i18n("&Choose Game..."), 0, this, TQT_SLOT(chooseGame()),
+ (void)new KAction(i18n("&Choose Game..."), 0, TQT_TQOBJECT(this), TQT_SLOT(chooseGame()),
actionCollection(), "choose_game");
- (void)new KAction(i18n("Restart &Game"), TQString::fromLatin1("reload"), 0,
- this, TQT_SLOT(restart()),
+ (void)new KAction(i18n("Restart &Game"), TQString::tqfromLatin1("reload"), 0,
+ TQT_TQOBJECT(this), TQT_SLOT(restart()),
actionCollection(), "restart_game");
- (void)KStdAction::help(this, TQT_SLOT(helpGame()), actionCollection(), "help_game");
+ (void)KStdAction::help(TQT_TQOBJECT(this), TQT_SLOT(helpGame()), actionCollection(), "help_game");
- games = new KSelectAction(i18n("&Game Type"), 0, this,
+ games = new KSelectAction(i18n("&Game Type"), 0, TQT_TQOBJECT(this),
TQT_SLOT(newGameType()),
actionCollection(), "game_type");
TQStringList list;
@@ -104,17 +104,17 @@ pWidget::pWidget()
KGlobal::dirs()->addResourceType("wallpaper", KStandardDirs::kde_default("data") + "kpat/backgrounds/");
KGlobal::dirs()->addResourceType("wallpaper", KStandardDirs::kde_default("data") + "ksnake/backgrounds/");
- wallpapers = new KSelectAction(i18n("&Change Background"), 0, this,
+ wallpapers = new KSelectAction(i18n("&Change Background"), 0, TQT_TQOBJECT(this),
TQT_SLOT(changeWallpaper()),
actionCollection(), "wallpaper");
list.clear();
wallpaperlist.clear();
- TQStringList wallpaperlist2 = KGlobal::dirs()->findAllResources("wallpaper", TQString::null,
+ TQStringList wallpaperlist2 = KGlobal::dirs()->findAllResources("wallpaper", TQString(),
false, true, list);
TQStringList list2;
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
TQString file = *it;
- int rindex = file.findRev('.');
+ int rindex = file.tqfindRev('.');
if (rindex != -1) {
TQString ext = file.mid(rindex + 1).lower();
if (ext == "jpeg" || ext == "png" || ext == "jpg") {
@@ -125,23 +125,23 @@ pWidget::pWidget()
}
wallpapers->setItems(list2);
- wallpapers->setCurrentItem(list2.findIndex("No-Ones-Laughing-3"));
+ wallpapers->setCurrentItem(list2.tqfindIndex("No-Ones-Laughing-3"));
changeWallpaper();
(void)new cardMap(midcolor);
- backs = new KAction(i18n("&Switch Cards..."), 0, this,
+ backs = new KAction(i18n("&Switch Cards..."), 0, TQT_TQOBJECT(this),
TQT_SLOT(changeBackside()),
actionCollection(), "backside");
- stats = new KAction(i18n("&Statistics"), 0, this, TQT_SLOT(showStats()),
+ stats = new KAction(i18n("&Statistics"), 0, TQT_TQOBJECT(this), TQT_SLOT(showStats()),
actionCollection(),"game_stats");
animation = new KToggleAction(i18n( "&Animation on Startup" ),
- 0, this, TQT_SLOT(animationChanged()),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(animationChanged()),
actionCollection(), "animation");
dropaction = new KToggleAction(i18n("&Enable Autodrop"),
- 0, this, TQT_SLOT(enableAutoDrop()),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(enableAutoDrop()),
actionCollection(), "enable_autodrop");
dropaction->setCheckedState(i18n("Disable Autodrop"));
@@ -167,7 +167,7 @@ pWidget::pWidget()
statusBar()->insertItem( "", 1, 0, true );
- createGUI(TQString::null, false);
+ createGUI(TQString(), false);
KAcceleratorManager::manage(menuBar());
newGameType();
@@ -239,7 +239,7 @@ void pWidget::changeWallpaper()
return;
background = TQPixmap(bgpath);
if (background.isNull()) {
- KMessageBox::sorry(this, i18n("<qt>Couldn't load wallpaper<br/>%1</qt>").arg(bgpath));
+ KMessageBox::sorry(this, i18n("<qt>Couldn't load wallpaper<br/>%1</qt>").tqarg(bgpath));
return;
}
@@ -251,10 +251,10 @@ void pWidget::changeWallpaper()
long b = 0;
for (int i = 0; i < bg.numColors(); ++i)
{
- QRgb rgb = bg.color(i);
- r += qRed(rgb);
- g += qGreen(rgb);
- b += qBlue(rgb);
+ TQRgb rgb = bg.color(i);
+ r += tqRed(rgb);
+ g += tqGreen(rgb);
+ b += tqBlue(rgb);
}
r /= bg.numColors();
b /= bg.numColors();
@@ -344,8 +344,8 @@ void pWidget::newGameType()
if ((*it)->gameindex == id) {
dill = (*it)->createGame(this);
TQString name = (*it)->name;
- name = name.replace(TQRegExp("[&']"), "");
- name = name.replace(TQRegExp("[ ]"), "_").lower();
+ name = name.tqreplace(TQRegExp("[&']"), "");
+ name = name.tqreplace(TQRegExp("[ ]"), "_").lower();
dill->setAnchorName("game_" + name);
connect(dill, TQT_SIGNAL(saveGame()), TQT_SLOT(saveGame()));
connect(dill, TQT_SIGNAL(gameInfo(const TQString&)),
@@ -455,7 +455,7 @@ void pWidget::gameWon(bool withhelp)
#if TEST_SOLVER == 0
KMessageBox::information(this, congrats, i18n("Congratulations!"));
#endif
- TQTimer::singleShot(0, this, TQT_SLOT(newGame()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(newGame()));
#if TEST_SOLVER == 1
dill->demo();
#endif
@@ -468,11 +468,11 @@ void pWidget::gameLost()
// The following code is taken out of kmessagebox.cpp in kdeui.
// Is there a better way?
KConfig *config = 0;
- TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
+ TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages");
config = KGlobal::config();
KConfigGroupSaver saver(config,
- TQString::fromLatin1("Notification Messages"));
+ TQString::tqfromLatin1("Notification Messages"));
TQString dontAsk = config->readEntry(dontAskAgainName).lower();
// If we are ordered never to ask again and to continue the game,
@@ -482,7 +482,7 @@ void pWidget::gameLost()
// If it says yes, we ask anyway. Just starting a new game would
// be incredibly annoying.
if (dontAsk == "yes")
- dontAskAgainName = TQString::null;
+ dontAskAgainName = TQString();
if (KMessageBox::questionYesNo(this, i18n("You could not win this game, "
"but there is always a second try.\nStart a new game?"),
@@ -491,7 +491,7 @@ void pWidget::gameLost()
KStdGuiItem::cont(),
dontAskAgainName) == KMessageBox::Yes) {
- TQTimer::singleShot(0, this, TQT_SLOT(newGame()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(newGame()));
}
}
@@ -511,7 +511,7 @@ void pWidget::openGame(const KURL &url)
}
uint id = doc.documentElement().attribute("id").toUInt();
- if (id != (Q_UINT32)games->currentItem()) {
+ if (id != (TQ_UINT32)games->currentItem()) {
games->setCurrentItem(id);
newGameType();
if (!dill) {