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

visibilityenumwidget.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 VISIBILITYENUMWIDGET_H
12 #define VISIBILITYENUMWIDGET_H
13
14 #include "basictypes.h"
15
16 #include <QMap>
17 #include <QWidget>
18
19 class AssociationWidget;
20 class UMLObject;
21
22 class QVBoxLayout;
23 class QGroupBox;
24 class QRadioButton;
25
26 class VisibilityEnumWidget : public QWidget
27 {
28 Q_OBJECT
29 public:
30 typedef QMap<Uml::Visibility::Enum,QString> TextMap;
31 typedef QMap<Uml::Visibility::Enum,QRadioButton*> ButtonMap;
32
33 explicit VisibilityEnumWidget(UMLObject *o, QWidget *parent=0);
34 VisibilityEnumWidget(AssociationWidget *a, Uml::RoleType::Enum role, QWidget *parent=0);
35 ~VisibilityEnumWidget();
36
37 void addToLayout(QVBoxLayout *layout);
38 void apply();
39
40 protected:
41 TextMap m_texts;
42 QGroupBox *m_box;
43 ButtonMap m_buttons;
44 UMLObject *m_object;
45 AssociationWidget *m_widget;
46 Uml::RoleType::Enum m_role;
47
48 void init(const QString &title);
49 };
50
51 #endif // VISIBILITYENUMWIDGET_H
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
VisibilityEnumWidget::m_widget
AssociationWidget * m_widget
Definition: visibilityenumwidget.h:45
VisibilityEnumWidget::addToLayout
void addToLayout(QVBoxLayout *layout)
Definition: visibilityenumwidget.cpp:70
Uml::Visibility::Implementation
@ Implementation
Definition: basictypes.h:63
VisibilityEnumWidget::ButtonMap
QMap< Uml::Visibility::Enum, QRadioButton * > ButtonMap
Definition: visibilityenumwidget.h:31
VisibilityEnumWidget::m_buttons
ButtonMap m_buttons
Definition: visibilityenumwidget.h:43
Uml::RoleType::A
@ A
Definition: basictypes.h:239
VisibilityEnumWidget
Definition: visibilityenumwidget.h:27
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
VisibilityEnumWidget::m_object
UMLObject * m_object
Definition: visibilityenumwidget.h:44
VisibilityEnumWidget::init
void init(const QString &title)
Definition: visibilityenumwidget.cpp:90
Uml::Visibility::Public
@ Public
Definition: basictypes.h:60
UMLObject::visibility
Uml::Visibility::Enum visibility() const
Definition: umlobject.cpp:466
a
QString a
Definition: petalnode.cpp:18
i18n
#define i18n
Definition: main.cpp:39
basictypes.h
visibilityenumwidget.h
VisibilityEnumWidget::TextMap
QMap< Uml::Visibility::Enum, QString > TextMap
Definition: visibilityenumwidget.h:30
Uml
Definition: basictypes.cpp:37
associationwidget.h
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
A
Definition: testbasictypes.cpp:33
uml.h
VisibilityEnumWidget::m_box
QGroupBox * m_box
Definition: visibilityenumwidget.h:42
umlobject.h
UMLObject::setVisibility
void setVisibility(Uml::Visibility::Enum visibility)
Definition: umlobject.cpp:476
VisibilityEnumWidget::apply
void apply()
Definition: visibilityenumwidget.cpp:78
VisibilityEnumWidget::m_texts
TextMap m_texts
Definition: visibilityenumwidget.h:41
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61
Uml::Visibility::Protected
@ Protected
Definition: basictypes.h:62
AssociationWidget::setVisibility
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Definition: associationwidget.cpp:1092
VisibilityEnumWidget::m_role
Uml::RoleType::Enum m_role
Definition: visibilityenumwidget.h:46
VisibilityEnumWidget::~VisibilityEnumWidget
~VisibilityEnumWidget()
Definition: visibilityenumwidget.cpp:61
Uml::RoleType::Enum
Enum
Definition: basictypes.h:238
VisibilityEnumWidget::VisibilityEnumWidget
VisibilityEnumWidget(UMLObject *o, QWidget *parent=0)
Definition: visibilityenumwidget.cpp:23