umbrello 26.07.70-c53146a 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

umlwidget.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 UMLWIDGET_H
7#define UMLWIDGET_H
8
9#include "associationwidgetlist.h"
10#include "basictypes.h"
11#include "optionstate.h"
12#include "umlobject.h"
13#include "umlwidgetlist.h"
14#include "widgetbase.h"
15#include "diagramproxywidget.h"
16
17#include <QCursor>
18#include <QFont>
19
20 class IDChangeLog;
21 class UMLDoc;
22 class UMLObject;
23 class UMLScene;
24
25 class QPainter;
26 class QFontMetrics;
27
35 class UMLWidget : public WidgetBase, public DiagramProxyWidget
36{
37 Q_OBJECT
38 public:
39
40 friend class ToolBarStateArrow; // for calling the mouse*Event handlers
41
42 static const QSizeF DefaultMinimumSize;
43 static const QSizeF DefaultMaximumSize;
44 static const int defaultMargin;
45 static const int selectionMarkerSize;
46 static const int resizeMarkerLineCount;
47
48 explicit UMLWidget(UMLScene *scene, WidgetType type = wt_UMLWidget, UMLObject *o = nullptr);
49 explicit UMLWidget(UMLScene *scene, WidgetType type = wt_UMLWidget, Uml::ID::Type id = Uml::ID::None);
50 virtual ~UMLWidget();
51
52 // Copy constructor - not implemented.
53 // UMLWidget(const UMLWidget& other);
54
55 UMLWidget& operator=(const UMLWidget& other);
56
57 bool operator==(const UMLWidget& other) const;
58
59 virtual QSizeF minimumSize() const;
60 void setMinimumSize(const QSizeF &size);
61
62 virtual QSizeF maximumSize();
63 void setMaximumSize(const QSizeF &size);
64
65 virtual void setUseFillColor(bool fc);
66 void setUseFillColorCmd(bool fc);
67
68 virtual void setTextColor(const QColor &color);
69 void setTextColorCmd(const QColor &color);
70
71 virtual void setLineColor(const QColor &color);
72 virtual void setLineColorCmd(const QColor &color);
73
74 virtual void setLineWidth(uint width);
75 void setLineWidthCmd(uint width);
76
77 virtual void setFillColor(const QColor &color);
78 void setFillColorCmd(const QColor &color);
79
80 void setSelectedFlag(bool _select);
81 virtual void setSelected(bool _select);
82
83 void setScene(UMLScene *scene);
84
85 virtual bool activate(IDChangeLog *changeLog = nullptr);
86
87 void setPenFromSettings(QPainter &p);
88 void setPenFromSettings(QPainter *p);
89
90 virtual void setFont(const QFont &font);
91 void setFontCmd(const QFont &font);
92
99 bool getStartMove() const {
100 return m_startMove;
101 }
102
103 virtual qreal getX() const;
104 virtual qreal getY() const;
105 virtual QPointF getPos() const;
106 virtual void setX(qreal x);
107 virtual void setY(qreal y);
108
112 qreal height() const {
113 return rect().height();
114 }
115
119 qreal width() const {
120 return rect().width();
121 }
122
123 void setSize(qreal width, qreal height);
124 void setSize(const QSizeF& size);
125
126 virtual void resizeWidget(qreal newW, qreal newH);
127 virtual void notifyParentResize();
128
129 bool getIgnoreSnapToGrid() const;
130 void setIgnoreSnapToGrid(bool to);
131
132 virtual bool isLocatedIn(const UMLWidget *other) const;
133
134 void moveByLocal(qreal dx, qreal dy);
135
136 virtual void removeAssoc(AssociationWidget* pAssoc);
137 virtual void addAssoc(AssociationWidget* pAssoc);
138
139 AssociationWidgetList &associationWidgetList() const;
140
144 bool isInstance() const {
145 return m_isInstance;
146 }
147
151 void setIsInstance(bool isInstance) {
152 m_isInstance = isInstance;
153 }
154
158 void setInstanceName(const QString &instanceName) {
159 m_instanceName = instanceName;
160 }
161
165 QString instanceName() const {
166 return m_instanceName;
167 }
168
169 Uml::ShowStereoType::Enum showStereotype() const;
170 virtual void setShowStereotype(Uml::ShowStereoType::Enum flag);
171 QString tags() const;
172
173 virtual bool showPropertiesDialog();
174
175 virtual void adjustAssocs(qreal dx, qreal dy);
176 virtual void adjustUnselectedAssocs(qreal dx, qreal dy);
177
178 bool isActivated() const;
179 void setActivated(bool active = true);
180
181 virtual void cleanup();
182
183 void updateGeometry(bool withAssocs = true);
184
185 void clipSize();
186
187 void forceUpdateFontMetrics(QPainter *painter);
188 void forceUpdateFontMetrics(QFont &font, QPainter *painter);
189
190 virtual bool loadFromXMI(QDomElement &qElement);
191 virtual void saveToXMI(QXmlStreamWriter& writer);
192
193 QPointF startMovePosition() const;
194 void setStartMovePosition(const QPointF &position);
195
196 QSizeF startResizeSize() const;
197
198 virtual QSizeF calculateSize(bool withExtensions = true) const;
199 void resize();
200
201 bool fixedAspectRatio() const {
202 return m_fixedAspectRatio;
203 }
204
205 void setFixedAspectRatio(bool state) {
206 m_fixedAspectRatio = state;
207 }
208
209 bool resizable() const {
210 return m_resizable;
211 }
212
213 void setResizable(bool state) {
214 m_resizable = state;
215 }
216
217 typedef enum {
218 FT_NORMAL = 0,
219 FT_BOLD = 1,
220 FT_ITALIC = 2,
221 FT_UNDERLINE = 3,
222 FT_BOLD_ITALIC = 4,
223 FT_BOLD_UNDERLINE = 5,
224 FT_ITALIC_UNDERLINE = 6,
225 FT_BOLD_ITALIC_UNDERLINE = 7,
226 FT_INVALID = 8
227 } FontType;
228
229 virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType);
230 virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType, QPainter &painter);
231
232 QFontMetrics &getFontMetrics(UMLWidget::FontType fontType) const;
233 void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm);
234 void setupFontType(QFont &font, UMLWidget::FontType fontType);
235
236 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
237
238 public Q_SLOTS:
239 virtual void updateWidget();
240 virtual void slotMenuSelection(QAction* action);
241 virtual void slotWidgetMoved(Uml::ID::Type id);
242 virtual void slotFillColorChanged(Uml::ID::Type viewID);
243 virtual void slotLineColorChanged(Uml::ID::Type viewID);
244 virtual void slotTextColorChanged(Uml::ID::Type viewID);
245 virtual void slotLineWidthChanged(Uml::ID::Type viewID);
246
247 void slotSnapToGrid();
248
249Q_SIGNALS:
254 void sigWidgetMoved(Uml::ID::Type id);
255
256 protected:
257 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
258 virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
259 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
260 virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
261 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
262
263 virtual void moveEvent(QGraphicsSceneMouseEvent *event);
264 virtual void moveWidgetBy(qreal diffX, qreal diffY);
265 virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY);
266 virtual void constrain(qreal& width, qreal& height);
267
268 virtual bool isInResizeArea(QGraphicsSceneMouseEvent *me);
269 virtual QCursor resizeCursor() const;
270
271 void selectSingle(QGraphicsSceneMouseEvent *me);
272 void selectMultiple(QGraphicsSceneMouseEvent *me);
273 void deselect(QGraphicsSceneMouseEvent *me);
274 // void resetSelection();
275
276 void setSelectionBounds();
277
278 void resize(QGraphicsSceneMouseEvent *me);
279
280 bool wasSizeChanged();
281 bool wasPositionChanged();
282
283 virtual void toForeground();
284
285 public:
286 enum AddWidgetOption { NoOption = 0, SetupSize = 1, SwitchDirection = 2, ShowProperties = 4, Default = SetupSize | ShowProperties };
287 Q_DECLARE_FLAGS(AddWidgetOptions, AddWidgetOption)
288
289 protected:
290 void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type = Uml::AssociationType::Association, AddWidgetOptions options = Default);
291 void addConnectedUMLObject(UMLObject::ObjectType otype, Uml::AssociationType::Enum type);
292 void addWidget(UMLWidget *widget, bool showProperties = true);
293
295
296 QString m_instanceName;
297 bool m_isInstance;
298 Uml::ShowStereoType::Enum m_showStereotype;
299
301
302 bool m_startMove;
303 QPointF m_startMovePostion;
304 QSizeF m_startResizeSize;
305 int m_nPosX;
306 UMLDoc *m_doc;
307 bool m_resizable;
308 QFontMetrics *m_pFontMetrics[FT_INVALID];
309 QSizeF m_minimumSize;
310 QSizeF m_maximumSize;
311
313 bool m_activated;
314
318 bool m_ignoreSnapToGrid;
319 bool m_ignoreSnapComponentSizeToGrid;
320 bool m_fixedAspectRatio;
321
323 QString m_oldStatusBarMsg;
324
327 QPointF m_pressOffset;
328
330 QPointF m_oldPos;
331
333 qreal m_oldW, m_oldH;
334
336 bool m_shiftPressed;
337
342 bool m_inMoveArea, m_inResizeArea;
343
349 bool m_moved, m_resized;
350
351 private:
352 void init();
353
355 mutable AssociationWidgetList m_Assocs;
356};
357Q_DECLARE_OPERATORS_FOR_FLAGS(UMLWidget::AddWidgetOptions)
358#endif
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:17
basictypes.h
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:47
DiagramProxyWidget
Definition: diagramproxywidget.h:25
IDChangeLog
Definition: idchangelog.h:22
ToolBarStateArrow
Definition: toolbarstatearrow.h:26
UMLDoc
Definition: umldoc.h:63
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:76
UMLScene
Definition: umlscene.h:66
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
UMLWidget::setActivated
void setActivated(bool active=true)
Definition: umlwidget.cpp:1287
UMLWidget::DefaultMaximumSize
static const QSizeF DefaultMaximumSize
Definition: umlwidget.h:43
UMLWidget::moveByLocal
void moveByLocal(qreal dx, qreal dy)
Definition: umlwidget.cpp:1403
UMLWidget::setIsInstance
void setIsInstance(bool isInstance)
Definition: umlwidget.h:151
UMLWidget::setMaximumSize
void setMaximumSize(const QSizeF &size)
Definition: umlwidget.cpp:248
UMLWidget::resizeMarkerLineCount
static const int resizeMarkerLineCount
Definition: umlwidget.h:46
UMLWidget::mousePressEvent
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:361
UMLWidget::updateWidget
virtual void updateWidget()
Definition: umlwidget.cpp:671
UMLWidget::m_inResizeArea
bool m_inResizeArea
Definition: umlwidget.h:342
UMLWidget::setTextColor
virtual void setTextColor(const QColor &color)
Definition: umlwidget.cpp:1141
UMLWidget::loadFromXMI
virtual bool loadFromXMI(QDomElement &qElement)
Definition: umlwidget.cpp:2254
UMLWidget::minimumSize
virtual QSizeF minimumSize() const
Definition: umlwidget.cpp:216
UMLWidget::instanceName
QString instanceName() const
Definition: umlwidget.h:165
UMLWidget::isInstance
bool isInstance() const
Definition: umlwidget.h:144
UMLWidget::setUseFillColor
virtual void setUseFillColor(bool fc)
Definition: umlwidget.cpp:1111
UMLWidget::setLineColorCmd
virtual void setLineColorCmd(const QColor &color)
Definition: umlwidget.cpp:1152
UMLWidget::setY
virtual void setY(qreal y)
Definition: umlwidget.cpp:1824
UMLWidget::getStartMove
bool getStartMove() const
Definition: umlwidget.h:99
UMLWidget::setFillColorCmd
void setFillColorCmd(const QColor &color)
Definition: umlwidget.cpp:1204
UMLWidget::m_Assocs
AssociationWidgetList m_Assocs
A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram.
Definition: umlwidget.h:355
UMLWidget::resizeCursor
virtual QCursor resizeCursor() const
Definition: umlwidget.cpp:1474
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr)
Definition: umlwidget.cpp:2002
UMLWidget::m_oldH
qreal m_oldH
Definition: umlwidget.h:333
UMLWidget::startResizeSize
QSizeF startResizeSize() const
Definition: umlwidget.cpp:638
UMLWidget::setResizable
void setResizable(bool state)
Definition: umlwidget.h:213
UMLWidget::m_ignoreSnapComponentSizeToGrid
bool m_ignoreSnapComponentSizeToGrid
Definition: umlwidget.h:319
UMLWidget::mouseMoveEvent
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:455
UMLWidget::setupFontType
void setupFontType(QFont &font, UMLWidget::FontType fontType)
Definition: umlwidget.cpp:1955
UMLWidget::moveWidgetBy
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition: umlwidget.cpp:278
UMLWidget::init
void init()
Definition: umlwidget.cpp:722
UMLWidget::setSelected
virtual void setSelected(bool _select)
Definition: umlwidget.cpp:1661
UMLWidget::operator=
UMLWidget & operator=(const UMLWidget &other)
Definition: umlwidget.cpp:125
UMLWidget::clipSize
void clipSize()
Definition: umlwidget.cpp:1938
UMLWidget::m_startResizeSize
QSizeF m_startResizeSize
Definition: umlwidget.h:304
UMLWidget::isActivated
bool isActivated() const
Definition: umlwidget.cpp:1277
UMLWidget::tags
QString tags() const
Definition: umlwidget.cpp:2180
UMLWidget::setScene
void setScene(UMLScene *scene)
Definition: umlwidget.cpp:1757
UMLWidget::constrainMovementForAllWidgets
virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY)
Definition: umlwidget.cpp:301
UMLWidget::setIgnoreSnapToGrid
void setIgnoreSnapToGrid(bool to)
Definition: umlwidget.cpp:1857
UMLWidget::addConnectedUMLObject
void addConnectedUMLObject(UMLObject::ObjectType otype, Uml::AssociationType::Enum type)
UMLWidget::m_nPosX
int m_nPosX
Definition: umlwidget.h:305
UMLWidget::cleanup
virtual void cleanup()
Definition: umlwidget.cpp:1836
UMLWidget::getX
virtual qreal getX() const
Definition: umlwidget.cpp:1775
UMLWidget::width
qreal width() const
Definition: umlwidget.h:119
UMLWidget::setMinimumSize
void setMinimumSize(const QSizeF &size)
Definition: umlwidget.cpp:227
UMLWidget::m_oldPos
QPointF m_oldPos
The X/Y position the widget had when the movement started.
Definition: umlwidget.h:330
UMLWidget::associationWidgetList
AssociationWidgetList & associationWidgetList() const
Definition: umlwidget.cpp:1305
UMLWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: umlwidget.cpp:1381
UMLWidget::m_ignoreSnapToGrid
bool m_ignoreSnapToGrid
Definition: umlwidget.h:318
UMLWidget::addWidget
void addWidget(UMLWidget *widget, bool showProperties=true)
Definition: umlwidget.cpp:2352
UMLWidget::isLocatedIn
virtual bool isLocatedIn(const UMLWidget *other) const
Definition: umlwidget.cpp:1431
UMLWidget::m_activated
bool m_activated
true if the activate function has been called for this class instance
Definition: umlwidget.h:313
UMLWidget::setLineWidth
virtual void setLineWidth(uint width)
Definition: umlwidget.cpp:1171
UMLWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: umlwidget.cpp:792
UMLWidget::wasPositionChanged
bool wasPositionChanged()
Definition: umlwidget.cpp:1639
UMLWidget::selectSingle
void selectSingle(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1709
UMLWidget::wasSizeChanged
bool wasSizeChanged()
Definition: umlwidget.cpp:1628
UMLWidget::setFixedAspectRatio
void setFixedAspectRatio(bool state)
Definition: umlwidget.h:205
UMLWidget::deselect
void deselect(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1735
UMLWidget::notifyParentResize
virtual void notifyParentResize()
Definition: umlwidget.cpp:663
UMLWidget::FontType
FontType
Definition: umlwidget.h:217
UMLWidget::FT_BOLD_UNDERLINE
@ FT_BOLD_UNDERLINE
Definition: umlwidget.h:223
UMLWidget::FT_BOLD
@ FT_BOLD
Definition: umlwidget.h:219
UMLWidget::FT_ITALIC_UNDERLINE
@ FT_ITALIC_UNDERLINE
Definition: umlwidget.h:224
UMLWidget::FT_INVALID
@ FT_INVALID
Definition: umlwidget.h:226
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:218
UMLWidget::FT_BOLD_ITALIC
@ FT_BOLD_ITALIC
Definition: umlwidget.h:222
UMLWidget::FT_BOLD_ITALIC_UNDERLINE
@ FT_BOLD_ITALIC_UNDERLINE
Definition: umlwidget.h:225
UMLWidget::FT_UNDERLINE
@ FT_UNDERLINE
Definition: umlwidget.h:221
UMLWidget::FT_ITALIC
@ FT_ITALIC
Definition: umlwidget.h:220
UMLWidget::addAssoc
virtual void addAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1295
UMLWidget::slotTextColorChanged
virtual void slotTextColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1062
UMLWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:607
UMLWidget::height
qreal height() const
Definition: umlwidget.h:112
UMLWidget::~UMLWidget
virtual ~UMLWidget()
Definition: umlwidget.cpp:117
UMLWidget::m_shiftPressed
bool m_shiftPressed
If shift or control button were pressed in mouse press event.
Definition: umlwidget.h:336
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1415
UMLWidget::setFillColor
virtual void setFillColor(const QColor &color)
Definition: umlwidget.cpp:1192
UMLWidget::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: umlwidget.cpp:256
UMLWidget::removeAssoc
virtual void removeAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1314
UMLWidget::defaultMargin
static const int defaultMargin
Definition: umlwidget.h:44
UMLWidget::slotLineColorChanged
virtual void slotLineColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1077
UMLWidget::startMovePosition
QPointF startMovePosition() const
Definition: umlwidget.cpp:620
UMLWidget::setInstanceName
void setInstanceName(const QString &instanceName)
Definition: umlwidget.h:158
UMLWidget::setX
virtual void setX(qreal x)
Definition: umlwidget.cpp:1809
UMLWidget::m_inMoveArea
bool m_inMoveArea
Definition: umlwidget.h:342
UMLWidget::m_fixedAspectRatio
bool m_fixedAspectRatio
Definition: umlwidget.h:320
UMLWidget::setDefaultFontMetrics
virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType)
Definition: umlwidget.cpp:1949
UMLWidget::m_isInstance
bool m_isInstance
holds whether this widget is a component instance (i.e. on a deployment diagram)
Definition: umlwidget.h:297
UMLWidget::m_maximumSize
QSizeF m_maximumSize
Definition: umlwidget.h:310
UMLWidget::isInResizeArea
virtual bool isInResizeArea(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1487
UMLWidget::setLineWidthCmd
void setLineWidthCmd(uint width)
Definition: umlwidget.cpp:1181
UMLWidget::addConnectedWidget
void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type=Uml::AssociationType::Association, AddWidgetOptions options=Default)
Definition: umlwidget.cpp:2315
UMLWidget::m_moved
bool m_moved
Definition: umlwidget.h:349
UMLWidget::toForeground
virtual void toForeground()
Definition: umlwidget.cpp:309
UMLWidget::maximumSize
virtual QSizeF maximumSize()
Definition: umlwidget.cpp:237
UMLWidget::setTextColorCmd
void setTextColorCmd(const QColor &color)
Definition: umlwidget.cpp:1132
UMLWidget::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: umlwidget.cpp:2232
UMLWidget::forceUpdateFontMetrics
void forceUpdateFontMetrics(QPainter *painter)
Definition: umlwidget.cpp:2128
UMLWidget::m_minimumSize
QSizeF m_minimumSize
Definition: umlwidget.h:309
UMLWidget::m_oldStatusBarMsg
QString m_oldStatusBarMsg
The text in the status bar when the cursor was pressed.
Definition: umlwidget.h:323
UMLWidget::m_resizable
bool m_resizable
Definition: umlwidget.h:307
UMLWidget::slotFillColorChanged
virtual void slotFillColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1042
UMLWidget::getIgnoreSnapToGrid
bool getIgnoreSnapToGrid() const
Definition: umlwidget.cpp:1865
UMLWidget::m_startMovePostion
QPointF m_startMovePostion
Definition: umlwidget.h:303
UMLWidget::setSelectionBounds
void setSelectionBounds()
Definition: umlwidget.cpp:1647
UMLWidget::resize
void resize()
Definition: umlwidget.cpp:1543
UMLWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1331
UMLWidget::m_instanceName
QString m_instanceName
instance name (used if on a deployment diagram)
Definition: umlwidget.h:296
UMLWidget::m_pFontMetrics
QFontMetrics * m_pFontMetrics[FT_INVALID]
Definition: umlwidget.h:308
UMLWidget::m_startMove
bool m_startMove
Definition: umlwidget.h:302
UMLWidget::m_doc
UMLDoc * m_doc
shortcut for UMLApp::app()->document()
Definition: umlwidget.h:306
UMLWidget::adjustUnselectedAssocs
virtual void adjustUnselectedAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1362
UMLWidget::fixedAspectRatio
bool fixedAspectRatio() const
Definition: umlwidget.h:201
UMLWidget::m_resized
bool m_resized
Definition: umlwidget.h:349
UMLWidget::getY
virtual qreal getY() const
Definition: umlwidget.cpp:1786
UMLWidget::DefaultMinimumSize
static const QSizeF DefaultMinimumSize
Definition: umlwidget.h:42
UMLWidget::m_oldW
qreal m_oldW
The width/height the widget had when the resize started.
Definition: umlwidget.h:333
UMLWidget::activate
virtual bool activate(IDChangeLog *changeLog=nullptr)
Definition: umlwidget.cpp:1213
UMLWidget::showStereotype
Uml::ShowStereoType::Enum showStereotype() const
Definition: umlwidget.cpp:2217
UMLWidget::slotSnapToGrid
void slotSnapToGrid()
Definition: umlwidget.cpp:1844
UMLWidget::slotWidgetMoved
virtual void slotWidgetMoved(Uml::ID::Type id)
Definition: umlwidget.cpp:1033
UMLWidget::selectionMarkerSize
static const int selectionMarkerSize
Definition: umlwidget.h:45
UMLWidget::setFont
virtual void setFont(const QFont &font)
Definition: umlwidget.cpp:2101
UMLWidget::moveEvent
virtual void moveEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:2227
UMLWidget::calculateSize
virtual QSizeF calculateSize(bool withExtensions=true) const
Definition: umlwidget.cpp:1515
UMLWidget::setStartMovePosition
void setStartMovePosition(const QPointF &position)
Definition: umlwidget.cpp:629
UMLWidget::setSize
void setSize(qreal width, qreal height)
Definition: umlwidget.cpp:1875
UMLWidget::selectMultiple
void selectMultiple(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1723
UMLWidget::resizable
bool resizable() const
Definition: umlwidget.h:209
UMLWidget::mouseReleaseEvent
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:545
UMLWidget::AddWidgetOption
AddWidgetOption
Definition: umlwidget.h:286
UMLWidget::Default
@ Default
Definition: umlwidget.h:286
UMLWidget::ShowProperties
@ ShowProperties
Definition: umlwidget.h:286
UMLWidget::NoOption
@ NoOption
Definition: umlwidget.h:286
UMLWidget::SwitchDirection
@ SwitchDirection
Definition: umlwidget.h:286
UMLWidget::SetupSize
@ SetupSize
Definition: umlwidget.h:286
UMLWidget::operator==
bool operator==(const UMLWidget &other) const
Definition: umlwidget.cpp:163
UMLWidget::m_showStereotype
Uml::ShowStereoType::Enum m_showStereotype
if and how the stereotype should be displayed
Definition: umlwidget.h:298
UMLWidget::setShowStereotype
virtual void setShowStereotype(Uml::ShowStereoType::Enum flag)
Definition: umlwidget.cpp:2164
UMLWidget::slotLineWidthChanged
virtual void slotLineWidthChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1094
UMLWidget::setSelectedFlag
void setSelectedFlag(bool _select)
Definition: umlwidget.cpp:1651
UMLWidget::setLineColor
virtual void setLineColor(const QColor &color)
Definition: umlwidget.cpp:1161
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition: umlwidget.cpp:1912
UMLWidget::m_pressOffset
QPointF m_pressOffset
Definition: umlwidget.h:327
UMLWidget::constrain
virtual void constrain(qreal &width, qreal &height)
Definition: umlwidget.cpp:697
UMLWidget::setFontMetrics
void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm)
Definition: umlwidget.cpp:2090
UMLWidget::setFontCmd
void setFontCmd(const QFont &font)
Definition: umlwidget.cpp:2116
UMLWidget::setUseFillColorCmd
void setUseFillColorCmd(bool fc)
Definition: umlwidget.cpp:1123
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:2082
UMLWidget::resizeWidget
virtual void resizeWidget(qreal newW, qreal newH)
Definition: umlwidget.cpp:654
UMLWidget::sigWidgetMoved
void sigWidgetMoved(Uml::ID::Type id)
UMLWidget::getPos
virtual QPointF getPos() const
Definition: umlwidget.cpp:1797
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:101
WidgetBase::rect
QRectF rect() const
Definition: widgetbase.cpp:851
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:549
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:107
WidgetBase::wt_UMLWidget
@ wt_UMLWidget
Definition: widgetbase.h:109
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
diagramproxywidget.h
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:92
Uml::AssociationType::Association
@ Association
Definition: basictypes.h:96
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
Uml::ShowStereoType::Enum
Enum
Definition: basictypes.h:148
optionstate.h
umlobject.h
umlwidgetlist.h
widgetbase.h