umbrello: umbrello/umlwidgets/enumwidget.h Source File

umbrello 2.31.0 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(QDomDocument& qDoc, QDomElement& qElement);
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
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
WidgetBase::textColor
QColor textColor() const
Definition: widgetbase.cpp:335
Settings::ClassState::showPackage
bool showPackage
Definition: optionstate.h:135
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:40
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:309
enumwidget.h
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1392
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:217
UMLWidget::FT_BOLD_ITALIC
@ FT_BOLD_ITALIC
Definition: umlwidget.h:221
UMLWidget::FT_BOLD
@ FT_BOLD
Definition: umlwidget.h:218
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:998
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
UMLScene::backgroundColor
const QColor & backgroundColor() const
Definition: umlscene.cpp:1355
EnumWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: enumwidget.cpp:95
object_factory.h
EnumWidget
A graphical version of an enum.
Definition: enumwidget.h:27
Object_Factory::createChildObject
UMLClassifierListItem * createChildObject(UMLClassifier *parent, UMLObject::ObjectType type, const QString &name)
Definition: object_factory.cpp:308
ENUM_MARGIN
#define ENUM_MARGIN
Definition: enumwidget.h:16
EnumWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: enumwidget.cpp:175
EnumWidget::showPackage
bool showPackage() const
Definition: enumwidget.cpp:64
UMLObject
The base class for UML objects.
Definition: umlobject.h:73
UMLObject::ot_EnumLiteral
@ ot_EnumLiteral
Definition: umlobject.h:94
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
classifierlistitem.h
EnumWidget::m_showPackage
bool m_showPackage
Definition: enumwidget.h:49
umlwidget.h
ListPopupMenu::MenuType
MenuType
< This type hosts all possible menu entry types
Definition: listpopupmenu.h:43
UMLWidget::minimumSize
virtual QSizeF minimumSize() const
Definition: umlwidget.cpp:219
EnumWidget::setShowPackage
void setShowPackage(bool _status)
Definition: enumwidget.cpp:74
EnumWidget::toggleShowPackage
void toggleShowPackage()
Definition: enumwidget.cpp:84
WidgetBase::m_scene
UMLScene * m_scene
Definition: widgetbase.h:316
EnumWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: enumwidget.cpp:160
UMLClassifierListItem::toString
virtual QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: classifierlistitem.cpp:90
ListPopupMenu::mt_EnumLiteral
@ mt_EnumLiteral
Definition: listpopupmenu.h:85
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
WidgetBase::useFillColor
bool useFillColor()
Definition: widgetbase.cpp:419
EnumWidget::EnumWidget
EnumWidget(UMLScene *scene, UMLObject *o)
Definition: enumwidget.cpp:36
UMLDoc::setModified
void setModified(bool modified=true)
Definition: umldoc.cpp:3125
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:104
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:26
Settings::OptionState
Definition: optionstate.h:322
Settings::OptionState::classState
ClassState classState
Definition: optionstate.h:337
classifier.h
EnumWidget::~EnumWidget
virtual ~EnumWidget()
Definition: enumwidget.cpp:55
umlscene.h
uml.h
EnumWidget::minimumSize
QSizeF minimumSize() const
Definition: enumwidget.cpp:210
enumliteral.h
EnumWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: enumwidget.cpp:190
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:39
debug_utils.h
UMLScene
Definition: umlscene.h:68
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
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:29
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:1055
umldoc.h
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1869
enum.h