-rw-r--r-- | noncore/games/qasteroids/main.cpp | 13 | ||||
-rw-r--r-- | noncore/games/qasteroids/opie-qasteroids.control | 2 | ||||
-rw-r--r-- | noncore/games/qasteroids/qasteroids.pro | 6 | ||||
-rw-r--r-- | noncore/games/qasteroids/toplevel.cpp | 19 | ||||
-rw-r--r-- | noncore/games/qasteroids/toplevel.h | 4 |
5 files changed, 20 insertions, 24 deletions
diff --git a/noncore/games/qasteroids/main.cpp b/noncore/games/qasteroids/main.cpp index 7d1682c..c762990 100644 --- a/noncore/games/qasteroids/main.cpp +++ b/noncore/games/qasteroids/main.cpp | |||
@@ -22,15 +22,6 @@ | |||
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <opie/oapplicationfactory.h> | ||
24 | 25 | ||
25 | int main( int argc, char *argv[] ) | ||
26 | { | ||
27 | QPEApplication app( argc, argv ); | ||
28 | |||
29 | QPEApplication::grabKeyboard(); | ||
30 | |||
31 | KAstTopLevel *mainWidget = new KAstTopLevel(); | ||
32 | app.showMainWidget( mainWidget ); | ||
33 | |||
34 | app.exec(); | ||
35 | } | ||
36 | 26 | ||
27 | OPIE_EXPORT_APP( OApplicationFactory<KAstTopLevel> ) | ||
diff --git a/noncore/games/qasteroids/opie-qasteroids.control b/noncore/games/qasteroids/opie-qasteroids.control index 25a49b4..8764578 100644 --- a/noncore/games/qasteroids/opie-qasteroids.control +++ b/noncore/games/qasteroids/opie-qasteroids.control | |||
@@ -1,4 +1,4 @@ | |||
1 | Package: opie-qasteroids | 1 | Package: opie-qasteroids |
2 | Files: bin/qasteroids apps/Games/qasteroids.desktop pics/qasteroids/* | 2 | Files: plugins/application/libqasteroids.so* bin/qasteroids apps/Games/qasteroids.desktop pics/qasteroids/* |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/games | 4 | Section: opie/games |
diff --git a/noncore/games/qasteroids/qasteroids.pro b/noncore/games/qasteroids/qasteroids.pro index 1a3a8d5..aafc701 100644 --- a/noncore/games/qasteroids/qasteroids.pro +++ b/noncore/games/qasteroids/qasteroids.pro | |||
@@ -1,5 +1,3 @@ | |||
1 | TEMPLATE= app | 1 | CONFIG += qt warn_on release quick-app |
2 | CONFIG += qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = ledmeter.h sprites.h toplevel.h view.h | 2 | HEADERS = ledmeter.h sprites.h toplevel.h view.h |
5 | SOURCES = ledmeter.cpp toplevel.cpp view.cpp main.cpp | 3 | SOURCES = ledmeter.cpp toplevel.cpp view.cpp main.cpp |
@@ -9,3 +7,5 @@ DEPENDPATH += $(OPIEDIR)/include | |||
9 | LIBS += -lqpe | 7 | LIBS += -lqpe |
10 | 8 | ||
9 | |||
10 | |||
11 | include ( $(OPIEDIR)/include.pro ) | 11 | include ( $(OPIEDIR)/include.pro ) |
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 | |||
@@ -70,5 +70,5 @@ SLevel levels[MAX_LEVELS] = | |||
70 | }; | 70 | }; |
71 | 71 | ||
72 | const char *soundEvents[] = | 72 | const char *soundEvents[] = |
73 | { | 73 | { |
74 | "ShipDestroyed", | 74 | "ShipDestroyed", |
@@ -77,5 +77,5 @@ const char *soundEvents[] = | |||
77 | }; | 77 | }; |
78 | 78 | ||
79 | const char *soundDefaults[] = | 79 | const char *soundDefaults[] = |
80 | { | 80 | { |
81 | "Explosion.wav", | 81 | "Explosion.wav", |
@@ -84,9 +84,12 @@ const char *soundDefaults[] = | |||
84 | }; | 84 | }; |
85 | 85 | ||
86 | 86 | ||
87 | KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name ) | 87 | KAstTopLevel::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 ); |
@@ -94,5 +97,5 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name ) | |||
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 ); |
@@ -258,5 +261,5 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name ) | |||
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 | */ |
@@ -396,5 +399,5 @@ void KAstTopLevel::keyReleaseEvent( QKeyEvent *event ) | |||
396 | } | 399 | } |
397 | break; | 400 | break; |
398 | 401 | ||
399 | case NewGame: | 402 | case NewGame: |
400 | slotNewGame(); | 403 | slotNewGame(); |
diff --git a/noncore/games/qasteroids/toplevel.h b/noncore/games/qasteroids/toplevel.h index 4e1ac9c..0270763 100644 --- a/noncore/games/qasteroids/toplevel.h +++ b/noncore/games/qasteroids/toplevel.h | |||
@@ -40,6 +40,8 @@ class KAstTopLevel : public QMainWindow | |||
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | public: | 41 | public: |
42 | KAstTopLevel( QWidget *parent=0, const char *name=0 ); | 42 | KAstTopLevel( QWidget *parent=0, const char *name=0, WFlags fl = 0 ); |
43 | virtual ~KAstTopLevel(); | 43 | virtual ~KAstTopLevel(); |
44 | static QString appName() { return QString::fromLatin1("qasteroids"); } | ||
45 | |||
44 | 46 | ||
45 | private: | 47 | private: |