umbrello: umbrello/umlwidgets/preconditionwidget.h Source File

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

preconditionwidget.h
Go to the documentation of this file.
1 /*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4 */
5
6 #ifndef PRECONDITIONWIDGET_H
7 #define PRECONDITIONWIDGET_H
8
9 #include "umlwidget.h"
10
11 class ObjectWidget;
12
27 class PreconditionWidget : public UMLWidget
28 {
29 Q_OBJECT
30 public:
31 PreconditionWidget(UMLScene* scene, ObjectWidget* a, Uml::ID::Type id = Uml::ID::None);
32 virtual ~PreconditionWidget();
33
34 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
35
36 int minY() const;
37 int maxY() const;
38
39 bool activate(IDChangeLog* Log = 0);
40 void resolveObjectWidget(IDChangeLog* log);
41
42 virtual void saveToXMI1(QXmlStreamWriter& writer);
43 virtual bool loadFromXMI1(QDomElement& qElement);
44
45 ObjectWidget *objectWidget() const;
46 void setObjectWidget(ObjectWidget *objectWidget);
47
48 public slots:
49 void slotMenuSelection(QAction* action);
50 void slotWidgetMoved(Uml::ID::Type id);
51
52 protected:
53 QSizeF minimumSize() const;
54
55 private:
56 void calculateWidget();
57 void calculateDimensions();
58
59 ObjectWidget* m_objectWidget;
60 int m_nY;
61
62 Uml::ID::Type m_widgetAId;
63 };
64
65 #endif
IDChangeLog
Definition: idchangelog.h:22
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:28
PreconditionWidget
A graphical version of a UML Precondition (new in UML 2.0).
Definition: preconditionwidget.h:28
PreconditionWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: preconditionwidget.cpp:279
PreconditionWidget::calculateWidget
void calculateWidget()
Definition: preconditionwidget.cpp:134
PreconditionWidget::maxY
int maxY() const
Definition: preconditionwidget.cpp:241
PreconditionWidget::objectWidget
ObjectWidget * objectWidget() const
Definition: preconditionwidget.cpp:304
PreconditionWidget::minimumSize
QSizeF minimumSize() const
Definition: preconditionwidget.cpp:116
PreconditionWidget::minY
int minY() const
Definition: preconditionwidget.cpp:228
PreconditionWidget::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: preconditionwidget.cpp:252
PreconditionWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: preconditionwidget.cpp:293
PreconditionWidget::setObjectWidget
void setObjectWidget(ObjectWidget *objectWidget)
Definition: preconditionwidget.cpp:309
PreconditionWidget::m_objectWidget
ObjectWidget * m_objectWidget
Definition: preconditionwidget.h:59
PreconditionWidget::PreconditionWidget
PreconditionWidget(UMLScene *scene, ObjectWidget *a, Uml::ID::Type id=Uml::ID::None)
Definition: preconditionwidget.cpp:39
PreconditionWidget::m_nY
int m_nY
Definition: preconditionwidget.h:60
PreconditionWidget::slotWidgetMoved
void slotWidgetMoved(Uml::ID::Type id)
Definition: preconditionwidget.cpp:205
PreconditionWidget::calculateDimensions
void calculateDimensions()
Definition: preconditionwidget.cpp:182
PreconditionWidget::~PreconditionWidget
virtual ~PreconditionWidget()
Definition: preconditionwidget.cpp:63
PreconditionWidget::activate
bool activate(IDChangeLog *Log=0)
Definition: preconditionwidget.cpp:149
PreconditionWidget::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: preconditionwidget.cpp:70
PreconditionWidget::resolveObjectWidget
void resolveObjectWidget(IDChangeLog *log)
Definition: preconditionwidget.cpp:173
PreconditionWidget::m_widgetAId
Uml::ID::Type m_widgetAId
Definition: preconditionwidget.h:62
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
a
QString a
Definition: petalnode.cpp:13
umlwidget.h