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

entitywidget.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 ENTITYWIDGET_H
12 #define ENTITYWIDGET_H
13
14 #include "umlwidget.h"
15
16 class UMLScene;
17
18 #define ENTITY_MARGIN 5
19
29 class EntityWidget : public UMLWidget
30 {
31 Q_OBJECT
32 public:
33 explicit EntityWidget(UMLScene *scene, UMLObject* o);
34 virtual ~EntityWidget();
35
36 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
37
38 virtual bool loadFromXMI1(QDomElement &qElement);
39 virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
40
41 void setShowAttributeSignature(bool flag);
42 bool showAttributeSignature() const;
43
44 public Q_SLOTS:
45 virtual void slotMenuSelection(QAction* action);
46
47 protected:
48 bool m_showAttributeSignatures{false};
49
50 QSizeF minimumSize() const;
51 QSizeF calculateSize(bool withExtensions=true) const;
52 };
53
54 #endif
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
ListPopupMenu::mt_CheckConstraint
@ mt_CheckConstraint
Definition: listpopupmenu.h:71
EntityWidget::EntityWidget
EntityWidget(UMLScene *scene, UMLObject *o)
Definition: entitywidget.cpp:38
ListPopupMenu::mt_EntityAttribute
@ mt_EntityAttribute
Definition: listpopupmenu.h:83
WidgetBase::textColor
QColor textColor() const
Definition: widgetbase.cpp:335
UMLObject::ot_CheckConstraint
@ ot_CheckConstraint
Definition: umlobject.h:107
EntityWidget::minimumSize
QSizeF minimumSize() const
Definition: entitywidget.cpp:268
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
UMLEntityAttribute::Primary
@ Primary
Definition: entityattribute.h:33
EntityWidget::calculateSize
QSizeF calculateSize(bool withExtensions=true) const
Definition: entitywidget.cpp:56
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:309
entity.h
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1392
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:217
UMLWidget::FT_BOLD
@ FT_BOLD
Definition: umlwidget.h:218
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:998
UMLObject::ot_ForeignKeyConstraint
@ ot_ForeignKeyConstraint
Definition: umlobject.h:106
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
foreignkeyconstraint.h
UMLClassifierListItem::getTypeName
virtual QString getTypeName() const
Definition: classifierlistitem.cpp:112
UMLScene::backgroundColor
const QColor & backgroundColor() const
Definition: umlscene.cpp:1370
object_factory.h
ListPopupMenu::mt_UniqueConstraint
@ mt_UniqueConstraint
Definition: listpopupmenu.h:131
entitywidget.h
Object_Factory::createChildObject
UMLClassifierListItem * createChildObject(UMLClassifier *parent, UMLObject::ObjectType type, const QString &name)
Definition: object_factory.cpp:300
UMLEntityAttribute::getAttributes
QString getAttributes() const
Definition: entityattribute.cpp:75
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLWidget::showStereotype
bool showStereotype() const
Definition: umlwidget.cpp:2030
UMLObject::asUMLEntityAttribute
UMLEntityAttribute * asUMLEntityAttribute()
Definition: umlobject.cpp:1314
umlclassifierlistitemlist.h
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:1936
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:543
WidgetBase::fillColor
QColor fillColor() const
Definition: widgetbase.cpp:377
ListPopupMenu::mt_Show_Stereotypes
@ mt_Show_Stereotypes
Definition: listpopupmenu.h:170
classifierlistitem.h
entityattribute.h
EntityWidget::~EntityWidget
virtual ~EntityWidget()
Definition: entitywidget.cpp:47
umlwidget.h
UMLWidget::defaultMargin
static const int defaultMargin
Definition: umlwidget.h:49
ListPopupMenu::MenuType
MenuType
< This type hosts all possible menu entry types
Definition: listpopupmenu.h:44
UMLWidget::minimumSize
virtual QSizeF minimumSize() const
Definition: umlwidget.cpp:219
EntityWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: entitywidget.cpp:197
UMLObject::ot_EntityAttribute
@ ot_EntityAttribute
Definition: umlobject.h:102
ListPopupMenu::mt_Show_Attribute_Signature
@ mt_Show_Attribute_Signature
Definition: listpopupmenu.h:156
EntityWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: entitywidget.cpp:212
EntityWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: entitywidget.cpp:185
WidgetBase::m_scene
UMLScene * m_scene
Definition: widgetbase.h:316
UMLObject::ot_UniqueConstraint
@ ot_UniqueConstraint
Definition: umlobject.h:105
EntityWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: entitywidget.cpp:102
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
WidgetBase::useFillColor
bool useFillColor()
Definition: widgetbase.cpp:419
UMLDoc::setModified
void setModified(bool modified=true)
Definition: umldoc.cpp:3136
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:105
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:27
EntityWidget::m_showAttributeSignatures
bool m_showAttributeSignatures
Definition: entitywidget.h:48
classifier.h
UMLObject::asUMLUniqueConstraint
UMLUniqueConstraint * asUMLUniqueConstraint()
Definition: umlobject.cpp:1330
uniqueconstraint.h
umlscene.h
EntityWidget
A graphical version of an entity.
Definition: entitywidget.h:30
uml.h
ListPopupMenu::mt_PrimaryKeyConstraint
@ mt_PrimaryKeyConstraint
Definition: listpopupmenu.h:119
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
UMLWidget::setShowStereotype
virtual void setShowStereotype(bool flag)
Definition: umlwidget.cpp:2018
UMLScene
Definition: umlscene.h:69
ListPopupMenu::typeFromAction
static MenuType typeFromAction(QAction *action)
Definition: listpopupmenu.cpp:407
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition: umlwidget.cpp:1781
UMLWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlwidget.cpp:2045
listpopupmenu.h
EntityWidget::setShowAttributeSignature
void setShowAttributeSignature(bool flag)
Definition: entitywidget.cpp:282
UMLEntityAttribute
Sets up entityattribute information.
Definition: entityattribute.h:26
UMLObject::stereotype
QString stereotype(bool includeAdornments=false) const
Definition: umlobject.cpp:559
EntityWidget::showAttributeSignature
bool showAttributeSignature() const
Definition: entitywidget.cpp:294
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
WidgetBase::m_umlObject
QPointer< UMLObject > m_umlObject
Definition: widgetbase.h:317
UMLWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlwidget.cpp:2067
UMLWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: umlwidget.cpp:768
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
ListPopupMenu::mt_ForeignKeyConstraint
@ mt_ForeignKeyConstraint
Definition: listpopupmenu.h:89
UMLUniqueConstraint
Sets up Unique entity constraint information.
Definition: uniqueconstraint.h:29
UMLEntityAttribute::indexType
DBIndex_Type indexType() const
Definition: entityattribute.cpp:129
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1869
ENTITY_MARGIN
#define ENTITY_MARGIN
Definition: entitywidget.h:18