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

klines.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           klines.h  -  description
00003                              -------------------
00004     begin                : Fri May 19 2000
00005     copyright            : (C) 2000 by Roman Razilov
00006     email                : Roman.Razilov@gmx.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef KLINES_H
00018 #define KLINES_H
00019 
00020 #include <qwidget.h>
00021 #include <qmenubar.h> 
00022 #include <qlabel.h>
00023 #include <qpushbutton.h>
00024 #include <qmainwindow.h>
00025 #include "linesboard.h"
00026 #include "mwidget.h"
00027 #include "prompt.h"
00028 
00029 #define LSCORE 0
00030 #define LRECORD 1
00031 
00032 class KLines : public QMainWindow
00033 {
00034   Q_OBJECT
00035 public:
00036   KLines(QWidget *parent,const char* name, WFlags f);
00037   ~KLines();
00038 
00039     static QString appName() { return QString::fromLatin1("zlines"); }
00040 
00041 public slots:
00042   void startGame();
00043   void stopGame();
00044   void makeTurn();
00045   void addScore(int ballsErased);
00046   void switchPrompt();
00047   void help();
00048         void undo();
00049   
00050 protected:
00051   void resizeEvent( QResizeEvent * );
00052 
00053 private slots:
00054 
00055 //  bool setSize( int w, int h );
00056   void setMinSize();
00057 
00058 private:
00059   QMenuBar *menu;
00060   int idMenuPrompt;
00061   int idMenuUndo;
00062 
00063   QPopupMenu *game;
00064   QPopupMenu *edit;
00065   QToolBar *tool;
00066   QStatusBar *stat;
00067   LinesBoard* lsb;
00068   MainWidget *mwidget;
00069   LinesPrompt *lPrompt;
00070 
00071   int score, prev_score;
00072 
00073   int nextBalls[BALLSDROP];
00074         int nextBalls_undo[BALLSDROP];
00075         int nextBalls_redo[BALLSDROP];
00076         bool bUndo;
00077 
00078   void searchBallsLine();
00079   void generateRandomBalls();
00080   void placeBalls();
00081   void updateStat();
00082   void endGame();
00083         void switchUndo( bool bu );
00084 };
00085 
00086 #endif

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