Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

buzzword.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch>
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License,Life or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public
00015  * License along with this program; if not, write to the Free
00016  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00018 
00019 #ifndef BUZZWORD_H
00020 #define BUZZWORD_H 
00021 
00022 #include <qmainwindow.h>
00023 #include <qmenubar.h>
00024 #include <qlabel.h>
00025 #include <qvbox.h>
00026 
00027 class QGrid;
00028 
00029 class BuzzLabel : public QLabel 
00030 {
00031         Q_OBJECT
00032 
00033 public:
00034         BuzzLabel( QWidget *parent=0, const char *name=0 );
00035 
00036 protected:
00037         virtual void mousePressEvent(QMouseEvent *e);
00038 
00039 signals:
00040    void clicked();
00041 };
00042 
00043 class BuzzItem : public QVBox
00044 {
00045         Q_OBJECT
00046 
00047 public:
00048         BuzzItem( int row, int column, QString text, QWidget *parent=0, const char *name=0 );
00049 
00050 private:
00051         QLabel* label;
00052         int _row;
00053         int _column;
00054 
00055 public slots:
00056         void flip();
00057 
00058 signals:
00059         void clicked(int row,int column);
00060 };
00061 
00062 class BuzzWord : public QMainWindow
00063 {
00064         Q_OBJECT
00065 
00066 public:
00067         BuzzWord( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
00068         static QString appName() { return QString::fromLatin1("buzzword"); }
00069 
00070 private:
00071         void drawGrid();
00072         void bingo();
00073         QString getWord();
00074 
00075         QMenuBar *menu;
00076         QPopupMenu *game;
00077         QGrid *grid;
00078 
00079         int gridVal;
00080         int map[4][4];
00081         bool gameOver;
00082 
00083 public slots:
00084         void newGame();
00085         void clicked(int row, int column);
00086 
00087 };
00088 
00089 #endif

Generated on Sat Nov 5 16:17:19 2005 for OPIE by  doxygen 1.4.2