diff options
Diffstat (limited to 'kpat/dealer.cpp')
-rw-r--r-- | kpat/dealer.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kpat/dealer.cpp b/kpat/dealer.cpp index dbd27787..d3cdecad 100644 --- a/kpat/dealer.cpp +++ b/kpat/dealer.cpp @@ -99,7 +99,7 @@ const Dealer *Dealer::instance() void Dealer::setBackgroundPixmap(const TQPixmap &background, const TQColor &midcolor) { _midcolor = midcolor; - canvas()->setBackgroundPixmap(background); + canvas()->tqsetBackgroundPixmap(background); for (PileList::Iterator it = piles.begin(); it != piles.end(); ++it) { (*it)->resetCache(); (*it)->initSizes(); @@ -114,7 +114,7 @@ void Dealer::setupActions() { if (actions() & Dealer::Hint) { - ahint = new KAction( i18n("&Hint"), TQString::fromLatin1("wizard"), Key_H, TQT_TQOBJECT(this), + ahint = new KAction( i18n("&Hint"), TQString::tqfromLatin1("wizard"), Key_H, TQT_TQOBJECT(this), TQT_SLOT(hint()), parent()->actionCollection(), "game_hint"); actionlist.append(ahint); @@ -122,7 +122,7 @@ void Dealer::setupActions() { ahint = 0; if (actions() & Dealer::Demo) { - ademo = new KToggleAction( i18n("&Demo"), TQString::fromLatin1("1rightarrow"), CTRL+Key_D, TQT_TQOBJECT(this), + ademo = new KToggleAction( i18n("&Demo"), TQString::tqfromLatin1("1rightarrow"), CTRL+Key_D, TQT_TQOBJECT(this), TQT_SLOT(toggleDemo()), parent()->actionCollection(), "game_demo"); actionlist.append(ademo); @@ -130,14 +130,14 @@ void Dealer::setupActions() { ademo = 0; if (actions() & Dealer::Redeal) { - aredeal = new KAction (i18n("&Redeal"), TQString::fromLatin1("queue"), 0, TQT_TQOBJECT(this), + aredeal = new KAction (i18n("&Redeal"), TQString::tqfromLatin1("queue"), 0, TQT_TQOBJECT(this), TQT_SLOT(redeal()), parent()->actionCollection(), "game_redeal"); actionlist.append(aredeal); } else aredeal = 0; - parent()->guiFactory()->plugActionList( parent(), TQString::fromLatin1("game_actions"), actionlist); + parent()->guiFactory()->plugActionList( parent(), TQString::tqfromLatin1("game_actions"), actionlist); } Dealer::~Dealer() @@ -145,7 +145,7 @@ Dealer::~Dealer() if (!_won) countLoss(); clearHints(); - parent()->guiFactory()->unplugActionList( parent(), TQString::fromLatin1("game_actions")); + parent()->guiFactory()->unplugActionList( parent(), TQString::tqfromLatin1("game_actions")); while (!piles.isEmpty()) delete piles.first(); // removes itself @@ -535,8 +535,8 @@ void Dealer::resizeEvent(TQResizeEvent *e) { int x = width(); int y = height(); - int hs = horizontalScrollBar()->sizeHint().height(); - int vs = verticalScrollBar()->sizeHint().width(); + int hs = horizontalScrollBar()->tqsizeHint().height(); + int vs = verticalScrollBar()->tqsizeHint().width(); int mx = minsize.width(); int my = minsize.height(); @@ -778,7 +778,7 @@ void Dealer::setState(State *st) CardState s = *it; bool target = c->takenDown(); // abused s.source->add(c, s.source_index); - c->setVisible(s.source->isVisible()); + c->tqsetVisible(s.source->isVisible()); c->setAnimated(false); c->setX(s.x); c->setY(s.y); @@ -962,7 +962,7 @@ void Dealer::openGame(TQDomDocument &doc) (*it2)->setX(card.attribute("x").toInt()); (*it2)->setY(card.attribute("y").toInt()); (*it2)->setZ(card.attribute("z").toInt()); - (*it2)->setVisible(p->isVisible()); + (*it2)->tqsetVisible(p->isVisible()); cards.remove(it2); break; } @@ -1160,14 +1160,14 @@ void Dealer::won() { // wrap in own scope to make KConfigGroupSave work KConfig *config = kapp->config(); KConfigGroupSaver kcs(config, scores_group); - unsigned int n = config->readUnsignedNumEntry(TQString("won%1").arg(_id),0) + 1; - config->writeEntry(TQString("won%1").arg(_id),n); - n = config->readUnsignedNumEntry(TQString("winstreak%1").arg(_id),0) + 1; - config->writeEntry(TQString("winstreak%1").arg(_id),n); - unsigned int m = config->readUnsignedNumEntry(TQString("maxwinstreak%1").arg(_id),0); + unsigned int n = config->readUnsignedNumEntry(TQString("won%1").tqarg(_id),0) + 1; + config->writeEntry(TQString("won%1").tqarg(_id),n); + n = config->readUnsignedNumEntry(TQString("winstreak%1").tqarg(_id),0) + 1; + config->writeEntry(TQString("winstreak%1").tqarg(_id),n); + unsigned int m = config->readUnsignedNumEntry(TQString("maxwinstreak%1").tqarg(_id),0); if (n>m) - config->writeEntry(TQString("maxwinstreak%1").arg(_id),n); - config->writeEntry(TQString("loosestreak%1").arg(_id),0); + config->writeEntry(TQString("maxwinstreak%1").tqarg(_id),n); + config->writeEntry(TQString("loosestreak%1").tqarg(_id),0); } // sort cards by increasing z @@ -1430,9 +1430,9 @@ void Dealer::countGame() kdDebug(11111) << "counting game as played." << endl; KConfig *config = kapp->config(); KConfigGroupSaver kcs(config, scores_group); - unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").arg(_id),0); + unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").tqarg(_id),0); ++Total; - config->writeEntry(TQString("total%1").arg(_id),Total); + config->writeEntry(TQString("total%1").tqarg(_id),Total); _gameRecorded = true; } } @@ -1443,12 +1443,12 @@ void Dealer::countLoss() // update score KConfig *config = kapp->config(); KConfigGroupSaver kcs(config, scores_group); - unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").arg(_id),0) + 1; - config->writeEntry(TQString("loosestreak%1").arg(_id),n); - unsigned int m = config->readUnsignedNumEntry(TQString("maxloosestreak%1").arg(_id),0); + unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").tqarg(_id),0) + 1; + config->writeEntry(TQString("loosestreak%1").tqarg(_id),n); + unsigned int m = config->readUnsignedNumEntry(TQString("maxloosestreak%1").tqarg(_id),0); if (n>m) - config->writeEntry(TQString("maxloosestreak%1").arg(_id),n); - config->writeEntry(TQString("winstreak%1").arg(_id),0); + config->writeEntry(TQString("maxloosestreak%1").tqarg(_id),n); + config->writeEntry(TQString("winstreak%1").tqarg(_id),0); } } |