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 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef ATTRIBUTE_H
7#define ATTRIBUTE_H
8
9#include "basictypes.h"
10#include "classifierlistitem.h"
11#include "umlclassifierlist.h"
12
22 class UMLAttribute : public UMLClassifierListItem
23{
24 Q_OBJECT
25 public:
26
27 UMLAttribute(UMLObject *parent, const QString& name,
28 Uml::ID::Type id = Uml::ID::None,
29 Uml::Visibility::Enum s = Uml::Visibility::Private,
30 UMLObject *type = 0, const QString& iv = QString());
31 explicit UMLAttribute(UMLObject *parent);
32
33 bool operator==(const UMLAttribute &rhs) const;
34
35 virtual ~UMLAttribute();
36
37 virtual void copyInto(UMLObject *lhs) const;
38
39 void setName(const QString &name);
40
41 void setVisibility(Uml::Visibility::Enum s);
42
43 virtual UMLObject* clone() const;
44
45 QString getInitialValue() const;
46 void setInitialValue(const QString &iv);
47
48 QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false);
49
50 QString getFullyQualifiedName(const QString& separator = QString(),
51 bool includeRoot = false) const;
52
53 virtual void saveToXMI1(QXmlStreamWriter& writer);
54
55 virtual bool showPropertiesDialog(QWidget* parent = 0);
56
57 void setParmKind(Uml::ParameterDirection::Enum pk);
58 Uml::ParameterDirection::Enum getParmKind() const;
59
60 virtual UMLClassifierList getTemplateParams();
61
62signals:
63
64 void attributeChanged();
65
66 protected:
67
68 bool load1(QDomElement & element);
69
70 QString m_InitialValue;
71 Uml::ParameterDirection::Enum m_ParmKind;
72
73 private:
74
75 void setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList);
76
77};
78
79#endif
basictypes.h
UMLAttribute
Sets up attribute information.
Definition: attribute.h:23
UMLAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: attribute.cpp:343
UMLAttribute::m_InitialValue
QString m_InitialValue
text for the attribute's initial value.
Definition: attribute.h:70
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition: attribute.cpp:117
UMLAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: attribute.cpp:128
UMLAttribute::setTemplateParams
void setTemplateParams(const QString &templateParam, UMLClassifierList &templateParamList)
Definition: attribute.cpp:352
UMLAttribute::~UMLAttribute
virtual ~UMLAttribute()
Definition: attribute.cpp:63
UMLAttribute::clone
virtual UMLObject * clone() const
Definition: attribute.cpp:247
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:94
UMLAttribute::setInitialValue
void setInitialValue(const QString &iv)
Definition: attribute.cpp:104
UMLAttribute::m_ParmKind
Uml::ParameterDirection::Enum m_ParmKind
Definition: attribute.h:71
UMLAttribute::setVisibility
void setVisibility(Uml::Visibility::Enum s)
Definition: attribute.cpp:82
UMLAttribute::getFullyQualifiedName
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: attribute.cpp:183
UMLAttribute::setParmKind
void setParmKind(Uml::ParameterDirection::Enum pk)
Definition: attribute.cpp:112
UMLAttribute::operator==
bool operator==(const UMLAttribute &rhs) const
Definition: attribute.cpp:211
UMLAttribute::load1
bool load1(QDomElement &element)
Definition: attribute.cpp:276
UMLAttribute::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: attribute.cpp:259
UMLAttribute::getTemplateParams
virtual UMLClassifierList getTemplateParams()
Definition: attribute.cpp:404
UMLAttribute::setName
void setName(const QString &name)
Definition: attribute.cpp:71
UMLAttribute::attributeChanged
void attributeChanged()
Definition: moc_attribute.cpp:129
UMLAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: attribute.cpp:231
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:30
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:25
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLObject::name
QString name() const
Definition: umlobject.cpp:206
classifierlistitem.h
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:373
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
Uml::ParameterDirection::Enum
Enum
Definition: basictypes.h:254
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:160
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:161
Uml::Visibility::Enum
Enum
Definition: basictypes.h:45
Uml::Visibility::Private
@ Private
Definition: basictypes.h:47
umlclassifierlist.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:12