umbrello: umbrello/umlwidgets/associationwidgetrole.h Source File

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

associationwidgetrole.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) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef ASSOCIATIONWIDGETROLE_H
12 #define ASSOCIATIONWIDGETROLE_H
13
14 #include "basictypes.h"
15
16 #include <QPointer>
17
18 class AssociationWidget;
19 class FloatingTextWidget;
20 class UMLWidget;
21
22 class QPointF;
23 class QDomDocument;
24 class QDomElement;
25
31 class AssociationWidgetRole {
32 public:
33 FloatingTextWidget* multiplicityWidget;
34 FloatingTextWidget* changeabilityWidget;
35 FloatingTextWidget* roleWidget;
36
37 QPointer<UMLWidget> umlWidget;
38
39 Uml::Region::Enum m_WidgetRegion;
40
41 int m_nIndex;
42 int m_nTotalCount;
43
44 // The following items are only used if m_pObject is not set.
45 Uml::Visibility::Enum visibility;
46 Uml::Changeability::Enum changeability;
47 QString roleDocumentation;
48
49 AssociationWidgetRole();
50
51 void setParent(AssociationWidget *parent) { m_q = parent; }
52 void cleanup();
53
54 void setFont(const QFont &font);
55
56 UMLWidget *onWidget(const QPointF &p);
57 void setSelected(bool select);
58 void clipSize();
59
60 void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement, const QString &suffix);
61 bool loadFromXMI1(QDomElement &qElement, const QString &suffix);
62 bool getStartMove();
63
64 private:
65 AssociationWidget *m_q;
66 };
67
68 #endif // ASSOCIATIONWIDGETROLE_H
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:51
UMLWidget::setFont
virtual void setFont(const QFont &font)
Definition: umlwidget.cpp:1955
AssociationWidgetRole::m_nTotalCount
int m_nTotalCount
total amount of associations on the region this role's line is on
Definition: associationwidgetrole.h:42
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:40
AssociationWidgetRole::onWidget
UMLWidget * onWidget(const QPointF &p)
Definition: associationwidgetrole.cpp:69
AssociationWidgetRole::AssociationWidgetRole
AssociationWidgetRole()
Definition: associationwidgetrole.cpp:17
Uml::Changeability::Changeable
@ Changeable
Definition: basictypes.h:222
AssociationWidgetRole::m_nIndex
int m_nIndex
the index of where the line is on the region for this role
Definition: associationwidgetrole.h:41
Uml::Region::Error
@ Error
Definition: basictypes.h:328
WidgetBase::umlScene
UMLScene * umlScene() const
Definition: widgetbase.cpp:162
associationwidgetrole.h
AssociationWidgetRole::loadFromXMI1
bool loadFromXMI1(QDomElement &qElement, const QString &suffix)
Definition: associationwidgetrole.cpp:120
AssociationWidgetRole::setSelected
void setSelected(bool select)
Definition: associationwidgetrole.cpp:85
FloatingTextWidget::onWidget
UMLWidget * onWidget(const QPointF &p)
Definition: floatingtextwidget.cpp:594
AssociationWidgetRole::clipSize
void clipSize()
Definition: associationwidgetrole.cpp:95
AssociationWidgetRole::getStartMove
bool getStartMove()
Definition: associationwidgetrole.cpp:129
floatingtextwidget.h
Uml::Changeability::Enum
Enum
Definition: basictypes.h:221
Uml::Visibility::Public
@ Public
Definition: basictypes.h:77
UMLWidget::getStartMove
bool getStartMove() const
Definition: umlwidget.h:104
UMLWidget::setSelected
virtual void setSelected(bool _select)
Definition: umlwidget.cpp:1573
umlwidget.h
UMLWidget::clipSize
void clipSize()
Definition: umlwidget.cpp:1805
AssociationWidgetRole::setFont
void setFont(const QFont &font)
Definition: associationwidgetrole.cpp:51
basictypes.h
Uml::Region::Enum
Enum
Definition: basictypes.h:327
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:36
AssociationWidgetRole::saveToXMI1
void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement, const QString &suffix)
Definition: associationwidgetrole.cpp:107
visibility
Definition: visibility.py:1
AssociationWidgetRole::cleanup
void cleanup()
Definition: associationwidgetrole.cpp:31
Uml
Definition: basictypes.cpp:36
AssociationWidgetRole::changeabilityWidget
FloatingTextWidget * changeabilityWidget
information regarding changeability
Definition: associationwidgetrole.h:34
Uml::Visibility::Enum
Enum
Definition: basictypes.h:76
AssociationWidgetRole::roleWidget
FloatingTextWidget * roleWidget
role's label of this association
Definition: associationwidgetrole.h:35
umlscene.h
AssociationWidgetRole::umlWidget
QPointer< UMLWidget > umlWidget
UMLWidget at this role's side of this association.
Definition: associationwidgetrole.h:37
AssociationWidgetRole::m_WidgetRegion
Uml::Region::Enum m_WidgetRegion
region of this role's widget
Definition: associationwidgetrole.h:39
AssociationWidgetRole::multiplicityWidget
FloatingTextWidget * multiplicityWidget
information regarding multiplicity
Definition: associationwidgetrole.h:33
AssociationWidgetRole::roleDocumentation
QString roleDocumentation
Definition: associationwidgetrole.h:47
UMLScene::removeWidget
void removeWidget(UMLWidget *o)
Definition: umlscene.cpp:1289
AssociationWidgetRole::m_q
AssociationWidget * m_q
Definition: associationwidgetrole.h:65
AssociationWidgetRole
Definition: associationwidgetrole.h:31
AssociationWidgetRole::setParent
void setParent(AssociationWidget *parent)
Definition: associationwidgetrole.h:51
AssociationWidgetRole::changeability
Uml::Changeability::Enum changeability
Definition: associationwidgetrole.h:46
AssociationWidgetRole::visibility
Uml::Visibility::Enum visibility
Definition: associationwidgetrole.h:45
FloatingTextWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: floatingtextwidget.cpp:676