Source: fun/Describable.h
|
|
|
|
// Describable - thing with a text description
// Copyright (C) 2002-2003 bozo & sgbeal @users.sourceforge.net
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _FUN_DESCRIBABLE_H
#define _FUN_DESCRIBABLE_H
#include
namespace fun
{
/**
* This is just a simple interface for objects which have some sort of
* description string which can be set and retrieved. I wanted it to be a
* QObject so that it could emit a signal when its description changed;
* see Nameable.h for why it isn't.
*/
class Describable : /*public QObject,*/ public virtual Serializable
{
// Q_ O B J E C T;
public:
/**
* Returns this object's description.
*/
virtual QString getDescription() const { return descr; }
// public slots:
/**
* Sets this object's description & emits the descrChanged() signal.
*/
virtual void setDescription(const QString &newDescr);
// signals:
// virtual void descrChanged(QString);
public:
virtual void serialize(Serializer &ser) const;
/**
* Note that this does not emit the descrChanged() signal.
*/
virtual void deserialize(const Deserializer &ser);
private:
QString descr;
};
} // namespace fun
#endif // _FUN_DESCRIBABLE_H
| Generated by: stephan on cheyenne on Mon Aug 11 14:06:52 2003, using kdoc 2.0a54. |