umbrello: umbrello/umlwidgets/objectnodewidget.h Source File

umbrello 2.32.3 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
ObjectNodeWidget
A graphical version of a UML Activity.
Definition: objectnodewidget.h:29
ObjectNodeWidget::askStateForWidget
void askStateForWidget()
Definition: objectnodewidget.cpp:343
ObjectNodeWidget::minimumSize
QSizeF minimumSize() const
Definition: objectnodewidget.cpp:127
ObjectNodeWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: objectnodewidget.cpp:289
ObjectNodeWidget::m_state
QString m_state
state of object node when it's an objectFlow
Definition: objectnodewidget.h:72
ObjectNodeWidget::askForObjectNodeType
void askForObjectNodeType(UMLWidget *&targetWidget)
Definition: objectnodewidget.cpp:304
ObjectNodeWidget::ObjectNodeType
ObjectNodeType
Definition: objectnodewidget.h:34
ObjectNodeWidget::Normal
@ Normal
Definition: objectnodewidget.h:35
ObjectNodeWidget::Data
@ Data
Definition: objectnodewidget.h:36
ObjectNodeWidget::Flow
@ Flow
Definition: objectnodewidget.h:38
ObjectNodeWidget::Buffer
@ Buffer
Definition: objectnodewidget.h:37
ObjectNodeWidget::ObjectNodeWidget
ObjectNodeWidget(UMLScene *scene, ObjectNodeType objectNodeType=Normal, Uml::ID::Type id=Uml::ID::None)
Definition: objectnodewidget.cpp:45
ObjectNodeWidget::setState
void setState(const QString &state)
Definition: objectnodewidget.cpp:212
ObjectNodeWidget::objectNodeType
ObjectNodeType objectNodeType() const
Definition: objectnodewidget.cpp:171
ObjectNodeWidget::~ObjectNodeWidget
virtual ~ObjectNodeWidget()
Definition: objectnodewidget.cpp:55
ObjectNodeWidget::m_objectNodeType
ObjectNodeType m_objectNodeType
type of object node
Definition: objectnodewidget.h:71
ObjectNodeWidget::state
QString state() const
Definition: objectnodewidget.cpp:221
ObjectNodeWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: objectnodewidget.cpp:275
ObjectNodeWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: objectnodewidget.cpp:257
ObjectNodeWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: objectnodewidget.cpp:62
ObjectNodeWidget::toObjectNodeType
static ObjectNodeType toObjectNodeType(const QString &type)
Definition: objectnodewidget.cpp:179
ObjectNodeWidget::slotOk
void slotOk()
Definition: objectnodewidget.cpp:356
ObjectNodeWidget::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: objectnodewidget.cpp:229
ObjectNodeWidget::setObjectNodeType
void setObjectNodeType(ObjectNodeType objectNodeType)
Definition: objectnodewidget.cpp:195
UMLScene
Definition: umlscene.h:69
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
umlwidget.h