summaryrefslogtreecommitdiff
path: root/noncore/games/buzzword/buzzword.h
authorimm <imm>2002-08-30 17:33:51 (UTC)
committer imm <imm>2002-08-30 17:33:51 (UTC)
commitd5d60019e96ae6d7c4ac6f11034627a01d8fb36c (patch) (unidiff)
tree26c1ab5d916325d42f0dab72102e08ef4f65ac3f /noncore/games/buzzword/buzzword.h
parent2e1362616524463697dfe2693178a698ccc713ec (diff)
downloadopie-d5d60019e96ae6d7c4ac6f11034627a01d8fb36c.zip
opie-d5d60019e96ae6d7c4ac6f11034627a01d8fb36c.tar.gz
opie-d5d60019e96ae6d7c4ac6f11034627a01d8fb36c.tar.bz2
import
Diffstat (limited to 'noncore/games/buzzword/buzzword.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/buzzword/buzzword.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/noncore/games/buzzword/buzzword.h b/noncore/games/buzzword/buzzword.h
new file mode 100644
index 0000000..f72be9a
--- a/dev/null
+++ b/noncore/games/buzzword/buzzword.h
@@ -0,0 +1,89 @@
1/*
2 * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License,Life or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
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
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19#ifndef BUZZWORD_H
20#define BUZZWORD_H
21
22#include <qmainwindow.h>
23#include <qmenubar.h>
24#include <qlabel.h>
25#include <qvbox.h>
26
27class QGrid;
28
29class BuzzLabel : public QLabel
30{
31 Q_OBJECT
32
33public:
34 BuzzLabel( QWidget *parent=0, const char *name=0 );
35
36protected:
37 virtual void mousePressEvent(QMouseEvent *e);
38
39signals:
40 void clicked();
41};
42
43class BuzzItem : public QVBox
44{
45 Q_OBJECT
46
47public:
48 BuzzItem( int row, int column, QString text, QWidget *parent=0, const char *name=0 );
49
50private:
51 QLabel* label;
52 int _row;
53 int _column;
54
55public slots:
56 void flip();
57
58signals:
59 void clicked(int row,int column);
60};
61
62class BuzzWord : public QMainWindow
63{
64 Q_OBJECT
65
66public:
67 BuzzWord();
68
69private:
70 void drawGrid();
71 void bingo();
72 QString getWord();
73
74 QMenuBar *menu;
75 QPopupMenu *game;
76 QGrid *grid;
77
78 int gridVal;
79 int map[4][4];
80 bool gameOver;
81
82public slots:
83 void about();
84 void newGame();
85 void clicked(int row, int column);
86
87};
88
89#endif