umbrello: umbrello/uml1model/umlrole.h Source File

umbrello 2.31.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(QDomDocument& qDoc, QDomElement& qElement);
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
UMLRole::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: umlrole.cpp:238
UMLObject::id
virtual Uml::ID::Type id() const
Definition: umlobject.cpp:425
umlrole.h
UMLAssociation::setAssociationType
void setAssociationType(Uml::AssociationType::Enum assocType)
Definition: association.cpp:611
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
Uml::Changeability::AddOnly
@ AddOnly
Definition: basictypes.h:224
Uml::Changeability::Changeable
@ Changeable
Definition: basictypes.h:222
Uml::RoleType::A
@ A
Definition: basictypes.h:256
UMLObject::m_SecondaryId
QString m_SecondaryId
Definition: umlobject.h:286
UMLRole::setObject
void setObject(UMLObject *obj)
Definition: umlrole.cpp:123
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1280
UMLObject::emitModified
void emitModified()
Definition: umlobject.cpp:385
association.h
UMLRole::saveToXMI1
void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlrole.cpp:177
Uml::AssociationType::UniAssociation
@ UniAssociation
Definition: basictypes.h:136
Uml::AssociationType::Relationship
@ Relationship
Definition: basictypes.h:143
UMLObject
The base class for UML objects.
Definition: umlobject.h:73
UMLRole::load1
bool load1(QDomElement &element)
Definition: umlrole.cpp:250
UMLRole
Definition: umlrole.h:24
UMLRole::setChangeability
void setChangeability(Uml::Changeability::Enum value)
Definition: umlrole.cpp:145
UMLObject::m_pSecondary
QPointer< UMLObject > m_pSecondary
Definition: umlobject.h:282
Uml::Changeability::Enum
Enum
Definition: basictypes.h:221
UMLRole::~UMLRole
virtual ~UMLRole()
Definition: umlrole.cpp:50
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
Uml::AssociationType::Aggregation
@ Aggregation
Definition: basictypes.h:125
UMLObject::m_name
QString m_name
objects name
Definition: umlobject.h:275
Uml::ID::fromString
ID::Type fromString(const QString &id)
Definition: basictypes.cpp:1285
Uml::Changeability::Frozen
@ Frozen
Definition: basictypes.h:223
UMLRole::operator==
bool operator==(const UMLRole &rhs) const
Definition: umlrole.cpp:57
UMLRole::m_Multi
QString m_Multi
Definition: umlrole.h:63
UMLObject::visibility
Uml::Visibility::Enum visibility() const
Definition: umlobject.cpp:466
UMLObject::ot_Role
@ ot_Role
Definition: umlobject.h:100
UMLRole::setMultiplicity
void setMultiplicity(const QString &multi)
Definition: umlrole.cpp:156
uWarning
#define uWarning()
Definition: debug_utils.h:124
Uml::Visibility::toString
QString toString(Enum item, bool mnemonic)
Definition: basictypes.cpp:124
UMLObject::asUMLRole
UMLRole * asUMLRole()
Definition: umlobject.cpp:1326
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:844
UMLRole::m_Changeability
Uml::Changeability::Enum m_Changeability
Definition: umlrole.h:64
UMLRole::m_role
Uml::RoleType::Enum m_role
Definition: umlrole.h:62
uDebug
#define uDebug()
Definition: debug_utils.h:122
UMLRole::UMLRole
UMLRole(UMLAssociation *parent, UMLObject *parentUMLObject, Uml::RoleType::Enum role)
Definition: umlrole.cpp:32
UMLAssociation::setOldLoadMode
void setOldLoadMode(bool value=true)
Definition: association.cpp:594
UMLRole::m_pAssoc
UMLAssociation * m_pAssoc
Definition: umlrole.h:61
UMLObject::modified
void modified()
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
UMLObject::doc
QString doc() const
Definition: umlobject.cpp:435
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
UMLDoc
Definition: umldoc.h:74
UMLRole::clone
UMLObject * clone() const
Definition: umlrole.h:49
Uml
Definition: basictypes.cpp:36
UMLRole::changeability
Uml::Changeability::Enum changeability() const
Definition: umlrole.cpp:103
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3548
UMLObject::m_nId
Uml::ID::Type m_nId
object's id
Definition: umlobject.h:272
uError
#define uError()
Definition: debug_utils.h:123
umlroledialog.h
uml.h
UMLRoleDialog
Definition: umlroledialog.h:24
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:32
umlobject.h
UMLAssociation::getAssocType
Uml::AssociationType::Enum getAssocType() const
Definition: association.cpp:105
Uml::AssociationType::Composition
@ Composition
Definition: basictypes.h:134
UMLRole::role
Uml::RoleType::Enum role() const
Definition: umlrole.cpp:169
UMLRole::object
UMLObject * object() const
Definition: umlrole.cpp:93
UMLRole::multiplicity
QString multiplicity() const
Definition: umlrole.cpp:113
UMLRole::toString
QString toString() const
Definition: umlrole.cpp:72
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1055
umldoc.h
UMLRole::parentAssociation
UMLAssociation * parentAssociation() const
Definition: umlrole.cpp:84
UMLAssociation::getOldLoadMode
bool getOldLoadMode() const
Definition: association.cpp:602
Uml::RoleType::Enum
Enum
Definition: basictypes.h:255