umbrello: umbrello/uml1model/umlrole.h Source File

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

umlrole.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2003-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLROLE_H
12 #define UMLROLE_H
13
14 #include "umlobject.h"
15
16 class UMLAssociation;
17
24 class UMLRole : public UMLObject
25 {
26 Q_OBJECT
27 public:
28
29 UMLRole(UMLAssociation * parent, UMLObject * parentUMLObject, Uml::RoleType::Enum role);
30 virtual ~UMLRole();
31
32 bool operator==(const UMLRole & rhs) const;
33
34 QString toString() const;
35
36 void setObject(UMLObject *obj);
37 UMLObject* object() const;
38
39 void setChangeability(Uml::Changeability::Enum value);
40 Uml::Changeability::Enum changeability() const;
41
42 void setMultiplicity(const QString &multi);
43 QString multiplicity() const;
44
45 UMLAssociation * parentAssociation() const;
46
47 Uml::RoleType::Enum role() const;
48
49 UMLObject* clone() const { return 0; }
50
51 void saveToXMI1(QXmlStreamWriter& writer);
52
53 virtual bool showPropertiesDialog(QWidget *parent = 0);
54
55 protected:
56
57 bool load1(QDomElement& element);
58
59 private:
60
61 UMLAssociation * m_pAssoc;
62 Uml::RoleType::Enum m_role;
63 QString m_Multi;
64 Uml::Changeability::Enum m_Changeability;
65 };
66
67 #endif
UMLAssociation
Sets up association information.
Definition: association.h:34
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLRole
Definition: umlrole.h:25
UMLRole::m_Changeability
Uml::Changeability::Enum m_Changeability
Definition: umlrole.h:64
UMLRole::saveToXMI1
void saveToXMI1(QXmlStreamWriter &writer)
Definition: umlrole.cpp:177
UMLRole::setChangeability
void setChangeability(Uml::Changeability::Enum value)
Definition: umlrole.cpp:145
UMLRole::operator==
bool operator==(const UMLRole &rhs) const
Definition: umlrole.cpp:57
UMLRole::setObject
void setObject(UMLObject *obj)
Definition: umlrole.cpp:123
UMLRole::load1
bool load1(QDomElement &element)
Definition: umlrole.cpp:250
UMLRole::toString
QString toString() const
Definition: umlrole.cpp:72
UMLRole::setMultiplicity
void setMultiplicity(const QString &multi)
Definition: umlrole.cpp:156
UMLRole::changeability
Uml::Changeability::Enum changeability() const
Definition: umlrole.cpp:103
UMLRole::~UMLRole
virtual ~UMLRole()
Definition: umlrole.cpp:50
UMLRole::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: umlrole.cpp:238
UMLRole::UMLRole
UMLRole(UMLAssociation *parent, UMLObject *parentUMLObject, Uml::RoleType::Enum role)
Definition: umlrole.cpp:32
UMLRole::parentAssociation
UMLAssociation * parentAssociation() const
Definition: umlrole.cpp:84
UMLRole::multiplicity
QString multiplicity() const
Definition: umlrole.cpp:113
UMLRole::object
UMLObject * object() const
Definition: umlrole.cpp:93
UMLRole::role
Uml::RoleType::Enum role() const
Definition: umlrole.cpp:169
UMLRole::m_pAssoc
UMLAssociation * m_pAssoc
Definition: umlrole.h:61
UMLRole::m_Multi
QString m_Multi
Definition: umlrole.h:63
UMLRole::clone
UMLObject * clone() const
Definition: umlrole.h:49
UMLRole::m_role
Uml::RoleType::Enum m_role
Definition: umlrole.h:62
Uml::Changeability::Enum
Enum
Definition: basictypes.h:216
Uml::RoleType::Enum
Enum
Definition: basictypes.h:250
umlobject.h