summaryrefslogtreecommitdiff
path: root/noncore/games/qasteroids/toplevel.cpp
authorzecke <zecke>2004-02-06 12:14:56 (UTC)
committer zecke <zecke>2004-02-06 12:14:56 (UTC)
commit0c74629e8f5c12a9b5a282b817f884fa10dee491 (patch) (unidiff)
tree3294663b92023f8d24d68a01022e011a3c94002d /noncore/games/qasteroids/toplevel.cpp
parent46ce5afcfbe7be19f4d5ac0fed6886a0759f1a25 (diff)
downloadopie-0c74629e8f5c12a9b5a282b817f884fa10dee491.zip
opie-0c74629e8f5c12a9b5a282b817f884fa10dee491.tar.gz
opie-0c74629e8f5c12a9b5a282b817f884fa10dee491.tar.bz2
Merge from the 1.0.x release
Diffstat (limited to 'noncore/games/qasteroids/toplevel.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/qasteroids/toplevel.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/noncore/games/qasteroids/toplevel.cpp b/noncore/games/qasteroids/toplevel.cpp
index 71daf60..c4fea89 100644
--- a/noncore/games/qasteroids/toplevel.cpp
+++ b/noncore/games/qasteroids/toplevel.cpp
@@ -69,31 +69,34 @@ SLevel levels[MAX_LEVELS] =
69 { 5, 1.0 } 69 { 5, 1.0 }
70}; 70};
71 71
72const char *soundEvents[] = 72const char *soundEvents[] =
73{ 73{
74 "ShipDestroyed", 74 "ShipDestroyed",
75 "RockDestroyed", 75 "RockDestroyed",
76 0 76 0
77}; 77};
78 78
79const char *soundDefaults[] = 79const char *soundDefaults[] =
80{ 80{
81 "Explosion.wav", 81 "Explosion.wav",
82 "ploop.wav", 82 "ploop.wav",
83 0 83 0
84}; 84};
85 85
86 86
87KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name ) 87KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl )
88 : QMainWindow( parent, _name ) 88 : QMainWindow( parent, _name, fl )
89{ 89{
90 setCaption( tr("Asteroids") ); 90 setCaption( tr("Asteroids") );
91
92 QPEApplication::grabKeyboard();
93
91 QWidget *border = new QWidget( this ); 94 QWidget *border = new QWidget( this );
92 border->setBackgroundColor( black ); 95 border->setBackgroundColor( black );
93 setCentralWidget( border ); 96 setCentralWidget( border );
94 97
95 QVBoxLayout *borderLayout = new QVBoxLayout( border ); 98 QVBoxLayout *borderLayout = new QVBoxLayout( border );
96 99
97 QWidget *mainWin = new QWidget( border ); 100 QWidget *mainWin = new QWidget( border );
98 borderLayout->addWidget( mainWin, 2, AlignHCenter ); 101 borderLayout->addWidget( mainWin, 2, AlignHCenter );
99 102
@@ -257,7 +260,7 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name )
257 actions.insert( Qt::Key_P, Pause ); 260 actions.insert( Qt::Key_P, Pause );
258 261
259 262
260 struct utsname name; /* check for embedix kernel running on the zaurus, if 263 struct utsname name; /* check for embedix kernel running on the zaurus, if
261 lineo change string, this break 264 lineo change string, this break
262 */ 265 */
263 if (uname(&name) != -1) { 266 if (uname(&name) != -1) {
@@ -395,7 +398,7 @@ void KAstTopLevel::keyReleaseEvent( QKeyEvent *event )
395 return; 398 return;
396 } 399 }
397 break; 400 break;
398 401
399 case NewGame: 402 case NewGame:
400 slotNewGame(); 403 slotNewGame();
401 break; 404 break;