diff options
Diffstat (limited to 'kpat/dealer.cpp')
-rw-r--r-- | kpat/dealer.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/kpat/dealer.cpp b/kpat/dealer.cpp index 43bca4c5..eb9363e2 100644 --- a/kpat/dealer.cpp +++ b/kpat/dealer.cpp @@ -73,7 +73,7 @@ Dealer::Dealer( TDEMainWindow* _parent , const char* _name ) setVScrollBarMode(AlwaysOff); setHScrollBarMode(AlwaysOff); - setGameNumber(kapp->random()); + setGameNumber(tdeApp->random()); myCanvas.setAdvancePeriod(30); // myCanvas.setBackgroundColor( darkGreen ); setCanvas(&myCanvas); @@ -83,7 +83,7 @@ Dealer::Dealer( TDEMainWindow* _parent , const char* _name ) demotimer = new TQTimer(this); - connect(demotimer, TQT_SIGNAL(timeout()), TQT_SLOT(demo())); + connect(demotimer, TQ_SIGNAL(timeout()), TQ_SLOT(demo())); assert(!s_instance); s_instance = this; @@ -114,24 +114,24 @@ void Dealer::setupActions() { if (actions() & Dealer::Hint) { - ahint = new TDEAction( i18n("&Hint"), TQString::fromLatin1("wizard"), Key_H, TQT_TQOBJECT(this), - TQT_SLOT(hint()), + ahint = new TDEAction( i18n("&Hint"), TQString::fromLatin1("wizard"), Key_H, this, + TQ_SLOT(hint()), parent()->actionCollection(), "game_hint"); actionlist.append(ahint); } else ahint = 0; if (actions() & Dealer::Demo) { - ademo = new TDEToggleAction( i18n("&Demo"), TQString::fromLatin1("1rightarrow"), CTRL+Key_D, TQT_TQOBJECT(this), - TQT_SLOT(toggleDemo()), + ademo = new TDEToggleAction( i18n("&Demo"), TQString::fromLatin1("1rightarrow"), CTRL+Key_D, this, + TQ_SLOT(toggleDemo()), parent()->actionCollection(), "game_demo"); actionlist.append(ademo); } else ademo = 0; if (actions() & Dealer::Redeal) { - aredeal = new TDEAction (i18n("&Redeal"), TQString::fromLatin1("queue"), 0, TQT_TQOBJECT(this), - TQT_SLOT(redeal()), + aredeal = new TDEAction (i18n("&Redeal"), TQString::fromLatin1("queue"), 0, this, + TQ_SLOT(redeal()), parent()->actionCollection(), "game_redeal"); actionlist.append(aredeal); } else @@ -342,7 +342,7 @@ void Dealer::contentsMousePressEvent(TQMouseEvent* e) if (!list.count()) return; - if (e->button() == Qt::LeftButton) { + if (e->button() == TQt::LeftButton) { if (list.first()->rtti() == Card::RTTI) { Card *c = dynamic_cast<Card*>(list.first()); assert(c); @@ -355,7 +355,7 @@ void Dealer::contentsMousePressEvent(TQMouseEvent* e) return; } - if (e->button() == Qt::RightButton) { + if (e->button() == TQt::RightButton) { if (list.first()->rtti() == Card::RTTI) { Card *preview = dynamic_cast<Card*>(list.first()); assert(preview); @@ -650,7 +650,7 @@ void Dealer::startNew() if (!towait) takeState(); else - connect(towait, TQT_SIGNAL(stoped(Card*)), TQT_SLOT(slotTakeState(Card *))); + connect(towait, TQ_SIGNAL(stoped(Card*)), TQ_SLOT(slotTakeState(Card *))); resizeEvent(0); } @@ -791,13 +791,13 @@ void Dealer::takeState() ademo->setEnabled( false ); if ( aredeal ) aredeal->setEnabled( false ); - TQTimer::singleShot(400, TQT_TQOBJECT(this), TQT_SIGNAL(gameLost())); + TQTimer::singleShot(400, this, TQ_SIGNAL(gameLost())); toldAboutLostGame = true; return; } } if (!demoActive() && !waiting()) - TQTimer::singleShot(TIME_BETWEEN_MOVES, TQT_TQOBJECT(this), TQT_SLOT(startAutoDrop())); + TQTimer::singleShot(TIME_BETWEEN_MOVES, this, TQ_SLOT(startAutoDrop())); emit undoPossible(undoList.count() > 1 && !waiting()); } @@ -998,7 +998,7 @@ void Dealer::setWaiting(bool w) void Dealer::setAutoDropEnabled(bool a) { _autodrop = a; - TQTimer::singleShot(TIME_BETWEEN_MOVES, TQT_TQOBJECT(this), TQT_SLOT(startAutoDrop())); + TQTimer::singleShot(TIME_BETWEEN_MOVES, this, TQ_SLOT(startAutoDrop())); } bool Dealer::startAutoDrop() @@ -1010,7 +1010,7 @@ bool Dealer::startAutoDrop() for (TQCanvasItemList::ConstIterator it = list.begin(); it != list.end(); ++it) if ((*it)->animated()) { - TQTimer::singleShot(TIME_BETWEEN_MOVES, TQT_TQOBJECT(this), TQT_SLOT(startAutoDrop())); + TQTimer::singleShot(TIME_BETWEEN_MOVES, this, TQ_SLOT(startAutoDrop())); return true; } @@ -1034,7 +1034,7 @@ bool Dealer::startAutoDrop() t->move(x, y); kdDebug(11111) << "autodrop " << t->name() << endl; t->moveTo(int(t->source()->x()), int(t->source()->y()), int(t->z()), STEPS_AUTODROP); - connect(t, TQT_SIGNAL(stoped(Card*)), TQT_SLOT(waitForAutoDrop(Card*))); + connect(t, TQ_SIGNAL(stoped(Card*)), TQ_SLOT(waitForAutoDrop(Card*))); return true; } } @@ -1122,7 +1122,7 @@ void Dealer::won() // update score, 'win' in demo mode also counts (keep it that way?) { // wrap in own scope to make TDEConfigGroupSave work - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver kcs(config, scores_group); unsigned int n = config->readUnsignedNumEntry(TQString("won%1").arg(_id),0) + 1; config->writeEntry(TQString("won%1").arg(_id),n); @@ -1154,8 +1154,8 @@ void Dealer::won() TQRect p(0, 0, (*it).ptr->width(), (*it).ptr->height()); int x, y; do { - x = 3*canvas()->width()/2 - kapp->random() % (canvas()->width() * 2); - y = 3*canvas()->height()/2 - (kapp->random() % (canvas()->height() * 2)); + x = 3*canvas()->width()/2 - tdeApp->random() % (canvas()->width() * 2); + y = 3*canvas()->height()/2 - (tdeApp->random() % (canvas()->height() * 2)); p.moveTopLeft(TQPoint(x, y)); } while (can.intersects(p)); @@ -1269,7 +1269,7 @@ Card *Dealer::demoNewCards() void Dealer::newDemoMove(Card *m) { towait = m; - connect(m, TQT_SIGNAL(stoped(Card*)), TQT_SLOT(waitForDemo(Card*))); + connect(m, TQ_SIGNAL(stoped(Card*)), TQ_SLOT(waitForDemo(Card*))); } void Dealer::waitForDemo(Card *t) @@ -1335,7 +1335,7 @@ void Dealer::drawPile(KPixmap &pixmap, Pile *pile, bool selected) sy = -dy; dy = 0; } - bitBlt(TQT_TQPAINTDEVICE(&pixmap), dx, dy, TQT_TQPAINTDEVICE(&bg), + bitBlt(&pixmap, dx, dy, &bg, sx, sy, w, h, TQt::CopyROP, true); } } @@ -1379,9 +1379,9 @@ void Dealer::wheelEvent( TQWheelEvent *e ) e->globalPos(), e->delta(), e->state()); viewportWheelEvent(&ce); if ( !ce.isAccepted() ) { - if ( e->orientation() ==Qt::Horizontal && hScrollBarMode () == AlwaysOn ) + if ( e->orientation() ==TQt::Horizontal && hScrollBarMode () == AlwaysOn ) TQApplication::sendEvent( horizontalScrollBar(), e); - else if (e->orientation() ==Qt::Vertical && vScrollBarMode () == AlwaysOn ) + else if (e->orientation() ==TQt::Vertical && vScrollBarMode () == AlwaysOn ) TQApplication::sendEvent( verticalScrollBar(), e); } else { e->accept(); @@ -1392,7 +1392,7 @@ void Dealer::countGame() { if ( !_gameRecorded ) { kdDebug(11111) << "counting game as played." << endl; - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver kcs(config, scores_group); unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").arg(_id),0); ++Total; @@ -1405,7 +1405,7 @@ void Dealer::countLoss() { if ( _gameRecorded ) { // update score - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver kcs(config, scores_group); unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").arg(_id),0) + 1; config->writeEntry(TQString("loosestreak%1").arg(_id),n); |