softbob.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Gav Wood                                        *
00003  *   gav@cs.york.ac.uk                                                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef SOFTBOB_H
00021 #define SOFTBOB_H
00022 
00023 #define __GEDDEI_BUILD
00024 
00025 #include "properties.h"
00026 using namespace Geddei;
00027 
00028 #include <qstring.h>
00029 
00030 #include <bob.h>
00031 
00032 class QCanvas;
00033 class QDomElement;
00034 class QDomDocument;
00035 
00039 class SoftBob : public Bob
00040 {
00041  friend class GeddeiNite;
00042 
00043  virtual void saveYourself(QDomElement &element, QDomDocument &doc);
00044  virtual void loadYourselfPre(QDomElement &element);
00045 
00046 protected:
00047  QString theType;
00048  Properties theProperties;
00049 
00054  virtual void rebuild();
00055 
00056 public:
00057  void propertiesChanged();
00058 
00059 public:
00060  const QString &type() { return theType; }
00061  void setName(const QString &name);
00062 
00063  static int RTTI;
00064  virtual int rtti() const { return 1005; }
00065 
00066  SoftBob(const QString &name, QCanvas *c);
00067  SoftBob(const int x, const int y, const QString &type, const QString &name, QCanvas *c);
00068  virtual ~SoftBob();
00069 };
00070 
00071 #endif

Generated on Fri Nov 10 21:58:26 2006 for Exscalibar by  doxygen 1.5.1