umbrello: umbrello/umlwidgets/objectnodewidget.h Source File

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

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

- File List
- File Members

objectnodewidget.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef OBJECTNODEWIDGET_H
7#define OBJECTNODEWIDGET_H
8
9#include "umlwidget.h"
10
23 class ObjectNodeWidget : public UMLWidget
24{
25 Q_OBJECT
26
27public:
28 enum ObjectNodeType
29 {
30 Normal,
31 Data,
32 Buffer,
33 Flow
34 };
35
36 explicit ObjectNodeWidget(UMLScene * scene, ObjectNodeType objectNodeType = Normal, Uml::ID::Type id = Uml::ID::None);
37 virtual ~ObjectNodeWidget();
38
39 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
40
41 ObjectNodeType objectNodeType() const;
42 static ObjectNodeType toObjectNodeType(const QString& type);
43
44 void setObjectNodeType(ObjectNodeType objectNodeType);
45 void setObjectNodeType(const QString& type) ;
46
47 void setState(const QString& state);
48 QString state() const;
49
50 virtual bool showPropertiesDialog();
51
52 void askStateForWidget();
53 void askForObjectNodeType(UMLWidget* &targetWidget);
54
55 virtual void saveToXMI(QXmlStreamWriter& writer);
56 virtual bool loadFromXMI(QDomElement& qElement);
57
58protected:
59 QSizeF minimumSize() const;
60
61public slots:
62 void slotMenuSelection(QAction* action);
63 void slotOk();
64
65private:
66 ObjectNodeType m_objectNodeType;
67 QString m_state;
68
69};
70
71#endif
ObjectNodeWidget
A graphical version of a UML Activity.
Definition: objectnodewidget.h:24
ObjectNodeWidget::askStateForWidget
void askStateForWidget()
Definition: objectnodewidget.cpp:327
ObjectNodeWidget::minimumSize
QSizeF minimumSize() const
Definition: objectnodewidget.cpp:111
ObjectNodeWidget::m_state
QString m_state
state of object node when it's an objectFlow
Definition: objectnodewidget.h:67
ObjectNodeWidget::askForObjectNodeType
void askForObjectNodeType(UMLWidget *&targetWidget)
Definition: objectnodewidget.cpp:288
ObjectNodeWidget::ObjectNodeType
ObjectNodeType
Definition: objectnodewidget.h:29
ObjectNodeWidget::Normal
@ Normal
Definition: objectnodewidget.h:30
ObjectNodeWidget::Data
@ Data
Definition: objectnodewidget.h:31
ObjectNodeWidget::Flow
@ Flow
Definition: objectnodewidget.h:33
ObjectNodeWidget::Buffer
@ Buffer
Definition: objectnodewidget.h:32
ObjectNodeWidget::loadFromXMI
virtual bool loadFromXMI(QDomElement &qElement)
Definition: objectnodewidget.cpp:273
ObjectNodeWidget::setState
void setState(const QString &state)
Definition: objectnodewidget.cpp:196
ObjectNodeWidget::objectNodeType
ObjectNodeType objectNodeType() const
Definition: objectnodewidget.cpp:155
ObjectNodeWidget::~ObjectNodeWidget
virtual ~ObjectNodeWidget()
Definition: objectnodewidget.cpp:52
ObjectNodeWidget::m_objectNodeType
ObjectNodeType m_objectNodeType
type of object node
Definition: objectnodewidget.h:66
ObjectNodeWidget::state
QString state() const
Definition: objectnodewidget.cpp:205
ObjectNodeWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: objectnodewidget.cpp:241
ObjectNodeWidget::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: objectnodewidget.cpp:259
ObjectNodeWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: objectnodewidget.cpp:59
ObjectNodeWidget::toObjectNodeType
static ObjectNodeType toObjectNodeType(const QString &type)
Definition: objectnodewidget.cpp:163
ObjectNodeWidget::slotOk
void slotOk()
Definition: objectnodewidget.cpp:340
ObjectNodeWidget::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: objectnodewidget.cpp:213
ObjectNodeWidget::setObjectNodeType
void setObjectNodeType(ObjectNodeType objectNodeType)
Definition: objectnodewidget.cpp:179
UMLScene
Definition: umlscene.h:65
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:373
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
umlwidget.h