/*************************************************************************** * Copyright (C) 2002-2004 by Alexander Dymo * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library 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 Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef PROPERTY_H #define PROPERTY_H #include #include class TQWidget; class TQString; /**Namespace which contain property editing classes.*/ namespace PropertyLib{ /** @file property.h @short Contains @ref PropertyLib::Property class and @ref PropertyLib::Property::PropertyType enum. */ /** @short Property. It includes support for TQStringList properties, an i18n'ed label and stores an old value to allow undo. Contains name, type and value. Type can be one of predefined types (including standard @ref TQVariant types) by @ref PropertyLib::Property::PropertyType enum or custom user type. User defined types should have values more than 3000. Value is a @ref TQVariant. Property can optionally have a list of possible values. In that case use @ref ValueFromList type and valueList member. Use @ref description for i18n'ed label. Examples: creating property: \code Property *property = new Property(String, name, description, value) \endcode using convenience constructor to create property of ValueFromList type: \code Property *property = new Property(name, possibleValuesList, description, value); \endcode */ class Property { public: /** PropertyType. Integers that represent the type of the property. */ enum PropertyType { //standard supported TQVariant types Invalid = TQVariant::Invalid /***/, String = TQVariant::String /**