summaryrefslogtreecommitdiff
path: root/noncore/games/zsame/KSameWidget.h
Unidiff
Diffstat (limited to 'noncore/games/zsame/KSameWidget.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/zsame/KSameWidget.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/noncore/games/zsame/KSameWidget.h b/noncore/games/zsame/KSameWidget.h
new file mode 100644
index 0000000..7887d46
--- a/dev/null
+++ b/noncore/games/zsame/KSameWidget.h
@@ -0,0 +1,81 @@
1/* Yo Emacs, this is -*- C++ -*- */
2/*
3 * ksame 0.4 - simple Game
4 * Copyright (C) 1997,1998 Marcus Kreutzberger
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 *
20 */
21
22#ifndef _KSAMEWIDGET
23#define _KSAMEWIDGET
24
25#include "StoneWidget.h"
26#include <kmainwindow.h>
27
28class KToggleAction;
29
30class KSameWidget: public KMainWindow {
31 Q_OBJECT
32public:
33 KSameWidget();
34 ~KSameWidget();
35
36private:
37 StoneWidget *stone;
38 KStatusBar *status;
39 KToggleAction *random;
40 KAction *restart;
41 KAction *undo;
42
43 int multispin_item;
44
45
46protected:
47 void newGame(unsigned int board,int colors);
48
49 virtual void saveProperties(KConfig *conf);
50 virtual void readProperties(KConfig *conf);
51
52 bool confirmAbort();
53
54 public slots:
55 void sizeChanged();
56
57 /* File Menu */
58 void m_new();
59 void m_restart();
60 void m_load();
61 void m_save();
62 void m_showhs();
63 void m_quit();
64 void m_undo();
65
66 /* Options Menu */
67 void m_tglboard();
68
69 void gameover();
70 void setColors(int colors);
71 void setBoard(int board);
72 void setScore(int score);
73 void setMarked(int m);
74 void stonesRemoved(int,int);
75 void slotConfigureKeys();
76
77};
78
79
80
81#endif