umbrello/umbrello
attribute.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * This program is free software; you can redistribute it and/or modify * 00003 * it under the terms of the GNU General Public License as published by * 00004 * the Free Software Foundation; either version 2 of the License, or * 00005 * (at your option) any later version. * 00006 * * 00007 * copyright (C) 2002-2008 * 00008 * Umbrello UML Modeller Authors <uml-devel@uml.sf.net> * 00009 ***************************************************************************/ 00010 00011 #ifndef ATTRIBUTE_H 00012 #define ATTRIBUTE_H 00013 00014 #include "classifierlistitem.h" 00015 #include "umlnamespace.h" 00016 #include "umlclassifierlist.h" 00017 00027 class UMLAttribute : public UMLClassifierListItem 00028 { 00029 Q_OBJECT 00030 public: 00031 00042 UMLAttribute(UMLObject *parent, const QString& name, 00043 Uml::IDType id = Uml::id_None, 00044 Uml::Visibility s = Uml::Visibility::Private, 00045 UMLObject *type = 0, const QString& iv = 0); 00046 00052 UMLAttribute(UMLObject *parent); 00053 00057 bool operator==(const UMLAttribute &rhs); 00058 00062 virtual ~UMLAttribute(); 00063 00064 virtual void copyInto(UMLObject *lhs) const; 00065 00066 void setName(const QString &name); 00067 00068 void setVisibility(Uml::Visibility s); 00069 00070 virtual UMLObject* clone() const; 00071 00072 QString getInitialValue() const; 00073 00074 void setInitialValue( const QString &iv ); 00075 00076 QString toString(Uml::Signature_Type sig = Uml::st_NoSig); 00077 00078 QString getFullyQualifiedName( const QString& separator = QString(), 00079 bool includeRoot = false) const; 00080 00081 virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement ); 00082 00083 virtual bool showPropertiesDialog(QWidget* parent); 00084 00085 void setParmKind (Uml::Parameter_Direction pk); 00086 Uml::Parameter_Direction getParmKind () const; 00087 00088 virtual UMLClassifierList getTemplateParams(); 00089 00090 signals: 00091 00092 void attributeChanged(); 00093 00094 protected: 00095 00096 bool load( QDomElement & element ); 00097 00098 QString m_InitialValue; 00099 Uml::Parameter_Direction m_ParmKind; 00100 00101 private: 00102 00103 void setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList); 00104 00105 }; 00106 00107 #endif
KDE 4.4 API Reference