summaryrefslogtreecommitdiff
path: root/noncore/games/parashoot/interface.cpp
Unidiff
Diffstat (limited to 'noncore/games/parashoot/interface.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/parashoot/interface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/parashoot/interface.cpp b/noncore/games/parashoot/interface.cpp
index 84e5e60..db98720 100644
--- a/noncore/games/parashoot/interface.cpp
+++ b/noncore/games/parashoot/interface.cpp
@@ -24,49 +24,49 @@
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qstyle.h> 29#include <qstyle.h>
30#include <qpe/qpetoolbar.h> 30#include <qpe/qpetoolbar.h>
31#include <qtoolbutton.h> 31#include <qtoolbutton.h>
32 32
33ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) : 33ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
34 QMainWindow(parent,name,f), 34 QMainWindow(parent,name,f),
35 canvas(232, 258), 35 canvas(232, 258),
36 fanfare("level_up"), 36 fanfare("level_up"),
37 score(0) 37 score(0)
38{ 38{
39 canvas.setAdvancePeriod(80); 39 canvas.setAdvancePeriod(80);
40 QPixmap bg = Resource::loadPixmap("parashoot/sky"); 40 QPixmap bg = Resource::loadPixmap("parashoot/sky");
41 canvas.setBackgroundPixmap(bg); 41 canvas.setBackgroundPixmap(bg);
42 42
43 pb = new QCanvasView(&canvas, this); 43 pb = new QCanvasView(&canvas, this);
44 pb->setFocus(); 44 pb->setFocus();
45 45
46 setToolBarsMovable( FALSE ); 46 setToolBarsMovable( FALSE );
47 47
48 QPEToolBar* toolbar = new QPEToolBar(this); 48 QToolBar* toolbar = new QToolBar(this);
49 toolbar->setHorizontalStretchable( TRUE ); 49 toolbar->setHorizontalStretchable( TRUE );
50 50
51 setCaption( tr("ParaShoot") ); 51 setCaption( tr("ParaShoot") );
52 QPixmap newicon = Resource::loadPixmap("parashoot/manicon"); 52 QPixmap newicon = Resource::loadPixmap("parashoot/manicon");
53 setIcon(newicon); 53 setIcon(newicon);
54 new QToolButton(newicon, tr("New Game"), 0, 54 new QToolButton(newicon, tr("New Game"), 0,
55 this, SLOT(newGame()), toolbar, "New Game"); 55 this, SLOT(newGame()), toolbar, "New Game");
56 56
57 levelscore = new QLabel(toolbar); 57 levelscore = new QLabel(toolbar);
58 levelscore->setBackgroundMode( PaletteButton ); 58 levelscore->setBackgroundMode( PaletteButton );
59 levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); 59 levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
60 toolbar->setStretchableWidget( levelscore ); 60 toolbar->setStretchableWidget( levelscore );
61 showScore(0,0); 61 showScore(0,0);
62 62
63 setCentralWidget(pb); 63 setCentralWidget(pb);
64 64
65 autoDropTimer = new QTimer(this); 65 autoDropTimer = new QTimer(this);
66 connect (autoDropTimer, SIGNAL(timeout()), this, SLOT(play()) ); 66 connect (autoDropTimer, SIGNAL(timeout()), this, SLOT(play()) );
67 67
68 pauseTimer = new QTimer(this); 68 pauseTimer = new QTimer(this);
69 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) ); 69 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
70 70
71 setFocusPolicy(StrongFocus); 71 setFocusPolicy(StrongFocus);
72 72