-rw-r--r-- | noncore/games/bounce/bounce.pro | 4 | ||||
-rw-r--r-- | noncore/games/bounce/kbounce.cpp | 3 | ||||
-rw-r--r-- | noncore/games/bounce/kbounce.h | 3 | ||||
-rw-r--r-- | noncore/games/bounce/main.cpp | 9 | ||||
-rw-r--r-- | noncore/games/bounce/opie-bounce.control | 2 |
5 files changed, 8 insertions, 13 deletions
diff --git a/noncore/games/bounce/bounce.pro b/noncore/games/bounce/bounce.pro index 338daf6..75e4a6b 100644 --- a/noncore/games/bounce/bounce.pro +++ b/noncore/games/bounce/bounce.pro @@ -1,12 +1,10 @@ -TEMPLATE = app #CONFIG = qt warn_on debug -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = game.h kbounce.h SOURCES = game.cpp kbounce.cpp main.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -DESTDIR = $(OPIEDIR)/bin TARGET = bounce include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/games/bounce/kbounce.cpp b/noncore/games/bounce/kbounce.cpp index 50f4ef6..211f0ff 100644 --- a/noncore/games/bounce/kbounce.cpp +++ b/noncore/games/bounce/kbounce.cpp @@ -6,49 +6,50 @@ * License as published by the Free Software Foundation; either * version 2 of the License,Life or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <qlayout.h> #include <qtimer.h> #include <qlcdnumber.h> #include <qmessagebox.h> #include <qmainwindow.h> #include <qpe/qpeapplication.h> #include "kbounce.h" #include "game.h" #include <qlabel.h> -KJezzball::KJezzball() : QMainWindow(0), m_gameWidget( 0 ) +KJezzball::KJezzball(QWidget *p, const char* n, WFlags f) + : QMainWindow(p,n,f), m_gameWidget( 0 ) { setCaption(tr("Bounce")); // setup variables m_game.level = 1; m_game.score = 0; m_state = Idle; menu = menuBar(); game = new QPopupMenu; game->insertItem(tr("&New game"), this, SLOT(newGame()), Key_N ); game->insertItem(tr("&Pause game"), this, SLOT(pauseGame()), Key_P ); game->insertSeparator(); game->insertItem(tr("&About"), this, SLOT(about())); menu->insertItem( tr("&Game"), game ); // create widgets m_view = new QWidget( this, "m_view" ); setCentralWidget( m_view ); m_layout = new QGridLayout( m_view ); m_layout->setSpacing( 0 ); m_layout->setMargin( 0 ); diff --git a/noncore/games/bounce/kbounce.h b/noncore/games/bounce/kbounce.h index de41710..c59109f 100644 --- a/noncore/games/bounce/kbounce.h +++ b/noncore/games/bounce/kbounce.h @@ -11,49 +11,50 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef KJEZZBALL_H_INCLUDED #define KJEZZBALL_H_INCLUDED #include <qmainwindow.h> #include <qmenubar.h> #include <qlabel.h> class JezzGame; class QLCDNumber; class QGridLayout; class KJezzball : public QMainWindow { Q_OBJECT public: - KJezzball(); + static QString appName() { return QString::fromLatin1("bounce"); } + KJezzball(QWidget *, const char*, WFlags ); public slots: void newGame(); void pauseGame(); void closeGame(); void about(); protected slots: void died(); void newPercent( int percent ); void second(); void switchLevel(); void gameOverNow(); protected: void createLevel( int level ); void startLevel(); void stopLevel(); void nextLevel(); void gameOver(); void initXMLUI(); void focusOutEvent( QFocusEvent * ); void focusInEvent ( QFocusEvent * ); diff --git a/noncore/games/bounce/main.cpp b/noncore/games/bounce/main.cpp index a6b7c1a..9ea86a6 100644 --- a/noncore/games/bounce/main.cpp +++ b/noncore/games/bounce/main.cpp @@ -1,29 +1,24 @@ /* * Copyright (C) 2000 Stefan Schimanski <schimmi@kde.org> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <qpe/qpeapplication.h> #include "kbounce.h" +#include <opie/oapplicationfactory.h> -int main(int argc, char **argv) -{ - QPEApplication a( argc, argv ); - KJezzball *top = new KJezzball; - a.showMainWidget(top); +OPIE_EXPORT_APP( OApplicationFactory<KJezzball> ) - return a.exec(); -} diff --git a/noncore/games/bounce/opie-bounce.control b/noncore/games/bounce/opie-bounce.control index 8b3fdb9..bfe85d3 100644 --- a/noncore/games/bounce/opie-bounce.control +++ b/noncore/games/bounce/opie-bounce.control @@ -1,11 +1,11 @@ Package: opie-bounce -Files: bin/bounce apps/Games/bounce.desktop pics/bounce/*.png +Files: plugins/application/libbounce.so* bin/bounce apps/Games/bounce.desktop pics/bounce/*.png Version: 0.6-$SUB_VERSION Depends: task-opie-minimal Priority: optional Section: opie/games Maintainer: Martin Imobersteg <imm@gmx.ch> Architecture: arm License: GPL Description: bounce A JezzGame like game for Qtopia. |