summaryrefslogtreecommitdiff
path: root/noncore/games/snake
authorzecke <zecke>2004-02-06 12:14:56 (UTC)
committer zecke <zecke>2004-02-06 12:14:56 (UTC)
commit0c74629e8f5c12a9b5a282b817f884fa10dee491 (patch) (side-by-side diff)
tree3294663b92023f8d24d68a01022e011a3c94002d /noncore/games/snake
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/snake') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/snake/interface.cpp2
-rw-r--r--noncore/games/snake/interface.h3
-rw-r--r--noncore/games/snake/main.cpp10
-rw-r--r--noncore/games/snake/opie-snake.control2
-rw-r--r--noncore/games/snake/snake.pro5
5 files changed, 10 insertions, 12 deletions
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp
index f1227cb..2c60693 100644
--- a/noncore/games/snake/interface.cpp
+++ b/noncore/games/snake/interface.cpp
@@ -22,4 +22,5 @@
#include <qpe/resource.h>
+#include <qpe/qpeapplication.h>
#include <qpe/qpetoolbar.h>
@@ -34,4 +35,5 @@ SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) :
{
setCaption( tr("Snake") );
+ QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff );
QPixmap bg = Resource::loadPixmap("snake/grass");
canvas.setBackgroundPixmap(bg);
diff --git a/noncore/games/snake/interface.h b/noncore/games/snake/interface.h
index 454d4ee..fa1dee4 100644
--- a/noncore/games/snake/interface.h
+++ b/noncore/games/snake/interface.h
@@ -19,4 +19,5 @@
**********************************************************************/
#include <qmainwindow.h>
+#include <qpe/qpeapplication.h>
#include <qcanvas.h>
#include <qlabel.h>
@@ -38,4 +39,6 @@ public:
void createTargets();
+ static QString appName() { return QString::fromLatin1("snake"); }
+
protected:
virtual void keyPressEvent(QKeyEvent*);
diff --git a/noncore/games/snake/main.cpp b/noncore/games/snake/main.cpp
index 90a93b7..77a2769 100644
--- a/noncore/games/snake/main.cpp
+++ b/noncore/games/snake/main.cpp
@@ -22,14 +22,8 @@
#include <qpe/qpeapplication.h>
+#include <opie/oapplicationfactory.h>
-int main(int argc, char **argv)
-{
- QPEApplication app(argc,argv);
+OPIE_EXPORT_APP( OApplicationFactory<SnakeGame> )
- SnakeGame* m = new SnakeGame;
- QPEApplication::setInputMethodHint( m, QPEApplication::AlwaysOff );
- app.showMainWidget(m);
- return app.exec();
-}
diff --git a/noncore/games/snake/opie-snake.control b/noncore/games/snake/opie-snake.control
index ef4fc61..f110acd 100644
--- a/noncore/games/snake/opie-snake.control
+++ b/noncore/games/snake/opie-snake.control
@@ -1,4 +1,4 @@
Package: opie-snake
-Files: bin/snake apps/Games/snake.desktop pics/snake
+Files: plugins/application/libsnake.so* bin/snake apps/Games/snake.desktop pics/snake
Priority: optional
Section: opie/games
diff --git a/noncore/games/snake/snake.pro b/noncore/games/snake/snake.pro
index 3da8631..2b7444c 100644
--- a/noncore/games/snake/snake.pro
+++ b/noncore/games/snake/snake.pro
@@ -1,5 +1,3 @@
-TEMPLATE = app
-CONFIG += qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
+CONFIG += qt warn_on release quick-app
HEADERS = snake.h target.h obstacle.h interface.h codes.h
SOURCES = snake.cpp target.cpp obstacle.cpp interface.cpp main.cpp
@@ -9,3 +7,4 @@ DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe
+
include ( $(OPIEDIR)/include.pro )