00001 /* 00002 Copyright (C) 2008 Tim Fechtner < urwald at users dot sourceforge dot net > 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public License as 00006 published by the Free Software Foundation; either version 2 of 00007 the License or (at your option) version 3 or any later version 00008 accepted by the membership of KDE e.V. (or its successor approved 00009 by the membership of KDE e.V.), which shall act as a proxy 00010 defined in Section 14 of version 3 of the license. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #ifndef PROPERTYVALUE_H 00022 #define PROPERTYVALUE_H 00023 00024 #include <QVariant> 00025 00047 class PropertyValue 00048 { 00049 00050 public: 00051 00052 PropertyValue (); 00053 00054 PropertyValue (const PropertyValue &value); // copy constructor 00055 00056 virtual ~PropertyValue(); 00057 00058 PropertyValue & operator=(const PropertyValue & value); 00059 00061 bool operator==(const PropertyValue value) const; 00062 00064 bool operator!=(const PropertyValue value) const; 00065 00067 operator QString() const; 00068 00069 // typedefs 00070 00075 enum propertyValueType { 00076 value, 00077 error, 00078 unset 00079 }; 00080 00081 // members 00082 00086 QVariant internalValue; 00087 00091 propertyValueType type; 00092 00097 QString formatedValue; 00098 00105 Qt::Alignment formatedValueAlignment; 00106 00110 QString toolTip; 00111 00115 QString whatsThis; 00116 00117 private: 00119 void helper_copyFromHere (const PropertyValue &value); 00120 }; 00121 00122 Q_DECLARE_METATYPE(PropertyValue) 00123 00124 #endif