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
WidgetBase::asObjectWidget
ObjectWidget * asObjectWidget()
Definition: widgetbase.cpp:1484
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
PreconditionWidget::minimumSize
QSizeF minimumSize() const
Definition: preconditionwidget.cpp:120
PreconditionWidget::PreconditionWidget
PreconditionWidget(UMLScene *scene, ObjectWidget *a, Uml::ID::Type id=Uml::ID::None)
Definition: preconditionwidget.cpp:43
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
WidgetBase::textColor
QColor textColor() const
Definition: widgetbase.cpp:335
ListPopupMenu::mt_Properties
@ mt_Properties
Definition: listpopupmenu.h:182
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
IDChangeLog::findNewID
Uml::ID::Type findNewID(Uml::ID::Type OldID)
Definition: idchangelog.cpp:62
Uml::ID::Reserved
const Type Reserved
special value for illegal ID
Definition: basictypes.h:354
WidgetBase::wt_Precondition
@ wt_Precondition
Definition: widgetbase.h:134
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:309
WidgetBase::setDocumentation
virtual void setDocumentation(const QString &doc)
Definition: widgetbase.cpp:294
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1392
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:217
WidgetBase::umlScene
UMLScene * umlScene() const
Definition: widgetbase.cpp:162
UMLWidget::m_ignoreSnapComponentSizeToGrid
bool m_ignoreSnapComponentSizeToGrid
Definition: umlwidget.h:318
WidgetBase::localID
Uml::ID::Type localID() const
Definition: widgetbase.cpp:238
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:353
PreconditionWidget::calculateWidget
void calculateWidget()
Definition: preconditionwidget.cpp:138
PreconditionWidget::resolveObjectWidget
void resolveObjectWidget(IDChangeLog *log)
Definition: preconditionwidget.cpp:177
PreconditionWidget::objectWidget
ObjectWidget * objectWidget() const
Definition: preconditionwidget.cpp:308
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
Dialog_Utils::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:151
UMLScene::resetPastePoint
void resetPastePoint()
Definition: umlscene.cpp:3402
PreconditionWidget::m_objectWidget
ObjectWidget * m_objectWidget
Definition: preconditionwidget.h:64
PreconditionWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: preconditionwidget.cpp:297
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
PreconditionWidget::m_nY
int m_nY
Definition: preconditionwidget.h:65
UMLWidget::m_nPosX
int m_nPosX
Definition: umlwidget.h:304
PreconditionWidget::setObjectWidget
void setObjectWidget(ObjectWidget *objectWidget)
Definition: preconditionwidget.cpp:313
PreconditionWidget::minY
int minY() const
Definition: preconditionwidget.cpp:232
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:1936
Uml::ID::fromString
ID::Type fromString(const QString &id)
Definition: basictypes.cpp:1268
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:543
ObjectWidget::getEndLineY
int getEndLineY()
Definition: objectwidget.cpp:548
UMLWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: umlwidget.cpp:1358
IDChangeLog
Definition: idchangelog.h:27
WidgetBase::fillColor
QColor fillColor() const
Definition: widgetbase.cpp:377
UMLWidget::sigWidgetMoved
void sigWidgetMoved(Uml::ID::Type id)
Definition: moc_umlwidget.cpp:176
UMLWidget::setX
virtual void setX(qreal x)
Definition: umlwidget.cpp:1685
PRECONDITION_HEIGHT
#define PRECONDITION_HEIGHT
Definition: preconditionwidget.cpp:34
uniqueid.h
PreconditionWidget::maxY
int maxY() const
Definition: preconditionwidget.cpp:245
UMLScene::selectedCount
int selectedCount(bool filterText=false) const
Definition: umlscene.cpp:2005
objectwidget.h
a
QString a
Definition: petalnode.cpp:18
UMLWidget::m_ignoreSnapToGrid
bool m_ignoreSnapToGrid
Definition: umlwidget.h:317
umlwidget.h
ListPopupMenu::MenuType
MenuType
< This type hosts all possible menu entry types
Definition: listpopupmenu.h:44
PreconditionWidget::~PreconditionWidget
virtual ~PreconditionWidget()
Definition: preconditionwidget.cpp:67
WidgetBase::documentation
QString documentation() const
Definition: widgetbase.cpp:269
PreconditionWidget::m_widgetAId
Uml::ID::Type m_widgetAId
Definition: preconditionwidget.h:67
WidgetBase::m_scene
UMLScene * m_scene
Definition: widgetbase.h:316
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
WidgetBase::useFillColor
bool useFillColor()
Definition: widgetbase.cpp:419
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:105
UMLScene::findWidget
UMLWidget * findWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1184
UMLWidget::setY
virtual void setY(qreal y)
Definition: umlwidget.cpp:1697
PRECONDITION_MARGIN
#define PRECONDITION_MARGIN
Definition: preconditionwidget.cpp:32
PreconditionWidget::slotWidgetMoved
void slotWidgetMoved(Uml::ID::Type id)
Definition: preconditionwidget.cpp:209
PreconditionWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: preconditionwidget.cpp:283
DEBUG
#define DEBUG(src)
Definition: debug_utils.h:129
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:33
umlscene.h
uml.h
UMLWidget::setSize
void setSize(qreal width, qreal height)
Definition: umlwidget.cpp:1745
PreconditionWidget::calculateDimensions
void calculateDimensions()
Definition: preconditionwidget.cpp:186
debug_utils.h
UMLScene
Definition: umlscene.h:69
ListPopupMenu::typeFromAction
static MenuType typeFromAction(QAction *action)
Definition: listpopupmenu.cpp:407
DBG_SRC
#define DBG_SRC
Definition: import_utils.cpp:43
preconditionwidget.h
PreconditionWidget::activate
bool activate(IDChangeLog *Log=0)
Definition: preconditionwidget.cpp:153
ListPopupMenu::mt_Rename
@ mt_Rename
Definition: listpopupmenu.h:183
PreconditionWidget
A graphical version of a UML Precondition (new in UML 2.0).
Definition: preconditionwidget.h:33
UMLWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlwidget.cpp:2045
listpopupmenu.h
idchangelog.h
WidgetBase::setName
virtual void setName(const QString &strName)
Definition: widgetbase.cpp:322
dialog_utils.h
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
UMLWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlwidget.cpp:2067
UMLWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: umlwidget.cpp:768
PreconditionWidget::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: preconditionwidget.cpp:74
UMLWidget::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition: umlwidget.cpp:1192
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1869
PRECONDITION_WIDTH
#define PRECONDITION_WIDTH
Definition: preconditionwidget.cpp:33
UMLWidget::m_resizable
bool m_resizable
Definition: umlwidget.h:306
PreconditionWidget::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: preconditionwidget.cpp:256