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

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

- File List
- File Members

attribute.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 "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,
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 = 0);
57
58 void setParmKind(Uml::ParameterDirection::Enum pk);
59 Uml::ParameterDirection::Enum getParmKind() const;
60
61 virtual UMLClassifierList getTemplateParams();
62
63signals:
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 attribute.h:23
UMLAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false) const
Definition attribute.cpp:135
UMLAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition attribute.cpp:377
UMLAttribute::m_InitialValue
QString m_InitialValue
text for the attribute's initial value.
Definition attribute.h:71
UMLAttribute::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition attribute.cpp:266
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition attribute.cpp:123
UMLAttribute::setTemplateParams
void setTemplateParams(const QString &templateParam, UMLClassifierList &templateParamList)
Definition attribute.cpp:386
UMLAttribute::~UMLAttribute
virtual ~UMLAttribute()
Definition attribute.cpp:69
UMLAttribute::clone
virtual UMLObject * clone() const
Definition attribute.cpp:254
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition attribute.cpp:100
UMLAttribute::setInitialValue
void setInitialValue(const QString &iv)
Definition attribute.cpp:110
UMLAttribute::m_ParmKind
Uml::ParameterDirection::Enum m_ParmKind
Definition attribute.h:72
UMLAttribute::setVisibility
void setVisibility(Uml::Visibility::Enum s)
Definition attribute.cpp:88
UMLAttribute::getFullyQualifiedName
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition attribute.cpp:190
UMLAttribute::setParmKind
void setParmKind(Uml::ParameterDirection::Enum pk)
Definition attribute.cpp:118
UMLAttribute::operator==
bool operator==(const UMLAttribute &rhs) const
Definition attribute.cpp:218
UMLAttribute::load1
bool load1(QDomElement &element)
Definition attribute.cpp:287
UMLAttribute::getTemplateParams
virtual UMLClassifierList getTemplateParams()
Definition attribute.cpp:438
UMLAttribute::setName
void setName(const QString &name)
Definition attribute.cpp:77
UMLAttribute::attributeChanged
void attributeChanged()
UMLAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition attribute.cpp:238
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:36
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:207
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:14