umbrello: umbrello/umlwidgets/entitywidget.h Source File

umbrello 2.32.0 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(QXmlStreamWriter& writer);
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
EntityWidget
A graphical version of an entity.
Definition: entitywidget.h:30
EntityWidget::m_showAttributeSignatures
bool m_showAttributeSignatures
Definition: entitywidget.h:48
EntityWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: entitywidget.cpp:215
EntityWidget::showAttributeSignature
bool showAttributeSignature() const
Definition: entitywidget.cpp:298
EntityWidget::setShowAttributeSignature
void setShowAttributeSignature(bool flag)
Definition: entitywidget.cpp:286
EntityWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: entitywidget.cpp:188
EntityWidget::EntityWidget
EntityWidget(UMLScene *scene, UMLObject *o)
Definition: entitywidget.cpp:41
EntityWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: entitywidget.cpp:105
EntityWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: entitywidget.cpp:200
EntityWidget::calculateSize
QSizeF calculateSize(bool withExtensions=true) const
Definition: entitywidget.cpp:59
EntityWidget::minimumSize
QSizeF minimumSize() const
Definition: entitywidget.cpp:272
EntityWidget::~EntityWidget
virtual ~EntityWidget()
Definition: entitywidget.cpp:50
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLScene
Definition: umlscene.h:70
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
umlwidget.h