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) (side-by-side diff)
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 @@
+/*
+ * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch>
+ *
+ * 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,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.
+ */
+
+#ifndef BUZZWORD_H
+#define BUZZWORD_H
+
+#include <qmainwindow.h>
+#include <qmenubar.h>
+#include <qlabel.h>
+#include <qvbox.h>
+
+class QGrid;
+
+class BuzzLabel : public QLabel
+{
+ Q_OBJECT
+
+public:
+ BuzzLabel( QWidget *parent=0, const char *name=0 );
+
+protected:
+ virtual void mousePressEvent(QMouseEvent *e);
+
+signals:
+ void clicked();
+};
+
+class BuzzItem : public QVBox
+{
+ Q_OBJECT
+
+public:
+ BuzzItem( int row, int column, QString text, QWidget *parent=0, const char *name=0 );
+
+private:
+ QLabel* label;
+ int _row;
+ int _column;
+
+public slots:
+ void flip();
+
+signals:
+ void clicked(int row,int column);
+};
+
+class BuzzWord : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ BuzzWord();
+
+private:
+ void drawGrid();
+ void bingo();
+ QString getWord();
+
+ QMenuBar *menu;
+ QPopupMenu *game;
+ QGrid *grid;
+
+ int gridVal;
+ int map[4][4];
+ bool gameOver;
+
+public slots:
+ void about();
+ void newGame();
+ void clicked(int row, int column);
+
+};
+
+#endif