author | zecke <zecke> | 2004-02-17 16:24:32 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-17 16:24:32 (UTC) |
commit | 62b3979c6b23627eeca3b89f6feb491cdab97b08 (patch) (unidiff) | |
tree | 8545969e2a2bf63a618b50e4b0d8fbf7f73bedbd /noncore/games/zlines/klines.h | |
parent | 1207607ebbc59841718b79508fc222cb4eee9fde (diff) | |
download | opie-62b3979c6b23627eeca3b89f6feb491cdab97b08.zip opie-62b3979c6b23627eeca3b89f6feb491cdab97b08.tar.gz opie-62b3979c6b23627eeca3b89f6feb491cdab97b08.tar.bz2 |
Add the zLines port to Opie
Diffstat (limited to 'noncore/games/zlines/klines.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/zlines/klines.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/noncore/games/zlines/klines.h b/noncore/games/zlines/klines.h new file mode 100644 index 0000000..e36a4a7 --- a/dev/null +++ b/noncore/games/zlines/klines.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /*************************************************************************** | ||
2 | klines.h - description | ||
3 | ------------------- | ||
4 | begin : Fri May 19 2000 | ||
5 | copyright : (C) 2000 by Roman Razilov | ||
6 | email : Roman.Razilov@gmx.de | ||
7 | ***************************************************************************/ | ||
8 | |||
9 | /*************************************************************************** | ||
10 | * * | ||
11 | * This program is free software; you can redistribute it and/or modify * | ||
12 | * it under the terms of the GNU General Public License as published by * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | #ifndef KLINES_H | ||
18 | #define KLINES_H | ||
19 | |||
20 | #include <qwidget.h> | ||
21 | #include <qmenubar.h> | ||
22 | #include <qlabel.h> | ||
23 | #include <qpushbutton.h> | ||
24 | #include <qmainwindow.h> | ||
25 | #include "linesboard.h" | ||
26 | #include "mwidget.h" | ||
27 | #include "prompt.h" | ||
28 | |||
29 | #define LSCORE 0 | ||
30 | #define LRECORD 1 | ||
31 | |||
32 | class KLines : public QMainWindow | ||
33 | { | ||
34 | Q_OBJECT | ||
35 | public: | ||
36 | KLines(QWidget *parent,const char* name, WFlags f); | ||
37 | ~KLines(); | ||
38 | |||
39 | static QString appName() { return QString::fromLatin1("zlines"); } | ||
40 | |||
41 | public slots: | ||
42 | void startGame(); | ||
43 | void stopGame(); | ||
44 | void makeTurn(); | ||
45 | void addScore(int ballsErased); | ||
46 | void switchPrompt(); | ||
47 | void help(); | ||
48 | void undo(); | ||
49 | |||
50 | protected: | ||
51 | void resizeEvent( QResizeEvent * ); | ||
52 | |||
53 | private slots: | ||
54 | |||
55 | // bool setSize( int w, int h ); | ||
56 | void setMinSize(); | ||
57 | |||
58 | private: | ||
59 | QMenuBar *menu; | ||
60 | int idMenuPrompt; | ||
61 | int idMenuUndo; | ||
62 | |||
63 | QPopupMenu *game; | ||
64 | QPopupMenu *edit; | ||
65 | QToolBar *tool; | ||
66 | QStatusBar *stat; | ||
67 | LinesBoard* lsb; | ||
68 | MainWidget *mwidget; | ||
69 | LinesPrompt *lPrompt; | ||
70 | |||
71 | int score, prev_score; | ||
72 | |||
73 | int nextBalls[BALLSDROP]; | ||
74 | int nextBalls_undo[BALLSDROP]; | ||
75 | int nextBalls_redo[BALLSDROP]; | ||
76 | bool bUndo; | ||
77 | |||
78 | void searchBallsLine(); | ||
79 | void generateRandomBalls(); | ||
80 | void placeBalls(); | ||
81 | void updateStat(); | ||
82 | void endGame(); | ||
83 | void switchUndo( bool bu ); | ||
84 | }; | ||
85 | |||
86 | #endif | ||