umbrello: umbrello/umlwidgets/entitywidget.h Source File

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

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- File List
- File Members

entitywidget.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef ENTITYWIDGET_H
7#define ENTITYWIDGET_H
8
9#include "umlwidget.h"
10
11class UMLScene;
12
13#define ENTITY_MARGIN 5
14
24 class EntityWidget : public UMLWidget
25{
26 Q_OBJECT
27public:
28 explicit EntityWidget(UMLScene *scene, UMLObject* o);
29 virtual ~EntityWidget();
30
31 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
32
33 virtual bool loadFromXMI(QDomElement &qElement);
34 virtual void saveToXMI(QXmlStreamWriter& writer);
35
36 void setShowAttributeSignature(bool flag);
37 bool showAttributeSignature() const;
38
39public Q_SLOTS:
40 virtual void slotMenuSelection(QAction* action);
41
42protected:
43 bool m_showAttributeSignatures{false};
44
45 QSizeF minimumSize() const;
46 QSizeF calculateSize(bool withExtensions=true) const;
47};
48
49#endif
EntityWidget
A graphical version of an entity.
Definition entitywidget.h:25
EntityWidget::m_showAttributeSignatures
bool m_showAttributeSignatures
Definition entitywidget.h:43
EntityWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition entitywidget.cpp:210
EntityWidget::showAttributeSignature
bool showAttributeSignature() const
Definition entitywidget.cpp:293
EntityWidget::setShowAttributeSignature
void setShowAttributeSignature(bool flag)
Definition entitywidget.cpp:281
EntityWidget::EntityWidget
EntityWidget(UMLScene *scene, UMLObject *o)
Definition entitywidget.cpp:36
EntityWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition entitywidget.cpp:100
EntityWidget::loadFromXMI
virtual bool loadFromXMI(QDomElement &qElement)
Definition entitywidget.cpp:183
EntityWidget::calculateSize
QSizeF calculateSize(bool withExtensions=true) const
Definition entitywidget.cpp:54
EntityWidget::minimumSize
QSizeF minimumSize() const
Definition entitywidget.cpp:267
EntityWidget::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition entitywidget.cpp:195
EntityWidget::~EntityWidget
virtual ~EntityWidget()
Definition entitywidget.cpp:45
UMLObject
The base class for UML objects.
Definition umlobject.h:70
UMLScene
Definition umlscene.h:65
UMLWidget
The base class for graphical UML objects.
Definition umlwidget.h:36
umlwidget.h