author | drw <drw> | 2005-05-21 20:11:55 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-21 20:11:55 (UTC) |
commit | afb929e7fd04ecdfec2799a5cf9cf298d1af77c6 (patch) (side-by-side diff) | |
tree | 5db439fca569cf1349220f3fbbf155405d13a80d /noncore/games/solitaire/canvascard.cpp | |
parent | d56ca82c22c3ac6b7dfb0bb7b4d5a0e5ad1ff4f1 (diff) | |
download | opie-afb929e7fd04ecdfec2799a5cf9cf298d1af77c6.zip opie-afb929e7fd04ecdfec2799a5cf9cf298d1af77c6.tar.gz opie-afb929e7fd04ecdfec2799a5cf9cf298d1af77c6.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'noncore/games/solitaire/canvascard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/solitaire/canvascard.cpp | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/noncore/games/solitaire/canvascard.cpp b/noncore/games/solitaire/canvascard.cpp index c36da6c..cd298ef 100644 --- a/noncore/games/solitaire/canvascard.cpp +++ b/noncore/games/solitaire/canvascard.cpp @@ -22,3 +22,3 @@ -#include <qpe/resource.h> +#include <opie2/oresource.h> @@ -101,11 +101,15 @@ CanvasCard::CanvasCard( eValue v, eSuit s, bool f, QCanvas *canvas ) : if ( qt_screen->deviceWidth() < 200 ) { - cardsFaces = new QPixmap( Resource::loadPixmap( "cards/card_face_small" ) ); - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001_small" ) ); - cardsChars = new QBitmap( Resource::loadBitmap( "cards/card_chars_small" ) ); - cardsSuits = new QBitmap( Resource::loadBitmap( "cards/card_suits_small" ) ); + cardsFaces = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_face_small" ) ); + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0001_small" ) ); + cardsChars = new QBitmap(); + *cardsChars = Opie::Core::OResource::loadPixmap( "cards/card_chars_small" ); + cardsSuits = new QBitmap(); + *cardsSuits = Opie::Core::OResource::loadPixmap( "cards/card_suits_small" ); } else { - cardsFaces = new QPixmap( Resource::loadPixmap( "cards/card_face" ) ); - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001" ) ); - cardsChars = new QBitmap( Resource::loadBitmap( "cards/card_chars" ) ); - cardsSuits = new QBitmap( Resource::loadBitmap( "cards/card_suits" ) ); + cardsFaces = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_face" ) ); + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0001" ) ); + cardsChars = new QBitmap(); + *cardsChars = Opie::Core::OResource::loadPixmap( "cards/card_chars" ); + cardsSuits = new QBitmap(); + *cardsSuits = Opie::Core::OResource::loadPixmap( "cards/card_suits" ); } @@ -134,11 +138,11 @@ void CanvasCard::setCardBack(int b) case 0: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001_small" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0001_small" ) ); break; case 1: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0002_small" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0002_small" ) ); break; case 2: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0003_small" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0003_small" ) ); break; case 3: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0004_small" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0004_small" ) ); break; case 4: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0005_small" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0005_small" ) ); break; } @@ -147,11 +151,11 @@ void CanvasCard::setCardBack(int b) case 0: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0001" ) ); break; case 1: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0002" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0002" ) ); break; case 2: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0003" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0003" ) ); break; case 3: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0004" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0004" ) ); break; case 4: - cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0005" ) ); break; + cardsBacks = new QPixmap( Opie::Core::OResource::loadPixmap( "cards/card_back0005" ) ); break; } @@ -183,13 +187,4 @@ void CanvasCard::draw(QPainter &painter) -/* - // Now add the joker and card backs to the list of pixmaps - QPixmap *CardsBack = new QPixmap( Resource::loadPixmap( "cards/card_joker.png" ) ); - QPoint *newBackHotspot = new QPoint( 0, 0 ); - pixmaps->append((const QPixmap *)CardsBack); - hotspots->append((const QPoint *)newBackHotspot); -*/ - int w = cardsFaces->width(), h = cardsFaces->height(); -// p->setBrush( NoBrush ); p->setBrush( QColor( 0xFF, 0xFF, 0xFF ) ); |