-rw-r--r-- | noncore/games/snake/interface.cpp | 2 | ||||
-rw-r--r-- | noncore/games/snake/interface.h | 3 | ||||
-rw-r--r-- | noncore/games/snake/main.cpp | 10 | ||||
-rw-r--r-- | noncore/games/snake/opie-snake.control | 2 | ||||
-rw-r--r-- | noncore/games/snake/snake.pro | 5 |
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 @@ -23,2 +23,3 @@ #include <qpe/resource.h> +#include <qpe/qpeapplication.h> @@ -35,2 +36,3 @@ SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : setCaption( tr("Snake") ); + QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); QPixmap bg = Resource::loadPixmap("snake/grass"); 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 @@ -20,2 +20,3 @@ #include <qmainwindow.h> +#include <qpe/qpeapplication.h> #include <qcanvas.h> @@ -39,2 +40,4 @@ public: + static QString appName() { return QString::fromLatin1("snake"); } + protected: 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 @@ -23,13 +23,7 @@ #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,3 +1,3 @@ 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 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,4 +1,2 @@ -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 @@ -10,2 +8,3 @@ LIBS += -lqpe + include ( $(OPIEDIR)/include.pro ) |