summaryrefslogtreecommitdiff
path: root/noncore/games/qasteroids
Side-by-side diff
Diffstat (limited to 'noncore/games/qasteroids') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/qasteroids/main.cpp13
-rw-r--r--noncore/games/qasteroids/opie-qasteroids.control2
-rw-r--r--noncore/games/qasteroids/qasteroids.pro6
-rw-r--r--noncore/games/qasteroids/toplevel.cpp7
-rw-r--r--noncore/games/qasteroids/toplevel.h4
5 files changed, 14 insertions, 18 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
@@ -18,19 +18,10 @@
**
**********************************************************************/
#include "toplevel.h"
#include <qpe/qpeapplication.h>
+#include <opie/oapplicationfactory.h>
-int main( int argc, char *argv[] )
-{
- QPEApplication app( argc, argv );
-
- QPEApplication::grabKeyboard();
-
- KAstTopLevel *mainWidget = new KAstTopLevel();
- app.showMainWidget( mainWidget );
-
- app.exec();
-}
+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,8 +1,8 @@
Package: opie-qasteroids
-Files: bin/qasteroids apps/Games/qasteroids.desktop pics/qasteroids/*
+Files: plugins/application/libqasteroids.so* bin/qasteroids apps/Games/qasteroids.desktop pics/qasteroids/*
Priority: optional
Section: opie/games
Maintainer: Martin Jones <mjones@trolltech.com>
Architecture: arm
Depends: task-opie-minimal
Description: Game: shoot the asteroids
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,11 +1,11 @@
-TEMPLATE = app
-CONFIG += qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
+CONFIG += qt warn_on release quick-app
HEADERS = ledmeter.h sprites.h toplevel.h view.h
SOURCES = ledmeter.cpp toplevel.cpp view.cpp main.cpp
TARGET = qasteroids
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe
+
+
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
@@ -81,16 +81,19 @@ const char *soundDefaults[] =
"Explosion.wav",
"ploop.wav",
0
};
-KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name )
- : QMainWindow( parent, _name )
+KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl )
+ : QMainWindow( parent, _name, fl )
{
setCaption( tr("Asteroids") );
+
+ QPEApplication::grabKeyboard();
+
QWidget *border = new QWidget( this );
border->setBackgroundColor( black );
setCentralWidget( border );
QVBoxLayout *borderLayout = new QVBoxLayout( border );
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
@@ -36,14 +36,16 @@ class KALedMeter;
class QLCDNumber;
class KAstTopLevel : public QMainWindow
{
Q_OBJECT
public:
- KAstTopLevel( QWidget *parent=0, const char *name=0 );
+ KAstTopLevel( QWidget *parent=0, const char *name=0, WFlags fl = 0 );
virtual ~KAstTopLevel();
+ static QString appName() { return QString::fromLatin1("qasteroids"); }
+
private:
void playSound( const char *snd );
void readSoundMapping();
void doStats();