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

minesweep.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 #ifndef MINESWEEP_H
00021 #define MINESWEEP_H
00022 
00023 #include <qmainwindow.h>
00024 #include <qdatetime.h>
00025 
00026 class MineField;
00027 class QLCDNumber;
00028 class QPushButton;
00029 
00030 class MineSweep : public QMainWindow
00031 {
00032     Q_OBJECT
00033 public:
00034     static QString appName() { return QString::fromLatin1("minesweep"); }
00035     MineSweep( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
00036     ~MineSweep();
00037 
00038 public slots:
00039     void gameOver( bool won );
00040     void newGame();
00041 
00042 protected slots:
00043     void setCounter( int );
00044     void updateTime();
00045 
00046     void beginner();
00047     void advanced();
00048     void expert();
00049 
00050 private slots:
00051     void startPlaying();
00052 
00053 private:
00054     void readConfig();
00055     void writeConfig() const;
00056 
00057     void newGame(int);
00058     MineField* field;
00059     QLCDNumber* guessLCD;
00060     QLCDNumber* timeLCD;
00061     QPushButton* newGameButton;
00062     
00063     QDateTime starttime;
00064     QTimer* timer;
00065 };
00066 
00067 #endif // MINESWEEP_H
00068 

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