summaryrefslogtreecommitdiff
path: root/noncore/games/zlines/klines.h
Unidiff
Diffstat (limited to 'noncore/games/zlines/klines.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/zlines/klines.h86
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
32class KLines : public QMainWindow
33{
34 Q_OBJECT
35public:
36 KLines(QWidget *parent,const char* name, WFlags f);
37 ~KLines();
38
39 static QString appName() { return QString::fromLatin1("zlines"); }
40
41public 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
50protected:
51 void resizeEvent( QResizeEvent * );
52
53private slots:
54
55// bool setSize( int w, int h );
56 void setMinSize();
57
58private:
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