Diffstat (limited to 'noncore/games/parashoot/interface.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/parashoot/interface.cpp | 10 |
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 | |||
@@ -18,14 +18,15 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "interface.h" | 21 | #include "interface.h" |
22 | #include "man.h" | 22 | #include "man.h" |
23 | 23 | ||
24 | #include <opie2/oresource.h> | ||
25 | |||
24 | #include <qtopia/qpeapplication.h> | 26 | #include <qtopia/qpeapplication.h> |
25 | #include <qtopia/resource.h> | ||
26 | 27 | ||
27 | #include <qtoolbar.h> | 28 | #include <qtoolbar.h> |
28 | #include <qtoolbutton.h> | 29 | #include <qtoolbutton.h> |
29 | 30 | ||
30 | ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) : | 31 | ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) : |
31 | QMainWindow(parent,name,f), | 32 | QMainWindow(parent,name,f), |
@@ -49,14 +50,15 @@ ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) : | |||
49 | setToolBarsMovable( FALSE ); | 50 | setToolBarsMovable( FALSE ); |
50 | 51 | ||
51 | QToolBar* toolbar = new QToolBar(this); | 52 | QToolBar* toolbar = new QToolBar(this); |
52 | toolbar->setHorizontalStretchable( TRUE ); | 53 | toolbar->setHorizontalStretchable( TRUE ); |
53 | 54 | ||
54 | setCaption( tr("ParaShoot") ); | 55 | setCaption( tr("ParaShoot") ); |
55 | new QToolButton( Resource::loadIconSet("new"), tr("New Game"), 0, | 56 | QToolButton *btn = new QToolButton( Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon), |
56 | this, SLOT(newGame()), toolbar, "New Game"); | 57 | tr("New Game"), 0, this, SLOT(newGame()), toolbar, "New Game"); |
58 | btn->setUsesBigPixmap( qApp->desktop()->size().width() > 330 ); | ||
57 | 59 | ||
58 | levelscore = new QLabel(toolbar); | 60 | levelscore = new QLabel(toolbar); |
59 | levelscore->setBackgroundMode( PaletteButton ); | 61 | levelscore->setBackgroundMode( PaletteButton ); |
60 | levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); | 62 | levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); |
61 | toolbar->setStretchableWidget( levelscore ); | 63 | toolbar->setStretchableWidget( levelscore ); |
62 | showScore(0,0); | 64 | showScore(0,0); |
@@ -76,13 +78,13 @@ ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) : | |||
76 | void ParaShoot::resizeEvent(QResizeEvent *) | 78 | void ParaShoot::resizeEvent(QResizeEvent *) |
77 | { | 79 | { |
78 | QSize s = centralWidget()->size(); | 80 | QSize s = centralWidget()->size(); |
79 | int fw = style().defaultFrameWidth(); | 81 | int fw = style().defaultFrameWidth(); |
80 | canvas.resize( s.width() - fw - 2, s.height() - fw - 2); | 82 | canvas.resize( s.width() - fw - 2, s.height() - fw - 2); |
81 | 83 | ||
82 | QImage bgimage = Resource::loadImage("parashoot/sky"); | 84 | QImage bgimage = Opie::Core::OResource::loadImage("parashoot/sky"); |
83 | QPixmap bgpixmap; | 85 | QPixmap bgpixmap; |
84 | 86 | ||
85 | bgpixmap.convertFromImage(bgimage.smoothScale(canvas.width(), | 87 | bgpixmap.convertFromImage(bgimage.smoothScale(canvas.width(), |
86 | canvas.height()), QPixmap::Auto); | 88 | canvas.height()), QPixmap::Auto); |
87 | canvas.setBackgroundPixmap(bgpixmap); | 89 | canvas.setBackgroundPixmap(bgpixmap); |
88 | 90 | ||