diff options
Diffstat (limited to 'kpat')
37 files changed, 117 insertions, 123 deletions
diff --git a/kpat/card.cpp b/kpat/card.cpp index d3dba426..09773711 100644 --- a/kpat/card.cpp +++ b/kpat/card.cpp @@ -288,7 +288,7 @@ void Card::flipTo(int x2, int y2, int steps) m_animSteps = steps; setVelocity(dx/m_animSteps, dy/m_animSteps-flipLift); - setAnimated(TRUE); + setAnimated(true); } @@ -336,7 +336,7 @@ void Card::setAnimated(bool anim) // Reset all things that might have changed during the animation. scaleX = 1.0; scaleY = 1.0; - m_flipping = FALSE; + m_flipping = false; setVelocity(0, 0); // Move the card to its destination immediately. @@ -374,7 +374,7 @@ void Card::getUp(int steps) // Animation m_animSteps = steps; setVelocity(0, 0); - setAnimated(TRUE); + setAnimated(true); } #include "card.moc" diff --git a/kpat/card.h b/kpat/card.h index c6518170..244f0b8d 100644 --- a/kpat/card.h +++ b/kpat/card.h @@ -43,7 +43,7 @@ typedef TQValueList<Card*> CardList; // - It is a graphic entity on a TQCanvas that can be moved around. // class Card: public TQObject, public TQCanvasRectangle { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/cardmaps.cpp b/kpat/cardmaps.cpp index c7ba0717..736c2b4e 100644 --- a/kpat/cardmaps.cpp +++ b/kpat/cardmaps.cpp @@ -51,7 +51,7 @@ cardMap::cardMap(const TQColor &dim) : dimcolor(dim) card_height = 0; kdDebug(11111) << "cardMap\n"; - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver cs(config, settings_group ); TQString bg = config->readEntry( "Back", KCardDialog::getDefaultDeck()); @@ -66,7 +66,7 @@ cardMap::cardMap(const TQColor &dim) : dimcolor(dim) bool cardMap::setCardDir( const TQString &dir) { - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver cs(config, settings_group ); // create an animation window while loading pixmaps (this diff --git a/kpat/clock.h b/kpat/clock.h index eac9a984..09ce3a35 100644 --- a/kpat/clock.h +++ b/kpat/clock.h @@ -4,7 +4,7 @@ #include "dealer.h" class Clock : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/computation.h b/kpat/computation.h index 1a2cfbbb..48760f1a 100644 --- a/kpat/computation.h +++ b/kpat/computation.h @@ -28,7 +28,7 @@ #include "dealer.h" class Computation : public Dealer { - Q_OBJECT + TQ_OBJECT public: 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); diff --git a/kpat/dealer.h b/kpat/dealer.h index 0704433b..630c2ece 100644 --- a/kpat/dealer.h +++ b/kpat/dealer.h @@ -91,7 +91,7 @@ struct State ***************************************************************/ class Dealer: public TQCanvasView { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/fortyeight.cpp b/kpat/fortyeight.cpp index 64bd8a2f..50af4e01 100644 --- a/kpat/fortyeight.cpp +++ b/kpat/fortyeight.cpp @@ -35,7 +35,7 @@ Fortyeight::Fortyeight( TDEMainWindow* parent, const char* name) const int dist_x = cardMap::CARDX() * 11 / 10 + 1; const int dist_y = cardMap::CARDY() * 11 / 10 + 1; - connect(deck, TQT_SIGNAL(clicked(Card*)), TQT_SLOT(deckClicked(Card*))); + connect(deck, TQ_SIGNAL(clicked(Card*)), TQ_SLOT(deckClicked(Card*))); deck->move(10 + cardMap::CARDX() * 82 / 10, 10 + cardMap::CARDX() * 56 / 10); deck->setZ(20); diff --git a/kpat/fortyeight.h b/kpat/fortyeight.h index 5a97e01a..ed2b1ec7 100644 --- a/kpat/fortyeight.h +++ b/kpat/fortyeight.h @@ -5,7 +5,7 @@ class HorLeftPile : public Pile { - Q_OBJECT + TQ_OBJECT public: @@ -16,7 +16,7 @@ public: class Fortyeight : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/freecell-solver/USAGE b/kpat/freecell-solver/USAGE index 16f5c93d..f78295b2 100644 --- a/kpat/freecell-solver/USAGE +++ b/kpat/freecell-solver/USAGE @@ -502,7 +502,7 @@ If you are working on a UNIX or a similar system then you can set some run-time options in "fc-solve" by sending it some signal combinations. -If you send the signal USR1, without sending any other Q_SIGNALS before +If you send the signal USR1, without sending any other signals before that, then "fc-solve" will output the present number of iterations. This method is a good way to monitor an instance that takes a long time to solve. @@ -512,7 +512,7 @@ will print the iteration number and depth on every state that it checks. It is the equivalent of specifying (or unspecifying) the option -i/--iter-output. -If you send it two USR2 Q_SIGNALS and then USR1, then "fc-solve" +If you send it two USR2 signals and then USR1, then "fc-solve" will also print the board of every state. Again, this will only be done assuming the iteration output is turned on. diff --git a/kpat/freecell-solver/cmd_line.c b/kpat/freecell-solver/cmd_line.c index 63fbf6c9..2eaf524c 100644 --- a/kpat/freecell-solver/cmd_line.c +++ b/kpat/freecell-solver/cmd_line.c @@ -518,7 +518,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( { int a; const char * start_num; - char * end_num; + const char * end_num; char * num_copy; start_num = argv[arg]; for(a=0;a<5;a++) @@ -642,7 +642,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( *last_arg = arg-1; return FCS_CMD_LINE_PARAM_WITH_NO_ARG; } - freecell_solver_user_set_soft_thread_name(instance, argv[arg]); + freecell_solver_user_set_soft_thread_name(instance, (char*)argv[arg]); } else if ((!strcmp(argv[arg], "--prelude"))) { @@ -652,7 +652,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( *last_arg = arg-1; return FCS_CMD_LINE_PARAM_WITH_NO_ARG; } - freecell_solver_user_set_hard_thread_prelude(instance, argv[arg]); + freecell_solver_user_set_hard_thread_prelude(instance, (char*)argv[arg]); } else if ((!strcmp(argv[arg], "-opt-to")) || (!strcmp(argv[arg], "--optimization-tests-order"))) { @@ -746,7 +746,8 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( else { int num_to_skip = 0; - char * s, * buffer; + const char * s; + char * buffer; FILE * f; long file_len; int ret; @@ -842,7 +843,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( ret = freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( instance, args_man->argc - num_to_skip, - args_man->argv + num_to_skip, + (const char **)(args_man->argv + num_to_skip), 0, known_parameters, callback, @@ -879,7 +880,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( args_man_t * preset_args = 0; char * dir = NULL; - status = read_preset(argv[arg], &preset_args, &dir, NULL); + status = read_preset((char*)argv[arg], &preset_args, &dir, NULL); if (status != 0) { char * err_str; @@ -896,7 +897,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( ret = freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( instance, preset_args->argc, - preset_args->argv, + (const char**)preset_args->argv, 0, known_parameters, callback, diff --git a/kpat/freecell-solver/fcs_cl.h b/kpat/freecell-solver/fcs_cl.h index e739c98e..6dafaec6 100644 --- a/kpat/freecell-solver/fcs_cl.h +++ b/kpat/freecell-solver/fcs_cl.h @@ -12,7 +12,7 @@ typedef int (*freecell_solver_user_cmd_line_known_commands_callback_t) ( void * instance, int argc, - char * argv[], + const char * argv[], int arg_index, int * num_to_skip, int * ret, diff --git a/kpat/freecell-solver/pqueue.c b/kpat/freecell-solver/pqueue.c index 086cce96..e507a875 100644 --- a/kpat/freecell-solver/pqueue.c +++ b/kpat/freecell-solver/pqueue.c @@ -25,9 +25,6 @@ #include "dmalloc.h" #endif -#define TRUE 1 -#define FALSE 0 - /* initialise the priority queue with a maximum size of maxelements. maxrating is the highest or lowest value of an entry in the pqueue depending on whether it is ascending or descending respectively. Finally the bool32 tells you whether the list is sorted ascending or descending... */ @@ -50,10 +47,10 @@ void freecell_solver_PQueueInitialise( } /* join a priority queue - returns TRUE if successful, FALSE if fails. (You fail by filling the pqueue.) + returns true if successful, false if fails. (You fail by filling the pqueue.) PGetRating is a function which returns the rating of the item you're adding for sorting purposes */ -int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t r) +void freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t r) { uint32 i; pq_element_t * Elements = pq->Elements; @@ -103,8 +100,7 @@ int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t r) pq->CurrentSize = CurrentSize; - return TRUE; - + return; } #define PQueueIsEmpty(pq) ((pq)->CurrentSize == 0) diff --git a/kpat/freecell-solver/pqueue.h b/kpat/freecell-solver/pqueue.h index cf5f5372..252653d6 100644 --- a/kpat/freecell-solver/pqueue.h +++ b/kpat/freecell-solver/pqueue.h @@ -58,7 +58,7 @@ void freecell_solver_PQueueInitialise( void freecell_solver_PQueueFree( PQUEUE *pq ); -int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t); +void freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t); void *freecell_solver_PQueuePop( PQUEUE *pq); diff --git a/kpat/freecell.cpp b/kpat/freecell.cpp index 1e7b8b92..5f3ccca0 100644 --- a/kpat/freecell.cpp +++ b/kpat/freecell.cpp @@ -313,7 +313,7 @@ void FreecellBase::resumeSolution() } solver_ret = freecell_solver_user_resume_solution(solver_instance); - TQTimer::singleShot(0, this, TQT_SLOT(resumeSolution())); + TQTimer::singleShot(0, this, TQ_SLOT(resumeSolution())); } MoveHint *FreecellBase::translateMove(void *m) { @@ -602,7 +602,7 @@ void FreecellBase::moveCards(CardList &c, FreecellPile *from, Pile *to) from->moveCardsBack(c); waitfor = c.first(); - connect(waitfor, TQT_SIGNAL(stoped(Card*)), TQT_SLOT(waitForMoving(Card*))); + connect(waitfor, TQ_SIGNAL(stoped(Card*)), TQ_SLOT(waitForMoving(Card*))); PileList fcs; @@ -625,7 +625,7 @@ void FreecellBase::moveCards(CardList &c, FreecellPile *from, Pile *to) movePileToPile(c, to, fss, fcs, 0, c.count(), 0); if (!waitfor->animated()) - TQTimer::singleShot(0, this, TQT_SLOT(startMoving())); + TQTimer::singleShot(0, this, TQ_SLOT(startMoving())); } struct MoveAway { @@ -707,7 +707,7 @@ void FreecellBase::startMoving() mh->pile()->moveCardsBack(empty, true); waitfor = mh->card(); kdDebug(11111) << "wait for moving end " << mh->card()->name() << endl; - connect(mh->card(), TQT_SIGNAL(stoped(Card*)), TQT_SLOT(waitForMoving(Card*))); + connect(mh->card(), TQ_SIGNAL(stoped(Card*)), TQ_SLOT(waitForMoving(Card*))); delete mh; } diff --git a/kpat/freecell.h b/kpat/freecell.h index feca1963..bdd836c7 100644 --- a/kpat/freecell.h +++ b/kpat/freecell.h @@ -33,7 +33,7 @@ public: class FreecellBase : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/gamestats.ui b/kpat/gamestats.ui index 3efbdaa9..f5144f00 100644 --- a/kpat/gamestats.ui +++ b/kpat/gamestats.ui @@ -237,9 +237,6 @@ <property name="text"> <string>&OK</string> </property> - <property name="accel"> - <string></string> - </property> <property name="autoDefault"> <bool>true</bool> </property> @@ -265,8 +262,8 @@ <slot>setGameType(int)</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot>setGameType(int)</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kpat/gamestatsimpl.cpp b/kpat/gamestatsimpl.cpp index 2b27ee74..7b656d11 100644 --- a/kpat/gamestatsimpl.cpp +++ b/kpat/gamestatsimpl.cpp @@ -40,7 +40,7 @@ void GameStatsImpl::setGameType(int id) { // Trick to reset string to original value languageChange(); - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver kcs(config, scores_group); unsigned int t = config->readUnsignedNumEntry(TQString("total%1").arg(id),0); Played->setText(Played->text().arg(t)); diff --git a/kpat/golf.cpp b/kpat/golf.cpp index 0e7adf9f..83e34c38 100644 --- a/kpat/golf.cpp +++ b/kpat/golf.cpp @@ -27,7 +27,7 @@ Golf::Golf( TDEMainWindow* parent, const char* _name) deck = Deck::new_deck( this); deck->move(10, pile_dist); - connect(deck, TQT_SIGNAL(clicked(Card*)), TQT_SLOT(deckClicked(Card*))); + connect(deck, TQ_SIGNAL(clicked(Card*)), TQ_SLOT(deckClicked(Card*))); for( int r = 0; r < 7; r++ ) { stack[r]=new Pile(1+r, this); diff --git a/kpat/golf.h b/kpat/golf.h index 7b6b51fe..cdf4d17f 100644 --- a/kpat/golf.h +++ b/kpat/golf.h @@ -5,7 +5,7 @@ class HorRightPile : public Pile { - Q_OBJECT + TQ_OBJECT public: @@ -15,7 +15,7 @@ public: class Golf : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/grandf.h b/kpat/grandf.h index 6a518264..59091f14 100644 --- a/kpat/grandf.h +++ b/kpat/grandf.h @@ -34,7 +34,7 @@ class Deck; class TDEMainWindow; class Grandf : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/gypsy.cpp b/kpat/gypsy.cpp index ea4727fa..77e6d55b 100644 --- a/kpat/gypsy.cpp +++ b/kpat/gypsy.cpp @@ -12,7 +12,7 @@ Gypsy::Gypsy( TDEMainWindow* parent, const char *name ) deck = Deck::new_deck(this, 2); deck->move(10 + dist_x / 2 + 8*dist_x, 10 + 45 * cardMap::CARDY() / 10); - connect(deck, TQT_SIGNAL(clicked(Card*)), TQT_SLOT(slotClicked(Card *))); + connect(deck, TQ_SIGNAL(clicked(Card*)), TQ_SLOT(slotClicked(Card *))); for (int i=0; i<8; i++) { target[i] = new Pile(i+1, this); diff --git a/kpat/gypsy.h b/kpat/gypsy.h index 96f4502e..0bcd2300 100644 --- a/kpat/gypsy.h +++ b/kpat/gypsy.h @@ -10,7 +10,7 @@ class Deck; class TDEMainWindow; class Gypsy : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/idiot.h b/kpat/idiot.h index 05ce221d..0f720056 100644 --- a/kpat/idiot.h +++ b/kpat/idiot.h @@ -27,7 +27,7 @@ class Idiot: public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/kings.h b/kpat/kings.h index 73b5795a..e908112b 100644 --- a/kpat/kings.h +++ b/kpat/kings.h @@ -8,7 +8,7 @@ class Deck; class TDEMainWindow; class Kings : public FreecellBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/klondike.h b/kpat/klondike.h index 31077d0c..3a792607 100644 --- a/kpat/klondike.h +++ b/kpat/klondike.h @@ -31,7 +31,7 @@ class KlondikePile; class Klondike : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/mod3.cpp b/kpat/mod3.cpp index a6e42a00..25488962 100644 --- a/kpat/mod3.cpp +++ b/kpat/mod3.cpp @@ -37,7 +37,7 @@ Mod3::Mod3( TDEMainWindow* parent, const char* _name) deck = Deck::new_deck( this, 2); deck->move(8 + dist_x * 8 + 20, 8 + dist_y * 3 + margin); - connect(deck, TQT_SIGNAL(clicked(Card*)), TQT_SLOT(deckClicked(Card*))); + connect(deck, TQ_SIGNAL(clicked(Card*)), TQ_SLOT(deckClicked(Card*))); aces = new Pile(50, this); aces->move(16 + dist_x * 8, 8 + dist_y / 2); diff --git a/kpat/mod3.h b/kpat/mod3.h index 396832e2..76d1f9f0 100644 --- a/kpat/mod3.h +++ b/kpat/mod3.h @@ -27,7 +27,7 @@ class Mod3 : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/napoleon.cpp b/kpat/napoleon.cpp index 053b158e..dc23bc1d 100644 --- a/kpat/napoleon.cpp +++ b/kpat/napoleon.cpp @@ -26,7 +26,7 @@ Napoleon::Napoleon( TDEMainWindow* parent, const char* _name ) : Dealer( parent, _name ) { deck = Deck::new_deck( this ); - connect(deck, TQT_SIGNAL(clicked(Card *)), TQT_SLOT(deal1(Card*))); + connect(deck, TQ_SIGNAL(clicked(Card *)), TQ_SLOT(deal1(Card*))); pile = new Pile( 1, this ); pile->setAddFlags( Pile::disallow ); diff --git a/kpat/napoleon.h b/kpat/napoleon.h index fca710f8..d4a8ba7b 100644 --- a/kpat/napoleon.h +++ b/kpat/napoleon.h @@ -24,7 +24,7 @@ #include "dealer.h" class Napoleon : public Dealer { - Q_OBJECT + TQ_OBJECT public: Napoleon (TDEMainWindow* parent=0, const char* name=0); diff --git a/kpat/pile.h b/kpat/pile.h index 0ebabe70..92d13ff4 100644 --- a/kpat/pile.h +++ b/kpat/pile.h @@ -17,7 +17,7 @@ class Dealer; class Pile : public TQObject, public TQCanvasRectangle { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/pwidget.cpp b/kpat/pwidget.cpp index 2eb38fc1..de2a96a7 100644 --- a/kpat/pwidget.cpp +++ b/kpat/pwidget.cpp @@ -30,7 +30,7 @@ #include <kdebug.h> #include <kcarddialog.h> #include <kinputdialog.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdefiledialog.h> #include <tdetempfile.h> #include <tdeio/netaccess.h> @@ -59,29 +59,29 @@ pWidget::pWidget() { current_pwidget = this; // TDECrash::setEmergencySaveFunction(::saveGame); - KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection(), "game_exit"); + KStdAction::quit(tdeApp, TQ_SLOT(quit()), actionCollection(), "game_exit"); - undo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undoMove()), + undo = KStdAction::undo(this, TQ_SLOT(undoMove()), actionCollection(), "undo_move"); undo->setEnabled(false); - (void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), + (void)KStdAction::openNew(this, TQ_SLOT(newGame()), actionCollection(), "new_game"); - (void)KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(openGame()), + (void)KStdAction::open(this, TQ_SLOT(openGame()), actionCollection(), "open"); - recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openGame(const KURL&)), + recent = KStdAction::openRecent(this, TQ_SLOT(openGame(const KURL&)), actionCollection(), "open_recent"); recent->loadEntries(TDEGlobal::config()); - (void)KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveGame()), + (void)KStdAction::saveAs(this, TQ_SLOT(saveGame()), actionCollection(), "save"); - (void)new TDEAction(i18n("&Choose Game..."), 0, TQT_TQOBJECT(this), TQT_SLOT(chooseGame()), + (void)new TDEAction(i18n("&Choose Game..."), 0, this, TQ_SLOT(chooseGame()), actionCollection(), "choose_game"); (void)new TDEAction(i18n("Restart &Game"), TQString::fromLatin1("reload"), 0, - TQT_TQOBJECT(this), TQT_SLOT(restart()), + this, TQ_SLOT(restart()), actionCollection(), "restart_game"); - (void)KStdAction::help(TQT_TQOBJECT(this), TQT_SLOT(helpGame()), actionCollection(), "help_game"); + (void)KStdAction::help(this, TQ_SLOT(helpGame()), actionCollection(), "help_game"); - games = new TDESelectAction(i18n("&Game Type"), 0, TQT_TQOBJECT(this), - TQT_SLOT(newGameType()), + games = new TDESelectAction(i18n("&Game Type"), 0, this, + TQ_SLOT(newGameType()), actionCollection(), "game_type"); TQStringList list; TQValueList<DealerInfo*>::ConstIterator it; @@ -104,8 +104,8 @@ pWidget::pWidget() TDEGlobal::dirs()->addResourceType("wallpaper", TDEStandardDirs::kde_default("data") + "kpat/backgrounds/"); TDEGlobal::dirs()->addResourceType("wallpaper", TDEStandardDirs::kde_default("data") + "ksnake/backgrounds/"); - wallpapers = new TDESelectAction(i18n("&Change Background"), 0, TQT_TQOBJECT(this), - TQT_SLOT(changeWallpaper()), + wallpapers = new TDESelectAction(i18n("&Change Background"), 0, this, + TQ_SLOT(changeWallpaper()), actionCollection(), "wallpaper"); list.clear(); wallpaperlist.clear(); @@ -131,21 +131,21 @@ pWidget::pWidget() (void)new cardMap(midcolor); - backs = new TDEAction(i18n("&Switch Cards..."), 0, TQT_TQOBJECT(this), - TQT_SLOT(changeBackside()), + backs = new TDEAction(i18n("&Switch Cards..."), 0, this, + TQ_SLOT(changeBackside()), actionCollection(), "backside"); - stats = new TDEAction(i18n("&Statistics"), 0, TQT_TQOBJECT(this), TQT_SLOT(showStats()), + stats = new TDEAction(i18n("&Statistics"), 0, this, TQ_SLOT(showStats()), actionCollection(),"game_stats"); animation = new TDEToggleAction(i18n( "&Animation on Startup" ), - 0, TQT_TQOBJECT(this), TQT_SLOT(animationChanged()), + 0, this, TQ_SLOT(animationChanged()), actionCollection(), "animation"); dropaction = new TDEToggleAction(i18n("&Enable Autodrop"), - 0, TQT_TQOBJECT(this), TQT_SLOT(enableAutoDrop()), + 0, this, TQ_SLOT(enableAutoDrop()), actionCollection(), "enable_autodrop"); dropaction->setCheckedState(i18n("Disable Autodrop")); - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver cs(config, settings_group ); TQString bgpath = config->readPathEntry("Background"); @@ -189,7 +189,7 @@ void pWidget::helpGame() { if (!dill) return; - kapp->invokeHelp(dill->anchorName()); + tdeApp->invokeHelp(dill->anchorName()); } void pWidget::undoPossible(bool poss) @@ -198,7 +198,7 @@ void pWidget::undoPossible(bool poss) } void pWidget::changeBackside() { - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver kcs(config, settings_group); TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck()); @@ -262,7 +262,7 @@ void pWidget::changeWallpaper() midcolor = TQColor(r, b, g); if (dill) { - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver kcs(config, settings_group); TQString deck = config->readEntry("Back", KCardDialog::getDefaultDeck()); @@ -278,7 +278,7 @@ void pWidget::changeWallpaper() void pWidget::animationChanged() { bool anim = animation->isChecked(); - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver cs(config, settings_group ); config->writeEntry( "Animation", anim); } @@ -286,7 +286,7 @@ void pWidget::animationChanged() { void pWidget::enableAutoDrop() { bool drop = dropaction->isChecked(); - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver cs(config, settings_group ); config->writeEntry( "Autodrop", drop); dill->setAutoDropEnabled(drop); @@ -308,7 +308,7 @@ void pWidget::newGame() "careaboutstats" ) == KMessageBox::Cancel) return; - dill->setGameNumber(kapp->random()); + dill->setGameNumber(tdeApp->random()); setGameCaption(); restart(); } @@ -347,11 +347,11 @@ void pWidget::newGameType() name = name.replace(TQRegExp("[&']"), ""); name = name.replace(TQRegExp("[ ]"), "_").lower(); dill->setAnchorName("game_" + name); - connect(dill, TQT_SIGNAL(saveGame()), TQT_SLOT(saveGame())); - connect(dill, TQT_SIGNAL(gameInfo(const TQString&)), - TQT_SLOT(slotGameInfo(const TQString &))); - connect(dill, TQT_SIGNAL(updateMoves()), - TQT_SLOT(slotUpdateMoves())); + connect(dill, TQ_SIGNAL(saveGame()), TQ_SLOT(saveGame())); + connect(dill, TQ_SIGNAL(gameInfo(const TQString&)), + TQ_SLOT(slotGameInfo(const TQString &))); + connect(dill, TQ_SIGNAL(updateMoves()), + TQ_SLOT(slotUpdateMoves())); dill->setGameId(id); dill->setupActions(); dill->setBackgroundPixmap(background, midcolor); @@ -365,9 +365,9 @@ void pWidget::newGameType() dill = DealerInfoList::self()->games().first()->createGame(this); } - connect(dill, TQT_SIGNAL(undoPossible(bool)), TQT_SLOT(undoPossible(bool))); - connect(dill, TQT_SIGNAL(gameWon(bool)), TQT_SLOT(gameWon(bool))); - connect(dill, TQT_SIGNAL(gameLost()), TQT_SLOT(gameLost())); + connect(dill, TQ_SIGNAL(undoPossible(bool)), TQ_SLOT(undoPossible(bool))); + connect(dill, TQ_SIGNAL(gameWon(bool)), TQ_SLOT(gameWon(bool))); + connect(dill, TQ_SIGNAL(gameLost()), TQ_SLOT(gameLost())); dill->setAutoDropEnabled(dropaction->isChecked()); @@ -377,7 +377,7 @@ void pWidget::newGameType() setGameCaption(); - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver kcs(config, settings_group); config->writeEntry("DefaultGame", id); @@ -411,7 +411,7 @@ void pWidget::slotUpdateMoves() void pWidget::setBackSide(const TQString &deck, const TQString &cards) { - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver kcs(config, settings_group); TQPixmap pm(deck); if(!pm.isNull()) { @@ -455,7 +455,7 @@ void pWidget::gameWon(bool withhelp) #if TEST_SOLVER == 0 KMessageBox::information(this, congrats, i18n("Congratulations!")); #endif - TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(newGame())); + TQTimer::singleShot(0, this, TQ_SLOT(newGame())); #if TEST_SOLVER == 1 dill->demo(); #endif @@ -491,7 +491,7 @@ void pWidget::gameLost() KStdGuiItem::cont(), dontAskAgainName) == KMessageBox::Yes) { - TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(newGame())); + TQTimer::singleShot(0, this, TQ_SLOT(newGame())); } } diff --git a/kpat/pwidget.h b/kpat/pwidget.h index aa40a917..de6fbd46 100644 --- a/kpat/pwidget.h +++ b/kpat/pwidget.h @@ -34,7 +34,7 @@ class TQWidgetStack; class TQLabel; class pWidget: public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/simon.h b/kpat/simon.h index be6733de..5ec8c3dc 100644 --- a/kpat/simon.h +++ b/kpat/simon.h @@ -4,7 +4,7 @@ #include "dealer.h" class Simon : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/spider.cpp b/kpat/spider.cpp index 383f96a2..03b9847d 100644 --- a/kpat/spider.cpp +++ b/kpat/spider.cpp @@ -68,7 +68,7 @@ Spider::Spider(int suits, TDEMainWindow* parent, const char* _name) redeals[column]->setCheckIndex(0); redeals[column]->setAddFlags(Pile::disallow); redeals[column]->setRemoveFlags(Pile::disallow); - connect(redeals[column], TQT_SIGNAL(clicked(Card*)), TQT_SLOT(deckClicked(Card*))); + connect(redeals[column], TQ_SIGNAL(clicked(Card*)), TQ_SLOT(deckClicked(Card*))); } // The 10 playing piles diff --git a/kpat/spider.h b/kpat/spider.h index 0b5d7a9f..d54db076 100644 --- a/kpat/spider.h +++ b/kpat/spider.h @@ -33,7 +33,7 @@ public: class Spider : public Dealer { - Q_OBJECT + TQ_OBJECT public: diff --git a/kpat/yukon.h b/kpat/yukon.h index 8acb7195..3dc591b2 100644 --- a/kpat/yukon.h +++ b/kpat/yukon.h @@ -4,7 +4,7 @@ #include "dealer.h" class Yukon : public Dealer { - Q_OBJECT + TQ_OBJECT public: |
