entityattribute.h
00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * (at your option) any later version. * 00007 * * 00008 * copyright (C) 2002-2006 * 00009 * Umbrello UML Modeller Authors <uml-devel@uml.sf.net> * 00010 ***************************************************************************/ 00011 00012 #ifndef ENTITYATTRIBUTE_H 00013 #define ENTITYATTRIBUTE_H 00014 00015 #include "attribute.h" 00016 #include "umlnamespace.h" 00017 00027 class UMLEntityAttribute : public UMLAttribute { 00028 public: 00039 UMLEntityAttribute(const UMLObject* parent, const QString& name, 00040 Uml::IDType id = Uml::id_None, 00041 Uml::Visibility s = Uml::Visibility::Private, 00042 UMLObject *type = 0, const QString& iv = 0); 00043 00049 UMLEntityAttribute(const UMLObject* parent); 00050 00054 bool operator==( UMLEntityAttribute& rhs); 00055 00059 virtual ~UMLEntityAttribute(); 00060 00065 virtual void copyInto(UMLEntityAttribute* rhs) const; 00066 00070 virtual UMLObject* clone() const; 00071 00077 QString getAttributes(); 00078 00084 void setAttributes(const QString& attributes); 00085 00091 Uml::DBIndex_Type getIndexType(); 00092 00098 void setIndexType(const Uml::DBIndex_Type indexType); 00099 00105 QString getValues(); 00106 00112 void setValues(const QString& values); 00113 00119 bool getAutoIncrement(); 00120 00126 void setAutoIncrement(const bool autoIncrement); 00127 00133 bool getNull(); 00134 00140 void setNull(const bool null); 00141 00149 QString toString(Uml::Signature_Type sig = Uml::st_NoSig); 00150 00154 void saveToXMI(QDomDocument& qDoc, QDomElement& qElement); 00155 00159 bool showPropertiesDialog(QWidget* parent); 00160 00161 protected: 00166 void init(); 00167 00171 bool load(QDomElement& element); 00172 00173 private: 00174 Uml::DBIndex_Type m_indexType; 00175 QString m_values; 00176 QString m_attributes; 00177 bool m_autoIncrement; 00178 bool m_null; 00179 }; 00180 00181 #endif 00182
