umbrello/umbrello
attribute.h
Go to the documentation of this file.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 ATTRIBUTE_H 00013 #define ATTRIBUTE_H 00014 00015 #include "classifierlistitem.h" 00016 #include "umlnamespace.h" 00017 #include "umlclassifierlist.h" 00018 00028 class UMLAttribute : public UMLClassifierListItem { 00029 Q_OBJECT 00030 public: 00041 UMLAttribute(UMLObject *parent, const QString& name, 00042 Uml::IDType id = Uml::id_None, 00043 Uml::Visibility s = Uml::Visibility::Private, 00044 UMLObject *type = 0, const QString& iv = 0); 00045 00051 UMLAttribute(UMLObject *parent); 00052 00056 bool operator==(const UMLAttribute &rhs); 00057 00061 virtual ~UMLAttribute(); 00062 00067 virtual void copyInto(UMLObject *lhs) const; 00068 00073 void setName(const QString &name); 00074 00079 void setVisibility(Uml::Visibility s); 00080 00084 virtual UMLObject* clone() const; 00085 00091 QString getInitialValue(); 00092 00098 void setInitialValue( const QString &iv ); 00099 00107 QString toString(Uml::Signature_Type sig = Uml::st_NoSig); 00108 00112 QString getFullyQualifiedName( const QString& separator = QString(), 00113 bool includeRoot = false) const; 00114 00118 void saveToXMI( QDomDocument & qDoc, QDomElement & qElement ); 00119 00123 virtual bool showPropertiesDialog(QWidget* parent); 00124 00125 void setParmKind (Uml::Parameter_Direction pk); 00126 Uml::Parameter_Direction getParmKind () const; 00127 00131 virtual UMLClassifierList getTemplateParams(); 00132 00133 signals: 00138 void attributeChanged(); 00139 00140 protected: 00144 bool load( QDomElement & element ); 00145 00146 QString m_InitialValue; 00147 Uml::Parameter_Direction m_ParmKind; 00148 00149 private: 00153 void setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList); 00154 00155 }; 00156 00157 #endif
KDE 4.0 API Reference