umbrello: umbrello/umlwidgets/enumwidget.h Source File

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

enumwidget.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 ENUMWIDGET_H
12 #define ENUMWIDGET_H
13
14 #include "umlwidget.h"
15
16 #define ENUM_MARGIN 5
17
27 class EnumWidget : public UMLWidget
28 {
29 Q_OBJECT
30 public:
31 explicit EnumWidget(UMLScene *scene, UMLObject* o);
32 virtual ~EnumWidget();
33
34 bool showPackage() const;
35 void setShowPackage(bool _status);
36 void toggleShowPackage();
37
38 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
39
40 virtual bool loadFromXMI1(QDomElement& qElement);
41 virtual void saveToXMI1(QXmlStreamWriter& writer);
42
43 public Q_SLOTS:
44 virtual void slotMenuSelection(QAction* action);
45
46 protected:
47 QSizeF minimumSize() const;
48
49 bool m_showPackage;
50 };
51
52 #endif
EnumWidget
A graphical version of an enum.
Definition: enumwidget.h:28
EnumWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: enumwidget.cpp:178
EnumWidget::~EnumWidget
virtual ~EnumWidget()
Definition: enumwidget.cpp:58
EnumWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: enumwidget.cpp:163
EnumWidget::EnumWidget
EnumWidget(UMLScene *scene, UMLObject *o)
Definition: enumwidget.cpp:39
EnumWidget::showPackage
bool showPackage() const
Definition: enumwidget.cpp:67
EnumWidget::minimumSize
QSizeF minimumSize() const
Definition: enumwidget.cpp:213
EnumWidget::toggleShowPackage
void toggleShowPackage()
Definition: enumwidget.cpp:87
EnumWidget::m_showPackage
bool m_showPackage
Definition: enumwidget.h:49
EnumWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: enumwidget.cpp:193
EnumWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: enumwidget.cpp:98
EnumWidget::setShowPackage
void setShowPackage(bool _status)
Definition: enumwidget.cpp:77
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