summaryrefslogtreecommitdiff
authordrw <drw>2005-05-21 20:11:55 (UTC)
committer drw <drw>2005-05-21 20:11:55 (UTC)
commitafb929e7fd04ecdfec2799a5cf9cf298d1af77c6 (patch) (side-by-side diff)
tree5db439fca569cf1349220f3fbbf155405d13a80d
parentd56ca82c22c3ac6b7dfb0bb7b4d5a0e5ad1ff4f1 (diff)
downloadopie-afb929e7fd04ecdfec2799a5cf9cf298d1af77c6.zip
opie-afb929e7fd04ecdfec2799a5cf9cf298d1af77c6.tar.gz
opie-afb929e7fd04ecdfec2799a5cf9cf298d1af77c6.tar.bz2
Resource -> OResource
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/backgammon/backgammon.cpp34
-rw-r--r--noncore/games/fifteen/fifteen.cpp16
-rw-r--r--noncore/games/mindbreaker/config.in2
-rw-r--r--noncore/games/mindbreaker/mindbreaker.cpp13
-rw-r--r--noncore/games/mindbreaker/opie-mindbreaker.control2
-rw-r--r--noncore/games/minesweep/minesweep.cpp5
-rw-r--r--noncore/games/parashoot/base.cpp5
-rw-r--r--noncore/games/parashoot/bullet.cpp5
-rw-r--r--noncore/games/parashoot/cannon.cpp5
-rw-r--r--noncore/games/parashoot/helicopter.cpp4
-rw-r--r--noncore/games/parashoot/interface.cpp10
-rw-r--r--noncore/games/parashoot/man.cpp7
-rw-r--r--noncore/games/solitaire/canvascard.cpp51
-rw-r--r--noncore/games/solitaire/canvascardgame.h1
-rw-r--r--noncore/games/solitaire/canvascardwindow.cpp7
-rw-r--r--noncore/games/tetrix/qtetrix.cpp4
-rw-r--r--noncore/games/wordgame/wordgame.cpp22
-rw-r--r--noncore/games/zlines/ballpainter.cpp4
18 files changed, 96 insertions, 101 deletions
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index c286a36..31835f8 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -8,7 +8,7 @@
/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
-#include <qpe/resource.h>
using namespace Opie::Core;
@@ -28,5 +28,5 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
if (!name) setName("BackGammon");
setCaption(tr( "Backgammon") );
- setIcon( Resource::loadPixmap( "backgammon" ) );
+ setIcon( Opie::Core::OResource::loadPixmap( "backgammon" ) );
//general counter varaible
int a=0;
@@ -170,5 +170,5 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
p1=new CanvasImageItem*[15];
p1_side=new CanvasImageItem*[15];
- QImage piece_1_all(Resource::loadImage("backgammon/pieces/"+piecesA_name));
+ QImage piece_1_all(Opie::Core::OResource::loadImage("backgammon/pieces/"+piecesA_name));
QImage piece_1_front=piece_1_all.copy(0,0,15,15);
QImage piece_1_side=piece_1_all.copy(0,15,15,5);
@@ -176,5 +176,5 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
p2=new CanvasImageItem*[15];
p2_side=new CanvasImageItem*[15];
- QImage piece_2_all(Resource::loadImage("backgammon/pieces/"+piecesB_name));
+ QImage piece_2_all(Opie::Core::OResource::loadImage("backgammon/pieces/"+piecesB_name));
QImage piece_2_front=piece_2_all.copy(0,0,15,15);
QImage piece_2_side=piece_2_all.copy(0,15,15,5);
@@ -196,11 +196,11 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
//the dice
- QImage dicebgA_all(Resource::loadImage("backgammon/dice/"+diceA_name));
+ QImage dicebgA_all(Opie::Core::OResource::loadImage("backgammon/dice/"+diceA_name));
diceA1=new CanvasImageItem*[7];
diceA2=new CanvasImageItem*[7];
- QImage dicebgB_all(Resource::loadImage("backgammon/dice/"+diceB_name));
+ QImage dicebgB_all(Opie::Core::OResource::loadImage("backgammon/dice/"+diceB_name));
diceB1=new CanvasImageItem*[7];
diceB2=new CanvasImageItem*[7];
- QImage oddsbg_all=(Resource::loadImage("backgammon/odds/"+odds_name));
+ QImage oddsbg_all=(Opie::Core::OResource::loadImage("backgammon/odds/"+odds_name));
//oddsDice=new CanvasImageItem*[6];
@@ -248,5 +248,5 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
//set the board
- QImage boardbg(Resource::loadImage("backgammon/boards/"+board_name));
+ QImage boardbg(Opie::Core::OResource::loadImage("backgammon/boards/"+board_name));
board=new CanvasImageItem(boardbg,area);
board->setX(0);
@@ -257,5 +257,5 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
//the table
- QImage tablebg(Resource::loadImage("backgammon/table/"+table_name));
+ QImage tablebg(Opie::Core::OResource::loadImage("backgammon/table/"+table_name));
table=new CanvasImageItem(tablebg,area);
table->setX(0);
@@ -266,5 +266,5 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
//the no move marker
- QImage nomovebg(Resource::loadImage("backgammon/no_move"));
+ QImage nomovebg(Opie::Core::OResource::loadImage("backgammon/no_move"));
nomove_marker=new CanvasImageItem(nomovebg,area);
nomove_marker->setX(0);
@@ -925,15 +925,15 @@ void BackGammon::autoroll_dice2()
void BackGammon::applytheme()
{
- QImage boardbg(Resource::loadImage("backgammon/boards/"+board_name));
+ QImage boardbg(Opie::Core::OResource::loadImage("backgammon/boards/"+board_name));
board->setImage(boardbg);
- QImage tablebg(Resource::loadImage("backgammon/table/"+table_name));
+ QImage tablebg(Opie::Core::OResource::loadImage("backgammon/table/"+table_name));
table->setImage(tablebg);
- QImage piece_1_all(Resource::loadImage("backgammon/pieces/"+piecesA_name));
+ QImage piece_1_all(Opie::Core::OResource::loadImage("backgammon/pieces/"+piecesA_name));
QImage piece_1_front=piece_1_all.copy(0,0,15,15);
QImage piece_1_side=piece_1_all.copy(0,15,15,5);
- QImage piece_2_all(Resource::loadImage("backgammon/pieces/"+piecesB_name));
+ QImage piece_2_all(Opie::Core::OResource::loadImage("backgammon/pieces/"+piecesB_name));
QImage piece_2_front=piece_2_all.copy(0,0,15,15);
QImage piece_2_side=piece_2_all.copy(0,15,15,5);
@@ -950,7 +950,7 @@ void BackGammon::applytheme()
draw();
- QImage dicebgA_all(Resource::loadImage("backgammon/dice/"+diceA_name));
- QImage dicebgB_all(Resource::loadImage("backgammon/dice/"+diceB_name));
- QImage oddsbg_all=(Resource::loadImage("backgammon/odds/"+odds_name));
+ QImage dicebgA_all(Opie::Core::OResource::loadImage("backgammon/dice/"+diceA_name));
+ QImage dicebgB_all(Opie::Core::OResource::loadImage("backgammon/dice/"+diceB_name));
+ QImage oddsbg_all=(Opie::Core::OResource::loadImage("backgammon/odds/"+odds_name));
for(a=0;a<7;a++)
diff --git a/noncore/games/fifteen/fifteen.cpp b/noncore/games/fifteen/fifteen.cpp
index bb57ee1..c41c0a4 100644
--- a/noncore/games/fifteen/fifteen.cpp
+++ b/noncore/games/fifteen/fifteen.cpp
@@ -24,6 +24,6 @@
#include <opie2/ofileselector.h>
+#include <opie2/oresource.h>
-#include <qtopia/resource.h>
#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
@@ -53,4 +53,5 @@ FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name, WFlags f
menubar->setMargin(0);
QPopupMenu *game = new QPopupMenu( this );
+ menubar->insertItem( tr( "Game" ), game );
QWidget *spacer = new QWidget( toolbar );
@@ -66,5 +67,5 @@ FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name, WFlags f
- QAction *a = new QAction( tr( "Randomize" ), Resource::loadPixmap( "new" ),
+ QAction *a = new QAction( tr( "Randomize" ), Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), table, SLOT( slotRandomize() ) );
@@ -73,17 +74,8 @@ FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name, WFlags f
- a = new QAction( tr("Configure"), Resource::loadPixmap( "SettingsIcon" ),
+ a = new QAction( tr("Configure"), Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ),
QString::null, 0, this, 0 );
connect( a, SIGNAL( activated()), table, SLOT( slotConfigure()) );
a->addTo( game );
-
- /* This is pointless and confusing.
- a = new QAction( tr( "Solve" ), Resource::loadIconSet( "repeat" ),
- QString::null, 0, this, 0 );
- connect( a, SIGNAL( activated() ), table, SLOT( slotReset() ) );
- a->addTo( game );
- a->addTo( toolbar );
- */
- menubar->insertItem( tr( "Game" ), game );
}
diff --git a/noncore/games/mindbreaker/config.in b/noncore/games/mindbreaker/config.in
index b97a9e8..e3c0812 100644
--- a/noncore/games/mindbreaker/config.in
+++ b/noncore/games/mindbreaker/config.in
@@ -2,3 +2,3 @@
boolean "opie-mindbreaker (crack the coloured code)"
default "y"
- depends ( LIBQPE || LIBQPE-X11 )
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE
diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp
index 1f554d2..aa4afd7 100644
--- a/noncore/games/mindbreaker/mindbreaker.cpp
+++ b/noncore/games/mindbreaker/mindbreaker.cpp
@@ -21,5 +21,6 @@
#include "mindbreaker.h"
-#include <qtopia/resource.h>
+#include <opie2/oresource.h>
+
#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
@@ -140,5 +141,5 @@ QVector<QImage> Peg::specialPegs;
void Peg::buildImages()
{
- QImage pegs = Resource::loadImage("mindbreaker/pegs");
+ QImage pegs = Opie::Core::OResource::loadImage("mindbreaker/pegs");
int x = 0;
int y = 0;
@@ -158,5 +159,5 @@ void Peg::buildImages()
}
- QImage image = Resource::loadImage("mindbreaker/mindbreaker");
+ QImage image = Opie::Core::OResource::loadImage("mindbreaker/mindbreaker");
/* copy from master image to functional images */
x = 0;
@@ -290,7 +291,7 @@ MindBreaker::MindBreaker( QWidget *parent, const char *name, int wFlags )
tb->setHorizontalStretchable( TRUE );
- QIconSet newicon = Resource::loadIconSet("new");
- new QToolButton(newicon, tr("New Game"), 0,
+ QToolButton *btn = new QToolButton( Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon), tr("New Game"), 0,
board, SLOT(clear()), tb, "NewGame");
+ btn->setUsesBigPixmap( qApp->desktop()->size().width() > 330 );
score = new QToolButton(tb);
@@ -484,5 +485,5 @@ void MindBreakerBoard::doFixSize()
Peg::buildImages(); // must be done BEFORE any pegs are made
- QImage image = Resource::loadImage("mindbreaker/mindbreaker");
+ QImage image = Opie::Core::OResource::loadImage("mindbreaker/mindbreaker");
/* copy from master image to functional images */
diff --git a/noncore/games/mindbreaker/opie-mindbreaker.control b/noncore/games/mindbreaker/opie-mindbreaker.control
index 5b342da..d3826fd 100644
--- a/noncore/games/mindbreaker/opie-mindbreaker.control
+++ b/noncore/games/mindbreaker/opie-mindbreaker.control
@@ -5,5 +5,5 @@ Section: opie/games
Maintainer: Martin Imobersteg <imm@gmx.ch>
Architecture: arm
-Depends: task-opie-minimal
+Depends: task-opie-minimal, libopiecore2
Description: Game: crack the coloured code
A game for the Opie environment.
diff --git a/noncore/games/minesweep/minesweep.cpp b/noncore/games/minesweep/minesweep.cpp
index c14609d..18449ff 100644
--- a/noncore/games/minesweep/minesweep.cpp
+++ b/noncore/games/minesweep/minesweep.cpp
@@ -22,6 +22,7 @@
#include "minefield.h"
+#include <opie2/oresource.h>
+
#include <qtopia/qpeapplication.h>
-#include <qtopia/resource.h>
#include <qtopia/config.h>
@@ -243,5 +244,5 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
setCaption( tr("Mine Sweep") );
QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff );
- setIcon( Resource::loadPixmap( "minesweep/MineSweep" ) );
+ setIcon( Opie::Core::OResource::loadPixmap( "minesweep/MineSweep" ) );
QToolBar *toolBar = new QToolBar( this );
diff --git a/noncore/games/parashoot/base.cpp b/noncore/games/parashoot/base.cpp
index 5f3c79d..f232536 100644
--- a/noncore/games/parashoot/base.cpp
+++ b/noncore/games/parashoot/base.cpp
@@ -21,6 +21,5 @@
#include "base.h"
-#include <qtopia/resource.h>
-
+#include <opie2/oresource.h>
int damage;
@@ -32,5 +31,5 @@ Base::Base(QCanvas* canvas) :
{
basearray = new QCanvasPixmapArray();
- QString b0 = Resource::findPixmap("parashoot/b0001");
+ QString b0 = Opie::Core::OResource::findPixmap("parashoot/b0001");
b0.replace(QRegExp("0001"),"%1");
basearray->readPixmaps(b0, 4);
diff --git a/noncore/games/parashoot/bullet.cpp b/noncore/games/parashoot/bullet.cpp
index 584f564..1f02251 100644
--- a/noncore/games/parashoot/bullet.cpp
+++ b/noncore/games/parashoot/bullet.cpp
@@ -24,5 +24,6 @@
#include "helicopter.h"
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
+
#include <qpe/qmath.h>
@@ -36,5 +37,5 @@ Bullet::Bullet(QCanvas* canvas, double angle, int cannonx, int cannony) :
bang("collide01")
{
- QCanvasPixmapArray* bulletarray = new QCanvasPixmapArray(Resource::findPixmap("parashoot/bullet"));
+ QCanvasPixmapArray* bulletarray = new QCanvasPixmapArray(Opie::Core::OResource::findPixmap("parashoot/bullet"));
setSequence(bulletarray);
if (nobullets < limit) {
diff --git a/noncore/games/parashoot/cannon.cpp b/noncore/games/parashoot/cannon.cpp
index 330d850..2f4c353 100644
--- a/noncore/games/parashoot/cannon.cpp
+++ b/noncore/games/parashoot/cannon.cpp
@@ -19,6 +19,5 @@
**********************************************************************/
-#include <qtopia/resource.h>
-
+#include <opie2/oresource.h>
#include "codes.h"
@@ -33,5 +32,5 @@ shotsfired=0;
cannony = 0;
cannonarray = new QCanvasPixmapArray();
- QString c0 = Resource::findPixmap("parashoot/can0001");
+ QString c0 = Opie::Core::OResource::findPixmap("parashoot/can0001");
c0.replace(QRegExp("0001"),"%1");
cannonarray->readPixmaps(c0,17);
diff --git a/noncore/games/parashoot/helicopter.cpp b/noncore/games/parashoot/helicopter.cpp
index 7d91cd1..42adc34 100644
--- a/noncore/games/parashoot/helicopter.cpp
+++ b/noncore/games/parashoot/helicopter.cpp
@@ -23,5 +23,5 @@
#include "codes.h"
-#include <qtopia/resource.h>
+#include <opie2/oresource.h>
@@ -35,5 +35,5 @@ Helicopter::Helicopter(QCanvas* canvas) :
hits = 0;
QCanvasPixmapArray* helicopterarray = new QCanvasPixmapArray();
- QString h0 = Resource::findPixmap("parashoot/helicopter0001");
+ QString h0 = Opie::Core::OResource::findPixmap("parashoot/helicopter0001");
h0.replace(QRegExp("0001"),"%1");
helicopterarray->readPixmaps(h0,4 );
diff --git a/noncore/games/parashoot/interface.cpp b/noncore/games/parashoot/interface.cpp
index 5c9b0ef..8ec7032 100644
--- a/noncore/games/parashoot/interface.cpp
+++ b/noncore/games/parashoot/interface.cpp
@@ -22,6 +22,7 @@
#include "man.h"
+#include <opie2/oresource.h>
+
#include <qtopia/qpeapplication.h>
-#include <qtopia/resource.h>
#include <qtoolbar.h>
@@ -53,6 +54,7 @@ ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
setCaption( tr("ParaShoot") );
- new QToolButton( Resource::loadIconSet("new"), tr("New Game"), 0,
- this, SLOT(newGame()), toolbar, "New Game");
+ QToolButton *btn = new QToolButton( Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon),
+ tr("New Game"), 0, this, SLOT(newGame()), toolbar, "New Game");
+ btn->setUsesBigPixmap( qApp->desktop()->size().width() > 330 );
levelscore = new QLabel(toolbar);
@@ -80,5 +82,5 @@ void ParaShoot::resizeEvent(QResizeEvent *)
canvas.resize( s.width() - fw - 2, s.height() - fw - 2);
- QImage bgimage = Resource::loadImage("parashoot/sky");
+ QImage bgimage = Opie::Core::OResource::loadImage("parashoot/sky");
QPixmap bgpixmap;
diff --git a/noncore/games/parashoot/man.cpp b/noncore/games/parashoot/man.cpp
index 0a151b0..080615e 100644
--- a/noncore/games/parashoot/man.cpp
+++ b/noncore/games/parashoot/man.cpp
@@ -23,6 +23,5 @@
#include "base.h"
-#include <qtopia/resource.h>
-
+#include <opie2/oresource.h>
int mancount;
@@ -33,5 +32,5 @@ Man::Man(QCanvas* canvas) :
{
manarray = new QCanvasPixmapArray();
- QString m0 = Resource::findPixmap("parashoot/man0001");
+ QString m0 = Opie::Core::OResource::findPixmap("parashoot/man0001");
m0.replace(QRegExp("0001"),"%1");
manarray->readPixmaps(m0, 7);
@@ -48,5 +47,5 @@ Man::Man(QCanvas* canvas, int x, int y) :
{
manarray = new QCanvasPixmapArray();
- QString m0 = Resource::findPixmap("parashoot/man0001");
+ QString m0 = Opie::Core::OResource::findPixmap("parashoot/man0001");
m0.replace(QString("0001"),"%1");
manarray->readPixmaps(m0, 7);
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
@@ -21,5 +21,5 @@
#include "canvascard.h"
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
#include <qgfx_qws.h> // Needed to get the device's width
@@ -100,13 +100,17 @@ CanvasCard::CanvasCard( eValue v, eSuit s, bool f, QCanvas *canvas ) :
if ( !cardsFaces ) {
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" );
}
cardsCharsUpsideDown = Create180RotatedBitmap( cardsChars );
@@ -133,26 +137,26 @@ void CanvasCard::setCardBack(int b)
switch (cardBack) {
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;
}
} else {
switch (cardBack) {
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;
}
}
@@ -182,15 +186,6 @@ void CanvasCard::draw(QPainter &painter)
if ( isFacing() ) {
-/*
- // 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 ) );
diff --git a/noncore/games/solitaire/canvascardgame.h b/noncore/games/solitaire/canvascardgame.h
index b93cfbf..c559a90 100644
--- a/noncore/games/solitaire/canvascardgame.h
+++ b/noncore/games/solitaire/canvascardgame.h
@@ -25,5 +25,4 @@
#include "canvascard.h"
-#include <qpe/resource.h>
#include <qpe/config.h>
diff --git a/noncore/games/solitaire/canvascardwindow.cpp b/noncore/games/solitaire/canvascardwindow.cpp
index 503bc92..956c5bd 100644
--- a/noncore/games/solitaire/canvascardwindow.cpp
+++ b/noncore/games/solitaire/canvascardwindow.cpp
@@ -25,6 +25,5 @@
#include "teeclubcardgame.h"
-
-
+#include <opie2/oresource.h>
CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) :
@@ -32,5 +31,5 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f)
cardGame(NULL)
{
- setIcon( Resource::loadPixmap( "cards" ) );
+ setIcon( Opie::Core::OResource::loadPixmap( "cards" ) );
setCaption(tr("Patience"));
@@ -42,5 +41,5 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f)
} else {
QPixmap bg;
- bg.convertFromImage( Resource::loadImage( "table_pattern" ), ThresholdDither );
+ bg.convertFromImage( Opie::Core::OResource::loadImage( "table_pattern" ), ThresholdDither );
canvas.setBackgroundPixmap(bg);
}
diff --git a/noncore/games/tetrix/qtetrix.cpp b/noncore/games/tetrix/qtetrix.cpp
index a6a5f34..d949176 100644
--- a/noncore/games/tetrix/qtetrix.cpp
+++ b/noncore/games/tetrix/qtetrix.cpp
@@ -22,5 +22,5 @@
#include "qtetrix.h"
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
#include <qlabel.h>
@@ -98,5 +98,5 @@ QTetrix::QTetrix( QWidget *parent, const char *name, WFlags f )
: QMainWindow( parent, name, f )
{
- setIcon( Resource::loadPixmap( "tetrix_icon" ) );
+ setIcon( Opie::Core::OResource::loadPixmap( "tetrix_icon" ) );
setCaption( tr("Tetrix" ) );
diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp
index 47d6725..52e2be2 100644
--- a/noncore/games/wordgame/wordgame.cpp
+++ b/noncore/games/wordgame/wordgame.cpp
@@ -22,6 +22,7 @@
#include "wordgame.h"
+#include <opie2/oresource.h>
+
#include <qpe/global.h>
-#include <qpe/resource.h>
#include <qpe/config.h>
@@ -119,5 +120,5 @@ WordGame::WordGame( QWidget* parent, const char* name, WFlags fl ) :
}
- setIcon( Resource::loadPixmap( "wordgame/WordGame.png" ) );
+ setIcon( Opie::Core::OResource::loadPixmap( "wordgame/WordGame" ) );
setCaption( tr("Word Game") );
@@ -128,9 +129,16 @@ WordGame::WordGame( QWidget* parent, const char* name, WFlags fl ) :
toolbar = new QToolBar(this);
addToolBar(toolbar, Bottom);
- reset = new QToolButton(Resource::loadPixmap("back"), tr("Back"), "", this, SLOT(resetTurn()), toolbar);
- done = new QToolButton(Resource::loadPixmap("done"), tr("Done"), "", this, SLOT(endTurn()), toolbar);
+ bool useBigIcon = qApp->desktop()->size().width() > 330;
+ reset = new QToolButton(Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon),
+ tr("Back"), "", this, SLOT(resetTurn()), toolbar);
+ reset->setUsesBigPixmap( useBigIcon );
+ done = new QToolButton(Opie::Core::OResource::loadPixmap("done", Opie::Core::OResource::SmallIcon),
+ tr("Done"), "", this, SLOT(endTurn()), toolbar);
+ done->setUsesBigPixmap( useBigIcon );
scoreinfo = new ScoreInfo(toolbar);
scoreinfo->setFont(QFont("Helvetica",10));
- new QToolButton(Resource::loadPixmap("finish"), tr("Close"), "", this, SLOT(endGame()), toolbar);
+ QToolButton *btn = new QToolButton(Opie::Core::OResource::loadPixmap("finish", Opie::Core::OResource::SmallIcon),
+ tr("Close"), "", this, SLOT(endGame()), toolbar);
+ btn->setUsesBigPixmap( useBigIcon );
toolbar->setStretchableWidget(scoreinfo);
@@ -306,5 +314,5 @@ bool WordGame::loadRules(const QString &name)
}
- QImage shim = Resource::loadImage("wordgame/wordgame_shapes");
+ QImage shim = Opie::Core::OResource::loadImage("wordgame/wordgame_shapes");
shim = shim.smoothScale((re-1)*TileItem::smallWidth(),TileItem::smallHeight());
QPixmap bgshapes;
@@ -1363,5 +1371,5 @@ void Rack::contentsMouseMoveEvent(QMouseEvent* e)
}
-void Rack::contentsMouseReleaseEvent(QMouseEvent* e)
+void Rack::contentsMouseReleaseEvent(QMouseEvent* /*e*/)
{
if ( computerized() )
diff --git a/noncore/games/zlines/ballpainter.cpp b/noncore/games/zlines/ballpainter.cpp
index 622ec29..e7596c4 100644
--- a/noncore/games/zlines/ballpainter.cpp
+++ b/noncore/games/zlines/ballpainter.cpp
@@ -18,5 +18,5 @@
***************************************************************************/
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
#include "ballpainter.h"
@@ -60,5 +60,5 @@ QPixmap* BallPainter::pixmap( enum Pixmaps pix )
}
- return new QPixmap(Resource::loadPixmap(name) );
+ return new QPixmap(Opie::Core::OResource::loadPixmap(name) );
}