umbrello: umbrello/umlwidgets/objectnodewidget.h Source File

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

objectnodewidget.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) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef OBJECTNODEWIDGET_H
12 #define OBJECTNODEWIDGET_H
13
14 #include "umlwidget.h"
15
28 class ObjectNodeWidget : public UMLWidget
29 {
30 Q_OBJECT
31
32 public:
33 enum ObjectNodeType
34 {
35 Normal,
36 Data,
37 Buffer,
38 Flow
39 };
40
41 explicit ObjectNodeWidget(UMLScene * scene, ObjectNodeType objectNodeType = Normal, Uml::ID::Type id = Uml::ID::None);
42 virtual ~ObjectNodeWidget();
43
44 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
45
46 ObjectNodeType objectNodeType() const;
47 static ObjectNodeType toObjectNodeType(const QString& type);
48
49 void setObjectNodeType(ObjectNodeType objectNodeType);
50 void setObjectNodeType(const QString& type) ;
51
52 void setState(const QString& state);
53 QString state() const;
54
55 virtual bool showPropertiesDialog();
56
57 void askStateForWidget();
58 void askForObjectNodeType(UMLWidget* &targetWidget);
59
60 virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
61 virtual bool loadFromXMI1(QDomElement& qElement);
62
63 protected:
64 QSizeF minimumSize() const;
65
66 public slots:
67 void slotMenuSelection(QAction* action);
68 void slotOk();
69
70 private:
71 ObjectNodeType m_objectNodeType;
72 QString m_state;
73
74 };
75
76 #endif
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
WidgetBase::textColor
QColor textColor() const
Definition: widgetbase.cpp:335
ObjectNodeWidget::Data
@ Data
Definition: objectnodewidget.h:52
ListPopupMenu::mt_Properties
@ mt_Properties
Definition: listpopupmenu.h:182
docwindow.h
ObjectNodeWidget
A graphical version of a UML Activity.
Definition: objectnodewidget.h:28
ObjectNodeWidget::ObjectNodeWidget
ObjectNodeWidget(UMLScene *scene, ObjectNodeType objectNodeType=Normal, Uml::ID::Type id=Uml::ID::None)
Definition: objectnodewidget.cpp:45
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:40
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:309
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1392
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:217
ObjectNodeWidget::askForObjectNodeType
void askForObjectNodeType(UMLWidget *&targetWidget)
Definition: objectnodewidget.cpp:304
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:370
ObjectNodeWidget::setObjectNodeType
void setObjectNodeType(ObjectNodeType objectNodeType)
Definition: objectnodewidget.cpp:195
OBJECTNODE_HEIGHT
#define OBJECTNODE_HEIGHT
Definition: objectnodewidget.cpp:34
objectnodedialog.h
Dialog_Utils::askNameForWidget
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Definition: dialog_utils.cpp:74
UMLWidget::cleanup
virtual void cleanup()
Definition: umlwidget.cpp:1706
ObjectNodeWidget::state
QString state() const
Definition: objectnodewidget.cpp:221
DocWindow::updateDocumentation
void updateDocumentation(bool clear=false, bool startup=false)
Definition: docwindow.cpp:273
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:96
Uml::ID::Type
std::string Type
Definition: basictypes.h:368
ObjectNodeWidget::ObjectNodeType
ObjectNodeType
Definition: objectnodewidget.h:41
WidgetBase::asObjectNodeWidget
ObjectNodeWidget * asObjectNodeWidget()
Definition: widgetbase.cpp:1483
ObjectNodeWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: objectnodewidget.cpp:289
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:1936
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:543
ObjectNodeWidget::setState
void setState(const QString &state)
Definition: objectnodewidget.cpp:212
OBJECTNODE_MARGIN
#define OBJECTNODE_MARGIN
Definition: objectnodewidget.cpp:32
WidgetBase::fillColor
QColor fillColor() const
Definition: widgetbase.cpp:377
ObjectNodeWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: objectnodewidget.cpp:62
UMLApp::docWindow
DocWindow * docWindow() const
Definition: uml.cpp:1886
ObjectNodeWidget::m_state
QString m_state
state of object node when it's an objectFlow
Definition: objectnodewidget.h:80
umlwidget.h
ObjectNodeWidget::Buffer
@ Buffer
Definition: objectnodewidget.h:53
ListPopupMenu::MenuType
MenuType
< This type hosts all possible menu entry types
Definition: listpopupmenu.h:43
ObjectNodeWidget::minimumSize
QSizeF minimumSize() const
Definition: objectnodewidget.cpp:127
i18n
#define i18n
Definition: main.cpp:39
ObjectNodeWidget::m_objectNodeType
ObjectNodeType m_objectNodeType
type of object node
Definition: objectnodewidget.h:79
ObjectNodeWidget::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: objectnodewidget.cpp:229
ObjectNodeWidget::toObjectNodeType
static ObjectNodeType toObjectNodeType(const QString &type)
Definition: objectnodewidget.cpp:179
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
WidgetBase::useFillColor
bool useFillColor()
Definition: widgetbase.cpp:419
OBJECTNODE_WIDTH
#define OBJECTNODE_WIDTH
Definition: objectnodewidget.cpp:33
ObjectNodeDialog
Definition: objectnodedialog.h:32
UMLDoc::setModified
void setModified(bool modified=true)
Definition: umldoc.cpp:3125
ObjectNodeWidget::Normal
@ Normal
Definition: objectnodewidget.h:51
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:104
ObjectNodeWidget::~ObjectNodeWidget
virtual ~ObjectNodeWidget()
Definition: objectnodewidget.cpp:55
Uml
Definition: basictypes.cpp:36
ObjectNodeWidget::Flow
@ Flow
Definition: objectnodewidget.h:54
DocWindow::showDocumentation
void showDocumentation(UMLObject *object, bool overwrite=false)
Definition: docwindow.cpp:130
umlscene.h
ObjectNodeWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: objectnodewidget.cpp:257
uml.h
ObjectNodeWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: objectnodewidget.cpp:275
debug_utils.h
ObjectNodeWidget::slotOk
void slotOk()
Definition: objectnodewidget.cpp:356
UMLScene
Definition: umlscene.h:68
ListPopupMenu::typeFromAction
static MenuType typeFromAction(QAction *action)
Definition: listpopupmenu.cpp:407
ObjectNodeWidget::askStateForWidget
void askStateForWidget()
Definition: objectnodewidget.cpp:343
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition: umlwidget.cpp:1781
WidgetBase::m_Doc
QString m_Doc
Only used if m_umlObject is not set.
Definition: widgetbase.h:318
objectnodewidget.h
ListPopupMenu::mt_Rename
@ mt_Rename
Definition: listpopupmenu.h:183
UMLWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlwidget.cpp:2045
listpopupmenu.h
WidgetBase::setName
virtual void setName(const QString &strName)
Definition: widgetbase.cpp:322
dialog_utils.h
ObjectNodeWidget::objectNodeType
ObjectNodeType objectNodeType() const
Definition: objectnodewidget.cpp:171
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
UMLWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlwidget.cpp:2067
WidgetBase::m_Text
QString m_Text
Definition: widgetbase.h:319
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
UMLWidget::m_resizable
bool m_resizable
Definition: umlwidget.h:306