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

KSameWidget.h

Go to the documentation of this file.
00001 /* Yo Emacs, this is -*- C++ -*- */
00002 /*
00003  *   ksame 0.4 - simple Game
00004  *   Copyright (C) 1997,1998  Marcus Kreutzberger
00005  *
00006  *   This program is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   This program is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with this program; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019  *
00020  */
00021 
00022 #ifndef _KSAMEWIDGET
00023 #define _KSAMEWIDGET
00024 
00025 #include "StoneWidget.h"
00026 #include <kmainwindow.h>
00027 
00028 class KToggleAction;
00029 
00030 class KSameWidget: public KMainWindow {
00031      Q_OBJECT
00032 public:
00033      KSameWidget();
00034      ~KSameWidget();
00035 
00036 private:
00037      StoneWidget *stone;
00038      KStatusBar *status;
00039      KToggleAction *random;
00040      KAction *restart;
00041      KAction *undo;
00042 
00043      int multispin_item;
00044 
00045 
00046 protected:
00047      void newGame(unsigned int board,int colors);
00048 
00049      virtual void saveProperties(KConfig *conf);
00050      virtual void readProperties(KConfig *conf);
00051 
00052      bool confirmAbort();
00053 
00054   public slots:
00055      void sizeChanged();
00056 
00057      /* File Menu */
00058      void m_new();
00059      void m_restart();
00060      void m_load();
00061      void m_save();
00062      void m_showhs();
00063      void m_quit();
00064      void m_undo();
00065 
00066      /* Options Menu */
00067      void m_tglboard();
00068 
00069      void gameover();
00070      void setColors(int colors);
00071      void setBoard(int board);
00072      void setScore(int score);
00073      void setMarked(int m);
00074      void stonesRemoved(int,int);
00075     void slotConfigureKeys();
00076 
00077 };
00078 
00079 
00080 
00081 #endif

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