umbrello: umbrello/uml1model/attribute.h Source File

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
basictypes.h
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: attribute.cpp:348
UMLAttribute::m_InitialValue
QString m_InitialValue
text for the attribute's initial value.
Definition: attribute.h:75
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition: attribute.cpp:122
UMLAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: attribute.cpp:133
UMLAttribute::setTemplateParams
void setTemplateParams(const QString &templateParam, UMLClassifierList &templateParamList)
Definition: attribute.cpp:357
UMLAttribute::~UMLAttribute
virtual ~UMLAttribute()
Definition: attribute.cpp:68
UMLAttribute::clone
virtual UMLObject * clone() const
Definition: attribute.cpp:252
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:99
UMLAttribute::setInitialValue
void setInitialValue(const QString &iv)
Definition: attribute.cpp:109
UMLAttribute::m_ParmKind
Uml::ParameterDirection::Enum m_ParmKind
Definition: attribute.h:76
UMLAttribute::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: attribute.cpp:264
UMLAttribute::setVisibility
void setVisibility(Uml::Visibility::Enum s)
Definition: attribute.cpp:87
UMLAttribute::getFullyQualifiedName
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: attribute.cpp:188
UMLAttribute::setParmKind
void setParmKind(Uml::ParameterDirection::Enum pk)
Definition: attribute.cpp:117
UMLAttribute::operator==
bool operator==(const UMLAttribute &rhs) const
Definition: attribute.cpp:216
UMLAttribute::load1
bool load1(QDomElement &element)
Definition: attribute.cpp:281
UMLAttribute::getTemplateParams
virtual UMLClassifierList getTemplateParams()
Definition: attribute.cpp:409
UMLAttribute::setName
void setName(const QString &name)
Definition: attribute.cpp:76
UMLAttribute::attributeChanged
void attributeChanged()
UMLAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: attribute.cpp:236
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
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
classifierlistitem.h
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
Uml::ParameterDirection::Enum
Enum
Definition: basictypes.h:256
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:162
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:163
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61
umlclassifierlist.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17