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

umlrole.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef UMLROLE_H
7#define UMLROLE_H
8
9#include "umlobject.h"
10
11 class UMLAssociation;
12
19 class UMLRole : public UMLObject
20{
21 Q_OBJECT
22 public:
23
24 UMLRole(UMLAssociation * parent, UMLObject * parentUMLObject, Uml::RoleType::Enum role);
25 virtual ~UMLRole();
26
27 bool operator==(const UMLRole & rhs) const;
28
29 QString toString() const;
30
31 void setObject(UMLObject *obj);
32 UMLObject* object() const;
33
34 void setChangeability(Uml::Changeability::Enum value);
35 Uml::Changeability::Enum changeability() const;
36
37 void setMultiplicity(const QString &multi);
38 QString multiplicity() const;
39
40 UMLAssociation * parentAssociation() const;
41
42 Uml::RoleType::Enum role() const;
43
44 UMLObject* clone() const { return 0; }
45
46 void saveToXMI(QXmlStreamWriter& writer);
47
48 virtual bool showPropertiesDialog(QWidget *parent = 0);
49
50 protected:
51
52 bool load1(QDomElement& element);
53
54 private:
55
56 UMLAssociation * m_pAssoc;
57 Uml::RoleType::Enum m_role;
58 QString m_Multi;
59 Uml::Changeability::Enum m_Changeability;
60};
61
62#endif
UMLAssociation
Sets up association information.
Definition association.h:29
UMLObject
The base class for UML objects.
Definition umlobject.h:70
UMLRole
Definition umlrole.h:20
UMLRole::m_Changeability
Uml::Changeability::Enum m_Changeability
Definition umlrole.h:59
UMLRole::clone
UMLObject * clone() const
Definition umlrole.h:44
UMLRole::setChangeability
void setChangeability(Uml::Changeability::Enum value)
Definition umlrole.cpp:144
UMLRole::operator==
bool operator==(const UMLRole &rhs) const
Definition umlrole.cpp:56
UMLRole::setObject
void setObject(UMLObject *obj)
Definition umlrole.cpp:122
UMLRole::load1
bool load1(QDomElement &element)
Definition umlrole.cpp:247
UMLRole::toString
QString toString() const
Definition umlrole.cpp:71
UMLRole::setMultiplicity
void setMultiplicity(const QString &multi)
Definition umlrole.cpp:155
UMLRole::changeability
Uml::Changeability::Enum changeability() const
Definition umlrole.cpp:102
UMLRole::~UMLRole
virtual ~UMLRole()
Definition umlrole.cpp:49
UMLRole::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition umlrole.cpp:235
UMLRole::UMLRole
UMLRole(UMLAssociation *parent, UMLObject *parentUMLObject, Uml::RoleType::Enum role)
Definition umlrole.cpp:31
UMLRole::parentAssociation
UMLAssociation * parentAssociation() const
Definition umlrole.cpp:83
UMLRole::multiplicity
QString multiplicity() const
Definition umlrole.cpp:112
UMLRole::saveToXMI
void saveToXMI(QXmlStreamWriter &writer)
Definition umlrole.cpp:176
UMLRole::object
UMLObject * object() const
Definition umlrole.cpp:92
UMLRole::role
Uml::RoleType::Enum role() const
Definition umlrole.cpp:168
UMLRole::m_pAssoc
UMLAssociation * m_pAssoc
Definition umlrole.h:56
UMLRole::m_Multi
QString m_Multi
Definition umlrole.h:58
UMLRole::m_role
Uml::RoleType::Enum m_role
Definition umlrole.h:57
Uml::Changeability::Enum
Enum
Definition basictypes.h:202
Uml::RoleType::Enum
Enum
Definition basictypes.h:236
umlobject.h