-rw-r--r-- | noncore/games/buzzword/buzzword.cpp | 2 | ||||
-rw-r--r-- | noncore/games/buzzword/buzzword.h | 3 | ||||
-rw-r--r-- | noncore/games/buzzword/buzzword.pro | 7 | ||||
-rw-r--r-- | noncore/games/buzzword/main.cpp | 15 | ||||
-rw-r--r-- | noncore/games/buzzword/opie-buzzword.control | 2 |
5 files changed, 9 insertions, 20 deletions
diff --git a/noncore/games/buzzword/buzzword.cpp b/noncore/games/buzzword/buzzword.cpp index 97a17a1..f746065 100644 --- a/noncore/games/buzzword/buzzword.cpp +++ b/noncore/games/buzzword/buzzword.cpp @@ -59,25 +59,25 @@ BuzzItem::BuzzItem( int row, int column, QString text, QWidget *parent, const ch label->setAlignment( int( QLabel::AlignCenter ) ); connect( label, SIGNAL(clicked()), this, SLOT(flip()) ); } void BuzzItem::flip() { setLineWidth( 1 ); label->setBackgroundColor(label->colorGroup().highlight()); emit clicked(_row, _column); } -BuzzWord::BuzzWord() : QMainWindow(0) +BuzzWord::BuzzWord(QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { setCaption(tr("buZzword")); menu = menuBar(); game = new QPopupMenu; game->insertItem(tr("&New game"), this, SLOT(newGame()), Key_N ); menu->insertItem( tr("&Game"), game ); gridVal = 4; grid = NULL; gameOver = false; newGame(); diff --git a/noncore/games/buzzword/buzzword.h b/noncore/games/buzzword/buzzword.h index 37dd5b4..c0e43d0 100644 --- a/noncore/games/buzzword/buzzword.h +++ b/noncore/games/buzzword/buzzword.h @@ -55,25 +55,26 @@ private: public slots: void flip(); signals: void clicked(int row,int column); }; class BuzzWord : public QMainWindow { Q_OBJECT public: - BuzzWord(); + BuzzWord( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + static QString appName() { return QString::fromLatin1("buzzword"); } private: void drawGrid(); void bingo(); QString getWord(); QMenuBar *menu; QPopupMenu *game; QGrid *grid; int gridVal; int map[4][4]; diff --git a/noncore/games/buzzword/buzzword.pro b/noncore/games/buzzword/buzzword.pro index 0faede8..247b593 100644 --- a/noncore/games/buzzword/buzzword.pro +++ b/noncore/games/buzzword/buzzword.pro @@ -1,11 +1,10 @@ -TEMPLATE = app -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = buzzword.h SOURCES = buzzword.cpp main.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -DESTDIR = $(OPIEDIR)/bin LIBS += -lqpe -TARGET = buzzword + +TARGET = buzzword include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/games/buzzword/main.cpp b/noncore/games/buzzword/main.cpp index 2d9ff81..67f2c26 100644 --- a/noncore/games/buzzword/main.cpp +++ b/noncore/games/buzzword/main.cpp @@ -8,28 +8,17 @@ * * 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 <stdlib.h> -#include <time.h> +#include <opie/oapplicationfactory.h> #include "buzzword.h" -int main(int argc, char **argv) -{ - srand(time(0)); - - QPEApplication a( argc, argv ); - BuzzWord *top = new BuzzWord; - a.showMainWidget(top); - - return a.exec(); -} +OPIE_EXPORT_APP( OApplicationFactory<BuzzWord> ) diff --git a/noncore/games/buzzword/opie-buzzword.control b/noncore/games/buzzword/opie-buzzword.control index 08b442b..b3e2496 100644 --- a/noncore/games/buzzword/opie-buzzword.control +++ b/noncore/games/buzzword/opie-buzzword.control @@ -1,11 +1,11 @@ Package: opie-buzzword -Files: bin/buzzword apps/Games/buzzword.desktop pics/buzzword/buzzword.png share/buzzword/buzzwords +Files: plugins/application/libbuzzword.so* bin/buzzword apps/Games/buzzword.desktop pics/buzzword/buzzword.png share/buzzword/buzzwords Version: 1.1-$SUB_VERSION Depends: task-opie-minimal Priority: optional Section: opie/games Maintainer: Martin Imobersteg <imm@gmx.ch> Architecture: arm License: GPL Description: BuzzWord A BuzzWord Bingo for Qtopia. |