summaryrefslogtreecommitdiff
path: root/noncore/games/parashoot/interface.cpp
Side-by-side diff
Diffstat (limited to 'noncore/games/parashoot/interface.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/parashoot/interface.cpp10
1 files changed, 6 insertions, 4 deletions
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
@@ -12,26 +12,27 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "interface.h"
#include "man.h"
+#include <opie2/oresource.h>
+
#include <qtopia/qpeapplication.h>
-#include <qtopia/resource.h>
#include <qtoolbar.h>
#include <qtoolbutton.h>
ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
QMainWindow(parent,name,f),
canvas( 232, 258 ),
cannon(NULL),
base(NULL),
gamestopped( true ),
waitover( false ),
fanfare("level_up"),
@@ -43,26 +44,27 @@ ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
updatespeed = 80;
canvas.setAdvancePeriod(80);
pb = new QCanvasView(&canvas, this);
pb->setFocus();
setToolBarsMovable( FALSE );
QToolBar* toolbar = new QToolBar(this);
toolbar->setHorizontalStretchable( TRUE );
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);
levelscore->setBackgroundMode( PaletteButton );
levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
toolbar->setStretchableWidget( levelscore );
showScore(0,0);
setCentralWidget(pb);
autoDropTimer = new QTimer(this);
connect (autoDropTimer, SIGNAL(timeout()), this, SLOT(play()) );
@@ -70,25 +72,25 @@ ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
setFocusPolicy(StrongFocus);
}
void ParaShoot::resizeEvent(QResizeEvent *)
{
QSize s = centralWidget()->size();
int fw = style().defaultFrameWidth();
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;
bgpixmap.convertFromImage(bgimage.smoothScale(canvas.width(),
canvas.height()), QPixmap::Auto);
canvas.setBackgroundPixmap(bgpixmap);
if (base) {
base->reposition();
}
if (cannon) {
cannon->reposition();