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

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 nullptr; }
45
46 void saveToXMI(QXmlStreamWriter& writer);
47
48 virtual bool showPropertiesDialog(QWidget *parent = nullptr);
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: umlassociation.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::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=nullptr)
Definition: umlrole.cpp:234
UMLRole::setChangeability
void setChangeability(Uml::Changeability::Enum value)
Definition: umlrole.cpp:143
UMLRole::operator==
bool operator==(const UMLRole &rhs) const
Definition: umlrole.cpp:55
UMLRole::setObject
void setObject(UMLObject *obj)
Definition: umlrole.cpp:121
UMLRole::load1
bool load1(QDomElement &element)
Definition: umlrole.cpp:246
UMLRole::toString
QString toString() const
Definition: umlrole.cpp:70
UMLRole::setMultiplicity
void setMultiplicity(const QString &multi)
Definition: umlrole.cpp:154
UMLRole::changeability
Uml::Changeability::Enum changeability() const
Definition: umlrole.cpp:101
UMLRole::~UMLRole
virtual ~UMLRole()
Definition: umlrole.cpp:48
UMLRole::parentAssociation
UMLAssociation * parentAssociation() const
Definition: umlrole.cpp:82
UMLRole::multiplicity
QString multiplicity() const
Definition: umlrole.cpp:111
UMLRole::saveToXMI
void saveToXMI(QXmlStreamWriter &writer)
Definition: umlrole.cpp:175
UMLRole::object
UMLObject * object() const
Definition: umlrole.cpp:91
UMLRole::role
Uml::RoleType::Enum role() const
Definition: umlrole.cpp:167
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