File indexing completed on 2024-04-14 14:32:24

0001 /***************************************************************************
0002                           cvariable.h  -  one variable
0003                              -------------------
0004     begin                : Po sep 8 2003
0005     copyright            : (C) 2003-2008 by Tomas Mecir
0006     email                : kmuddy@kmuddy.com
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *                                                                         *
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either version 2 of the License, or     *
0014  *   (at your option) any later version.                                   *
0015  *                                                                         *
0016  ***************************************************************************/
0017 
0018 #ifndef CVARIABLE_H
0019 #define CVARIABLE_H
0020 
0021 #include <kmuddy_export.h>
0022 
0023 class cValue;
0024 
0025 #include <QString>
0026 
0027 /**
0028 This class represents one variable.
0029   *@author Tomas Mecir
0030   */
0031 
0032 class KMUDDY_EXPORT cVariable {
0033 public: 
0034   cVariable ();
0035   ~cVariable ();
0036 
0037   QString name () { return _name; };
0038   /** sets new variable name; no duplicity check here - cVariableList must
0039   handle that */
0040   void setName (const QString &newname) { _name = newname; };
0041   cValue *getValue () { return val; };
0042   QString value ();
0043   void setValue (const QString &newvalue);
0044   void setValue (const cValue *v);
0045 protected:
0046   QString _name;
0047   cValue *val;
0048 };
0049 
0050 #endif