-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 | 5 | ||||
-rw-r--r-- | noncore/games/buzzword/main.cpp | 15 | ||||
-rw-r--r-- | noncore/games/buzzword/opie-buzzword.control | 2 |
5 files changed, 8 insertions, 19 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 | |||
59 | label->setAlignment( int( QLabel::AlignCenter ) ); | 59 | label->setAlignment( int( QLabel::AlignCenter ) ); |
60 | 60 | ||
61 | connect( label, SIGNAL(clicked()), this, SLOT(flip()) ); | 61 | connect( label, SIGNAL(clicked()), this, SLOT(flip()) ); |
62 | } | 62 | } |
63 | 63 | ||
64 | void BuzzItem::flip() | 64 | void BuzzItem::flip() |
65 | { | 65 | { |
66 | setLineWidth( 1 ); | 66 | setLineWidth( 1 ); |
67 | label->setBackgroundColor(label->colorGroup().highlight()); | 67 | label->setBackgroundColor(label->colorGroup().highlight()); |
68 | emit clicked(_row, _column); | 68 | emit clicked(_row, _column); |
69 | } | 69 | } |
70 | 70 | ||
71 | BuzzWord::BuzzWord() : QMainWindow(0) | 71 | BuzzWord::BuzzWord(QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) |
72 | { | 72 | { |
73 | setCaption(tr("buZzword")); | 73 | setCaption(tr("buZzword")); |
74 | 74 | ||
75 | menu = menuBar(); | 75 | menu = menuBar(); |
76 | game = new QPopupMenu; | 76 | game = new QPopupMenu; |
77 | game->insertItem(tr("&New game"), this, SLOT(newGame()), Key_N ); | 77 | game->insertItem(tr("&New game"), this, SLOT(newGame()), Key_N ); |
78 | menu->insertItem( tr("&Game"), game ); | 78 | menu->insertItem( tr("&Game"), game ); |
79 | 79 | ||
80 | gridVal = 4; | 80 | gridVal = 4; |
81 | grid = NULL; | 81 | grid = NULL; |
82 | gameOver = false; | 82 | gameOver = false; |
83 | newGame(); | 83 | 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: | |||
55 | public slots: | 55 | public slots: |
56 | void flip(); | 56 | void flip(); |
57 | 57 | ||
58 | signals: | 58 | signals: |
59 | void clicked(int row,int column); | 59 | void clicked(int row,int column); |
60 | }; | 60 | }; |
61 | 61 | ||
62 | class BuzzWord : public QMainWindow | 62 | class BuzzWord : public QMainWindow |
63 | { | 63 | { |
64 | Q_OBJECT | 64 | Q_OBJECT |
65 | 65 | ||
66 | public: | 66 | public: |
67 | BuzzWord(); | 67 | BuzzWord( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
68 | static QString appName() { return QString::fromLatin1("buzzword"); } | ||
68 | 69 | ||
69 | private: | 70 | private: |
70 | void drawGrid(); | 71 | void drawGrid(); |
71 | void bingo(); | 72 | void bingo(); |
72 | QString getWord(); | 73 | QString getWord(); |
73 | 74 | ||
74 | QMenuBar *menu; | 75 | QMenuBar *menu; |
75 | QPopupMenu *game; | 76 | QPopupMenu *game; |
76 | QGrid *grid; | 77 | QGrid *grid; |
77 | 78 | ||
78 | int gridVal; | 79 | int gridVal; |
79 | int map[4][4]; | 80 | 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 @@ | |||
1 | TEMPLATE= app | 1 | CONFIG = qt warn_on release quick-app |
2 | CONFIG = qt warn_on release | ||
3 | HEADERS = buzzword.h | 2 | HEADERS = buzzword.h |
4 | SOURCES = buzzword.cpp main.cpp | 3 | SOURCES = buzzword.cpp main.cpp |
5 | INCLUDEPATH+= $(OPIEDIR)/include | 4 | INCLUDEPATH+= $(OPIEDIR)/include |
6 | DEPENDPATH+= $(OPIEDIR)/include | 5 | DEPENDPATH+= $(OPIEDIR)/include |
7 | DESTDIR = $(OPIEDIR)/bin | ||
8 | LIBS += -lqpe | 6 | LIBS += -lqpe |
7 | |||
9 | TARGET = buzzword | 8 | TARGET = buzzword |
10 | 9 | ||
11 | include ( $(OPIEDIR)/include.pro ) | 10 | 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 @@ | |||
8 | * | 8 | * |
9 | * This program is distributed in the hope that it will be useful, | 9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Library General Public License for more details. | 12 | * Library General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU Library General Public | 14 | * You should have received a copy of the GNU Library General Public |
15 | * License along with this program; if not, write to the Free | 15 | * License along with this program; if not, write to the Free |
16 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 16 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <qpe/qpeapplication.h> | 19 | #include <qpe/qpeapplication.h> |
20 | 20 | #include <opie/oapplicationfactory.h> | |
21 | #include <stdlib.h> | ||
22 | #include <time.h> | ||
23 | 21 | ||
24 | #include "buzzword.h" | 22 | #include "buzzword.h" |
25 | 23 | ||
26 | int main(int argc, char **argv) | 24 | OPIE_EXPORT_APP( OApplicationFactory<BuzzWord> ) |
27 | { | ||
28 | srand(time(0)); | ||
29 | |||
30 | QPEApplication a( argc, argv ); | ||
31 | BuzzWord *top = new BuzzWord; | ||
32 | a.showMainWidget(top); | ||
33 | |||
34 | return a.exec(); | ||
35 | } | ||
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 @@ | |||
1 | Package: opie-buzzword | 1 | Package: opie-buzzword |
2 | Files: bin/buzzword apps/Games/buzzword.desktop pics/buzzword/buzzword.png share/buzzword/buzzwords | 2 | Files: plugins/application/libbuzzword.so* bin/buzzword apps/Games/buzzword.desktop pics/buzzword/buzzword.png share/buzzword/buzzwords |
3 | Version: 1.1-$SUB_VERSION | 3 | Version: 1.1-$SUB_VERSION |
4 | Depends: task-opie-minimal | 4 | Depends: task-opie-minimal |
5 | Priority: optional | 5 | Priority: optional |
6 | Section: opie/games | 6 | Section: opie/games |
7 | Maintainer: Martin Imobersteg <imm@gmx.ch> | 7 | Maintainer: Martin Imobersteg <imm@gmx.ch> |
8 | Architecture: arm | 8 | Architecture: arm |
9 | License: GPL | 9 | License: GPL |
10 | Description: BuzzWord | 10 | Description: BuzzWord |
11 | A BuzzWord Bingo for Qtopia. | 11 | A BuzzWord Bingo for Qtopia. |