summaryrefslogtreecommitdiff
path: root/noncore/games/solitaire/canvascardgame.cpp
Unidiff
Diffstat (limited to 'noncore/games/solitaire/canvascardgame.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/solitaire/canvascardgame.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/games/solitaire/canvascardgame.cpp b/noncore/games/solitaire/canvascardgame.cpp
index ef35287..357e798 100644
--- a/noncore/games/solitaire/canvascardgame.cpp
+++ b/noncore/games/solitaire/canvascardgame.cpp
@@ -357,29 +357,31 @@ void CanvasCardGame::contentsMouseReleaseEvent(QMouseEvent *e)
357 } 357 }
358 } 358 }
359 359
360 moved = FALSE; 360 moved = FALSE;
361} 361}
362 362
363 363
364void CanvasCardGame::readPile( Config& cfg, CardPile *pile, QString name, int& highestZ ) 364void CanvasCardGame::readPile( Config& cfg, CardPile *pile, QString name, int& highestZ )
365{ 365{
366 cfg.setGroup( name ); 366 cfg.setGroup( name );
367 int numberOfCards = cfg.readNumEntry("NumberOfCards", 0); 367 int numberOfCards = cfg.readNumEntry("NumberOfCards", 0);
368 Card *card = NULL; 368 Card *card = NULL;
369
369 for ( int i = 0; i < numberOfCards; i++ ) { 370 for ( int i = 0; i < numberOfCards; i++ ) {
370 QString cardStr; 371 QString cardStr;
371 cardStr.sprintf( "%i", i ); 372 cardStr.sprintf( "%i", i );
372 int val = cfg.readNumEntry( "Card" + cardStr ); 373 int val = cfg.readNumEntry( "Card" + cardStr );
373 bool facing = cfg.readBoolEntry( "CardFacing" + cardStr ); 374 bool facing = cfg.readBoolEntry( "CardFacing" + cardStr );
374 card = cards[ val ]; 375
376 card = cards[ val ];
375 card->setFace(facing); 377 card->setFace(facing);
376 pile->addCardToTop(card); 378 pile->addCardToTop(card);
377 card->setCardPile(pile); 379 card->setCardPile(pile);
378 QPoint p = pile->getCardPos( card ); 380 QPoint p = pile->getCardPos( card );
379 card->setPos( p.x(), p.y(), highestZ ); 381 card->setPos( p.x(), p.y(), highestZ );
380 card->showCard(); 382 card->showCard();
381 highestZ++; 383 highestZ++;
382 } 384 }
383} 385}
384 386
385 387