umbrello: umbrello/umlwidgets/preconditionwidget.h Source File

umbrello 2.32.3 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 * 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 PRECONDITIONWIDGET_H
12 #define PRECONDITIONWIDGET_H
13
14 #include "umlwidget.h"
15
16 class ObjectWidget;
17
32 class PreconditionWidget : public UMLWidget
33 {
34 Q_OBJECT
35 public:
36 PreconditionWidget(UMLScene* scene, ObjectWidget* a, Uml::ID::Type id = Uml::ID::None);
37 virtual ~PreconditionWidget();
38
39 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
40
41 int minY() const;
42 int maxY() const;
43
44 bool activate(IDChangeLog* Log = 0);
45 void resolveObjectWidget(IDChangeLog* log);
46
47 virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
48 virtual bool loadFromXMI1(QDomElement& qElement);
49
50 ObjectWidget *objectWidget() const;
51 void setObjectWidget(ObjectWidget *objectWidget);
52
53 public slots:
54 void slotMenuSelection(QAction* action);
55 void slotWidgetMoved(Uml::ID::Type id);
56
57 protected:
58 QSizeF minimumSize() const;
59
60 private:
61 void calculateWidget();
62 void calculateDimensions();
63
64 ObjectWidget* m_objectWidget;
65 int m_nY;
66
67 Uml::ID::Type m_widgetAId;
68 };
69
70 #endif
IDChangeLog
Definition: idchangelog.h:27
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:33
PreconditionWidget
A graphical version of a UML Precondition (new in UML 2.0).
Definition: preconditionwidget.h:33
PreconditionWidget::calculateWidget
void calculateWidget()
Definition: preconditionwidget.cpp:138
PreconditionWidget::maxY
int maxY() const
Definition: preconditionwidget.cpp:245
PreconditionWidget::objectWidget
ObjectWidget * objectWidget() const
Definition: preconditionwidget.cpp:308
PreconditionWidget::minimumSize
QSizeF minimumSize() const
Definition: preconditionwidget.cpp:120
PreconditionWidget::minY
int minY() const
Definition: preconditionwidget.cpp:232
PreconditionWidget::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: preconditionwidget.cpp:256
PreconditionWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: preconditionwidget.cpp:297
PreconditionWidget::setObjectWidget
void setObjectWidget(ObjectWidget *objectWidget)
Definition: preconditionwidget.cpp:313
PreconditionWidget::m_objectWidget
ObjectWidget * m_objectWidget
Definition: preconditionwidget.h:64
PreconditionWidget::PreconditionWidget
PreconditionWidget(UMLScene *scene, ObjectWidget *a, Uml::ID::Type id=Uml::ID::None)
Definition: preconditionwidget.cpp:43
PreconditionWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: preconditionwidget.cpp:283
PreconditionWidget::m_nY
int m_nY
Definition: preconditionwidget.h:65
PreconditionWidget::slotWidgetMoved
void slotWidgetMoved(Uml::ID::Type id)
Definition: preconditionwidget.cpp:209
PreconditionWidget::calculateDimensions
void calculateDimensions()
Definition: preconditionwidget.cpp:186
PreconditionWidget::~PreconditionWidget
virtual ~PreconditionWidget()
Definition: preconditionwidget.cpp:67
PreconditionWidget::activate
bool activate(IDChangeLog *Log=0)
Definition: preconditionwidget.cpp:153
PreconditionWidget::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: preconditionwidget.cpp:74
PreconditionWidget::resolveObjectWidget
void resolveObjectWidget(IDChangeLog *log)
Definition: preconditionwidget.cpp:177
PreconditionWidget::m_widgetAId
Uml::ID::Type m_widgetAId
Definition: preconditionwidget.h:67
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
a
QString a
Definition: petalnode.cpp:18
umlwidget.h