umbrello 2.32.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

attribute.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef ATTRIBUTE_H
12 #define ATTRIBUTE_H
13
14 #include "basictypes.h"
15 #include "classifierlistitem.h"
16 #include "umlclassifierlist.h"
17
27 class UMLAttribute : public UMLClassifierListItem
28 {
29 Q_OBJECT
30 public:
31
32 UMLAttribute(UMLObject *parent, const QString& name,
33 Uml::ID::Type id = Uml::ID::None,
34 Uml::Visibility::Enum s = Uml::Visibility::Private,
35 UMLObject *type = 0, const QString& iv = QString());
36 explicit UMLAttribute(UMLObject *parent);
37
38 bool operator==(const UMLAttribute &rhs) const;
39
40 virtual ~UMLAttribute();
41
42 virtual void copyInto(UMLObject *lhs) const;
43
44 void setName(const QString &name);
45
46 void setVisibility(Uml::Visibility::Enum s);
47
48 virtual UMLObject* clone() const;
49
50 QString getInitialValue() const;
51 void setInitialValue(const QString &iv);
52
53 QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false);
54
55 QString getFullyQualifiedName(const QString& separator = QString(),
56 bool includeRoot = false) const;
57
58 virtual void saveToXMI1(QDomDocument & qDoc, QDomElement & qElement);
59
60 virtual bool showPropertiesDialog(QWidget* parent = 0);
61
62 void setParmKind(Uml::ParameterDirection::Enum pk);
63 Uml::ParameterDirection::Enum getParmKind() const;
64
65 virtual UMLClassifierList getTemplateParams();
66
67 signals:
68
69 void attributeChanged();
70
71 protected:
72
73 bool load1(QDomElement & element);
74
75 QString m_InitialValue;
76 Uml::ParameterDirection::Enum m_ParmKind;
77
78 private:
79
80 void setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList);
81
82 };
83
84 #endif
UMLAttribute::setVisibility
void setVisibility(Uml::Visibility::Enum s)
Definition: attribute.cpp:87
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1309
UMLAttribute::getTemplateParams
virtual UMLClassifierList getTemplateParams()
Definition: attribute.cpp:409
UMLDoc::datatypeFolder
UMLFolder * datatypeFolder() const
Definition: umldoc.cpp:2988
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:271
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false)
Definition: package.cpp:266
UMLObject::asUMLOperation
UMLOperation * asUMLOperation()
Definition: umlobject.cpp:1324
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
Uml::ParameterDirection::In
@ In
Definition: basictypes.h:257
umlattributedialog.h
UMLAttribute::setParmKind
void setParmKind(Uml::ParameterDirection::Enum pk)
Definition: attribute.cpp:117
UMLAttribute::load1
bool load1(QDomElement &element)
Definition: attribute.cpp:281
UMLApp::activeLanguageScopeSeparator
QString activeLanguageScopeSeparator()
Definition: uml.cpp:2540
UMLObject::asUMLAttribute
UMLAttribute * asUMLAttribute()
Definition: umlobject.cpp:1305
UMLAttribute::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: attribute.cpp:264
Uml::ProgrammingLanguage::Java
@ Java
Definition: basictypes.h:278
Object_Factory::createUMLObject
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Definition: object_factory.cpp:203
operation.h
UMLClassifierListItem::getType
UMLClassifier * getType() const
Definition: classifierlistitem.cpp:102
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:99
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
Model_Utils::findUMLObject
UMLObject * findUMLObject(const UMLObjectList &inList, const QString &inName, UMLObject::ObjectType type, UMLObject *currentObj)
Definition: model_utils.cpp:152
UMLObject::ot_Attribute
@ ot_Attribute
Definition: umlobject.h:92
UMLObject::m_SecondaryId
QString m_SecondaryId
Definition: umlobject.h:286
object_factory.h
Uml::SignatureType::SigNoVis
@ SigNoVis
Definition: basictypes.h:165
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
UMLObject::emitModified
void emitModified()
Definition: umlobject.cpp:385
UMLObject::umlParent
UMLObject * umlParent() const
Definition: umlobject.cpp:671
UMLAttribute::~UMLAttribute
virtual ~UMLAttribute()
Definition: attribute.cpp:68
UMLObject::m_visibility
Uml::Visibility::Enum m_visibility
objects visibility
Definition: umlobject.h:277
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:646
Uml::ParameterDirection::Enum
Enum
Definition: basictypes.h:256
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
UMLAttribute::m_InitialValue
QString m_InitialValue
text for the attribute's initial value.
Definition: attribute.h:75
Model_Utils::getXmiId
QString getXmiId(QDomElement element)
Definition: model_utils.cpp:747
UMLAttributeDialog
Definition: umlattributedialog.h:32
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
UMLAttribute::setName
void setName(const QString &name)
Definition: attribute.cpp:76
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLAttribute::m_ParmKind
Uml::ParameterDirection::Enum m_ParmKind
Definition: attribute.h:76
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
UMLObject::m_pSecondary
QPointer< UMLObject > m_pSecondary
Definition: umlobject.h:282
Uml::ParameterDirection::InOut
@ InOut
Definition: basictypes.h:258
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
AssociationWidget::name
QString name() const
Definition: associationwidget.cpp:870
UMLAttribute::setInitialValue
void setInitialValue(const QString &iv)
Definition: attribute.cpp:109
UMLObject::m_name
QString m_name
objects name
Definition: umlobject.h:275
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition: attribute.cpp:122
classifierlistitem.h
UMLAttribute::UMLAttribute
UMLAttribute(UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None, Uml::Visibility::Enum s=Uml::Visibility::Private, UMLObject *type=0, const QString &iv=QString())
Definition: attribute.cpp:35
attribute.h
Uml::Visibility::toString
QString toString(Enum item, bool mnemonic)
Definition: basictypes.cpp:107
UMLObject::fullyQualifiedName
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlobject.cpp:227
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:845
folder.h
umlclassifierlist.h
UMLAttribute::attributeChanged
void attributeChanged()
Definition: moc_attribute.cpp:129
Uml::ProgrammingLanguage::D
@ D
Definition: basictypes.h:276
UMLAttribute::getFullyQualifiedName
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: attribute.cpp:188
UMLObject::ot_Datatype
@ ot_Datatype
Definition: umlobject.h:87
basictypes.h
uDebug
#define uDebug()
Definition: debug_utils.h:122
Uml::ParameterDirection::Out
@ Out
Definition: basictypes.h:259
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:162
Uml::ProgrammingLanguage::Cpp
@ Cpp
Definition: basictypes.h:274
UMLAttribute::setTemplateParams
void setTemplateParams(const QString &templateParam, UMLClassifierList &templateParamList)
Definition: attribute.cpp:357
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: attribute.cpp:236
UMLDoc
Definition: umldoc.h:75
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:35
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3582
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
UMLDoc::findUMLObject
UMLObject * findUMLObject(const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
Definition: umldoc.cpp:1067
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLOperation
Definition: operation.h:25
uml.h
Uml::SignatureType::ShowSig
@ ShowSig
Definition: basictypes.h:164
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:163
UMLAttribute::operator==
bool operator==(const UMLAttribute &rhs) const
Definition: attribute.cpp:216
umlobject.h
UMLAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: attribute.cpp:133
UMLAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: attribute.cpp:348
UMLObject::ot_Operation
@ ot_Operation
Definition: umlobject.h:93
UMLAttribute::clone
virtual UMLObject * clone() const
Definition: attribute.cpp:252
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61
UMLApp::activeLanguage
Uml::ProgrammingLanguage::Enum activeLanguage() const
Definition: uml.cpp:2523
UMLObject::stereotype
QString stereotype(bool includeAdornments=false) const
Definition: umlobject.cpp:559
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
UMLClassifierListItem::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: classifierlistitem.cpp:75
WidgetBase::id
Uml::ID::Type id() const
Definition: widgetbase.cpp:214
UMLPackage
Non-graphical information for a Package.
Definition: package.h:33