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

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

umlattribute.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2021 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 "umlclassifierlistitem.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 = nullptr, 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,
49 bool withStereotype=false) const;
50
51 QString getFullyQualifiedName(const QString& separator = QString(),
52 bool includeRoot = false) const;
53
54 virtual void saveToXMI(QXmlStreamWriter& writer);
55
56 virtual bool showPropertiesDialog(QWidget *parent = nullptr);
57
58 void setParmKind(Uml::ParameterDirection::Enum pk);
59 Uml::ParameterDirection::Enum getParmKind() const;
60
61 virtual UMLClassifierList getTemplateParams();
62
63Q_SIGNALS:
64
65 void attributeChanged();
66
67 protected:
68
69 bool load1(QDomElement & element);
70
71 QString m_InitialValue;
72 Uml::ParameterDirection::Enum m_ParmKind;
73
74 private:
75
76 void setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList);
77
78};
79
80#endif
basictypes.h
UMLAttribute
Sets up attribute information.
Definition: umlattribute.h:23
UMLAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false) const
Definition: umlattribute.cpp:135
UMLAttribute::m_InitialValue
QString m_InitialValue
text for the attribute's initial value.
Definition: umlattribute.h:71
UMLAttribute::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: umlattribute.cpp:266
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition: umlattribute.cpp:123
UMLAttribute::setTemplateParams
void setTemplateParams(const QString &templateParam, UMLClassifierList &templateParamList)
Definition: umlattribute.cpp:386
UMLAttribute::~UMLAttribute
virtual ~UMLAttribute()
Definition: umlattribute.cpp:69
UMLAttribute::clone
virtual UMLObject * clone() const
Definition: umlattribute.cpp:254
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: umlattribute.cpp:100
UMLAttribute::setInitialValue
void setInitialValue(const QString &iv)
Definition: umlattribute.cpp:110
UMLAttribute::m_ParmKind
Uml::ParameterDirection::Enum m_ParmKind
Definition: umlattribute.h:72
UMLAttribute::setVisibility
void setVisibility(Uml::Visibility::Enum s)
Definition: umlattribute.cpp:88
UMLAttribute::getFullyQualifiedName
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlattribute.cpp:190
UMLAttribute::setParmKind
void setParmKind(Uml::ParameterDirection::Enum pk)
Definition: umlattribute.cpp:118
UMLAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=nullptr)
Definition: umlattribute.cpp:377
UMLAttribute::operator==
bool operator==(const UMLAttribute &rhs) const
Definition: umlattribute.cpp:218
UMLAttribute::load1
bool load1(QDomElement &element)
Definition: umlattribute.cpp:287
UMLAttribute::getTemplateParams
virtual UMLClassifierList getTemplateParams()
Definition: umlattribute.cpp:438
UMLAttribute::setName
void setName(const QString &name)
Definition: umlattribute.cpp:77
UMLAttribute::attributeChanged
void attributeChanged()
UMLAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: umlattribute.cpp:238
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: umlclassifierlistitem.h:25
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLObject::name
QString name() const
Definition: umlobject.cpp:207
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:14
umlclassifierlistitem.h