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

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 = 0);
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 = 0);
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 void moveByLocal(qreal dx, qreal dy);
133
134 virtual void removeAssoc(AssociationWidget* pAssoc);
135 virtual void addAssoc(AssociationWidget* pAssoc);
136
137 AssociationWidgetList &associationWidgetList() const;
138
142 bool isInstance() const {
143 return m_isInstance;
144 }
145
149 void setIsInstance(bool isInstance) {
150 m_isInstance = isInstance;
151 }
152
156 void setInstanceName(const QString &instanceName) {
157 m_instanceName = instanceName;
158 }
159
163 QString instanceName() const {
164 return m_instanceName;
165 }
166
167 Uml::ShowStereoType::Enum showStereotype() const;
168 virtual void setShowStereotype(Uml::ShowStereoType::Enum flag);
169 QString tags() const;
170
171 virtual bool showPropertiesDialog();
172
173 virtual void adjustAssocs(qreal dx, qreal dy);
174 virtual void adjustUnselectedAssocs(qreal dx, qreal dy);
175
176 bool isActivated() const;
177 void setActivated(bool active = true);
178
179 virtual void cleanup();
180
181 void updateGeometry(bool withAssocs = true);
182
183 void clipSize();
184
185 void forceUpdateFontMetrics(QPainter *painter);
186 void forceUpdateFontMetrics(QFont &font, QPainter *painter);
187
188 virtual bool loadFromXMI1(QDomElement &qElement);
189 virtual void saveToXMI1(QXmlStreamWriter& writer);
190
191 QPointF startMovePosition() const;
192 void setStartMovePosition(const QPointF &position);
193
194 QSizeF startResizeSize() const;
195
196 virtual QSizeF calculateSize(bool withExtensions = true) const;
197 void resize();
198
199 bool fixedAspectRatio() const {
200 return m_fixedAspectRatio;
201 }
202
203 void setFixedAspectRatio(bool state) {
204 m_fixedAspectRatio = state;
205 }
206
207 bool resizable() const {
208 return m_resizable;
209 }
210
211 void setResizable(bool state) {
212 m_resizable = state;
213 }
214
215 typedef enum {
216 FT_NORMAL = 0,
217 FT_BOLD = 1,
218 FT_ITALIC = 2,
219 FT_UNDERLINE = 3,
220 FT_BOLD_ITALIC = 4,
221 FT_BOLD_UNDERLINE = 5,
222 FT_ITALIC_UNDERLINE = 6,
223 FT_BOLD_ITALIC_UNDERLINE = 7,
224 FT_INVALID = 8
225 } FontType;
226
227 virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType);
228 virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType, QPainter &painter);
229
230 QFontMetrics &getFontMetrics(UMLWidget::FontType fontType) const;
231 void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm);
232 void setupFontType(QFont &font, UMLWidget::FontType fontType);
233
234 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
235
236 public Q_SLOTS:
237 virtual void updateWidget();
238 virtual void slotMenuSelection(QAction* action);
239 virtual void slotWidgetMoved(Uml::ID::Type id);
240 virtual void slotFillColorChanged(Uml::ID::Type viewID);
241 virtual void slotLineColorChanged(Uml::ID::Type viewID);
242 virtual void slotTextColorChanged(Uml::ID::Type viewID);
243 virtual void slotLineWidthChanged(Uml::ID::Type viewID);
244
245 void slotSnapToGrid();
246
247signals:
252 void sigWidgetMoved(Uml::ID::Type id);
253
254 protected:
255 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
256 virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
257 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
258 virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
259 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
260
261 virtual void moveEvent(QGraphicsSceneMouseEvent *event);
262 virtual void moveWidgetBy(qreal diffX, qreal diffY);
263 virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY);
264 virtual void constrain(qreal& width, qreal& height);
265
266 virtual bool isInResizeArea(QGraphicsSceneMouseEvent *me);
267 virtual QCursor resizeCursor() const;
268
269 void selectSingle(QGraphicsSceneMouseEvent *me);
270 void selectMultiple(QGraphicsSceneMouseEvent *me);
271 void deselect(QGraphicsSceneMouseEvent *me);
272 // void resetSelection();
273
274 void setSelectionBounds();
275
276 void resize(QGraphicsSceneMouseEvent *me);
277
278 bool wasSizeChanged();
279 bool wasPositionChanged();
280
281 virtual void toForeground();
282
283 public:
284 enum AddWidgetOption { NoOption = 0, SetupSize = 1, SwitchDirection = 2, ShowProperties = 4, Default = SetupSize | ShowProperties };
285 Q_DECLARE_FLAGS(AddWidgetOptions, AddWidgetOption)
286
287 protected:
288 void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type = Uml::AssociationType::Association, AddWidgetOptions options = Default);
289 void addConnectedUMLObject(UMLObject::ObjectType otype, Uml::AssociationType::Enum type);
290 void addWidget(UMLWidget *widget, bool showProperties = true);
291
293
294 QString m_instanceName;
295 bool m_isInstance;
296 Uml::ShowStereoType::Enum m_showStereotype;
297
299
300 bool m_startMove;
301 QPointF m_startMovePostion;
302 QSizeF m_startResizeSize;
303 int m_nPosX;
304 UMLDoc *m_doc;
305 bool m_resizable;
306 QFontMetrics *m_pFontMetrics[FT_INVALID];
307 QSizeF m_minimumSize;
308 QSizeF m_maximumSize;
309
311 bool m_activated;
312
316 bool m_ignoreSnapToGrid;
317 bool m_ignoreSnapComponentSizeToGrid;
318 bool m_fixedAspectRatio;
319
321 QString m_oldStatusBarMsg;
322
325 QPointF m_pressOffset;
326
328 QPointF m_oldPos;
329
331 qreal m_oldW, m_oldH;
332
334 bool m_shiftPressed;
335
340 bool m_inMoveArea, m_inResizeArea;
341
347 bool m_moved, m_resized;
348
349 private:
350 void init();
351
353 mutable AssociationWidgetList m_Assocs;
354};
355Q_DECLARE_OPERATORS_FOR_FLAGS(UMLWidget::AddWidgetOptions)
356#endif
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:15
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:70
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:76
UMLScene
Definition: umlscene.h:65
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
UMLWidget::setActivated
void setActivated(bool active=true)
Definition: umlwidget.cpp:1274
UMLWidget::DefaultMaximumSize
static const QSizeF DefaultMaximumSize
Definition: umlwidget.h:43
UMLWidget::moveByLocal
void moveByLocal(qreal dx, qreal dy)
Definition: umlwidget.cpp:1388
UMLWidget::setIsInstance
void setIsInstance(bool isInstance)
Definition: umlwidget.h:149
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:657
UMLWidget::m_inResizeArea
bool m_inResizeArea
Definition: umlwidget.h:340
UMLWidget::setTextColor
virtual void setTextColor(const QColor &color)
Definition: umlwidget.cpp:1125
UMLWidget::minimumSize
virtual QSizeF minimumSize() const
Definition: umlwidget.cpp:216
UMLWidget::instanceName
QString instanceName() const
Definition: umlwidget.h:163
UMLWidget::isInstance
bool isInstance() const
Definition: umlwidget.h:142
UMLWidget::setUseFillColor
virtual void setUseFillColor(bool fc)
Definition: umlwidget.cpp:1095
UMLWidget::setLineColorCmd
virtual void setLineColorCmd(const QColor &color)
Definition: umlwidget.cpp:1136
UMLWidget::UMLWidget
UMLWidget(UMLScene *scene, WidgetType type=wt_UMLWidget, UMLObject *o=0)
Definition: umlwidget.cpp:86
UMLWidget::setY
virtual void setY(qreal y)
Definition: umlwidget.cpp:1738
UMLWidget::getStartMove
bool getStartMove() const
Definition: umlwidget.h:99
UMLWidget::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition: umlwidget.cpp:1200
UMLWidget::setFillColorCmd
void setFillColorCmd(const QColor &color)
Definition: umlwidget.cpp:1188
UMLWidget::m_Assocs
AssociationWidgetList m_Assocs
A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram.
Definition: umlwidget.h:353
UMLWidget::resizeCursor
virtual QCursor resizeCursor() const
Definition: umlwidget.cpp:1419
UMLWidget::m_oldH
qreal m_oldH
Definition: umlwidget.h:331
UMLWidget::startResizeSize
QSizeF startResizeSize() const
Definition: umlwidget.cpp:624
UMLWidget::setResizable
void setResizable(bool state)
Definition: umlwidget.h:211
UMLWidget::m_ignoreSnapComponentSizeToGrid
bool m_ignoreSnapComponentSizeToGrid
Definition: umlwidget.h:317
UMLWidget::mouseMoveEvent
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:460
UMLWidget::setupFontType
void setupFontType(QFont &font, UMLWidget::FontType fontType)
Definition: umlwidget.cpp:1863
UMLWidget::moveWidgetBy
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition: umlwidget.cpp:278
UMLWidget::init
void init()
Definition: umlwidget.cpp:706
UMLWidget::setSelected
virtual void setSelected(bool _select)
Definition: umlwidget.cpp:1581
UMLWidget::operator=
UMLWidget & operator=(const UMLWidget &other)
Definition: umlwidget.cpp:125
UMLWidget::clipSize
void clipSize()
Definition: umlwidget.cpp:1846
UMLWidget::m_startResizeSize
QSizeF m_startResizeSize
Definition: umlwidget.h:302
UMLWidget::isActivated
bool isActivated() const
Definition: umlwidget.cpp:1264
UMLWidget::tags
QString tags() const
Definition: umlwidget.cpp:2088
UMLWidget::setScene
void setScene(UMLScene *scene)
Definition: umlwidget.cpp:1674
UMLWidget::constrainMovementForAllWidgets
virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY)
Definition: umlwidget.cpp:301
UMLWidget::setIgnoreSnapToGrid
void setIgnoreSnapToGrid(bool to)
Definition: umlwidget.cpp:1768
UMLWidget::addConnectedUMLObject
void addConnectedUMLObject(UMLObject::ObjectType otype, Uml::AssociationType::Enum type)
UMLWidget::m_nPosX
int m_nPosX
Definition: umlwidget.h:303
UMLWidget::cleanup
virtual void cleanup()
Definition: umlwidget.cpp:1747
UMLWidget::getX
virtual qreal getX() const
Definition: umlwidget.cpp:1692
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:328
UMLWidget::associationWidgetList
AssociationWidgetList & associationWidgetList() const
Definition: umlwidget.cpp:1292
UMLWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: umlwidget.cpp:1366
UMLWidget::m_ignoreSnapToGrid
bool m_ignoreSnapToGrid
Definition: umlwidget.h:316
UMLWidget::addWidget
void addWidget(UMLWidget *widget, bool showProperties=true)
Definition: umlwidget.cpp:2229
UMLWidget::m_activated
bool m_activated
true if the activate function has been called for this class instance
Definition: umlwidget.h:311
UMLWidget::setLineWidth
virtual void setLineWidth(uint width)
Definition: umlwidget.cpp:1155
UMLWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: umlwidget.cpp:776
UMLWidget::wasPositionChanged
bool wasPositionChanged()
Definition: umlwidget.cpp:1559
UMLWidget::selectSingle
void selectSingle(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1626
UMLWidget::wasSizeChanged
bool wasSizeChanged()
Definition: umlwidget.cpp:1548
UMLWidget::setFixedAspectRatio
void setFixedAspectRatio(bool state)
Definition: umlwidget.h:203
UMLWidget::deselect
void deselect(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1652
UMLWidget::notifyParentResize
virtual void notifyParentResize()
Definition: umlwidget.cpp:649
UMLWidget::FontType
FontType
Definition: umlwidget.h:215
UMLWidget::FT_BOLD_UNDERLINE
@ FT_BOLD_UNDERLINE
Definition: umlwidget.h:221
UMLWidget::FT_BOLD
@ FT_BOLD
Definition: umlwidget.h:217
UMLWidget::FT_ITALIC_UNDERLINE
@ FT_ITALIC_UNDERLINE
Definition: umlwidget.h:222
UMLWidget::FT_INVALID
@ FT_INVALID
Definition: umlwidget.h:224
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:216
UMLWidget::FT_BOLD_ITALIC
@ FT_BOLD_ITALIC
Definition: umlwidget.h:220
UMLWidget::FT_BOLD_ITALIC_UNDERLINE
@ FT_BOLD_ITALIC_UNDERLINE
Definition: umlwidget.h:223
UMLWidget::FT_UNDERLINE
@ FT_UNDERLINE
Definition: umlwidget.h:219
UMLWidget::FT_ITALIC
@ FT_ITALIC
Definition: umlwidget.h:218
UMLWidget::addAssoc
virtual void addAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1282
UMLWidget::slotTextColorChanged
virtual void slotTextColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1046
UMLWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:593
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:334
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1400
UMLWidget::setFillColor
virtual void setFillColor(const QColor &color)
Definition: umlwidget.cpp:1176
UMLWidget::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: umlwidget.cpp:256
UMLWidget::removeAssoc
virtual void removeAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1301
UMLWidget::defaultMargin
static const int defaultMargin
Definition: umlwidget.h:44
UMLWidget::slotLineColorChanged
virtual void slotLineColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1061
UMLWidget::startMovePosition
QPointF startMovePosition() const
Definition: umlwidget.cpp:606
UMLWidget::setInstanceName
void setInstanceName(const QString &instanceName)
Definition: umlwidget.h:156
UMLWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlwidget.cpp:2163
UMLWidget::setX
virtual void setX(qreal x)
Definition: umlwidget.cpp:1726
UMLWidget::m_inMoveArea
bool m_inMoveArea
Definition: umlwidget.h:340
UMLWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: umlwidget.cpp:2140
UMLWidget::m_fixedAspectRatio
bool m_fixedAspectRatio
Definition: umlwidget.h:318
UMLWidget::setDefaultFontMetrics
virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType)
Definition: umlwidget.cpp:1857
UMLWidget::m_isInstance
bool m_isInstance
holds whether this widget is a component instance (i.e. on a deployment diagram)
Definition: umlwidget.h:295
UMLWidget::m_maximumSize
QSizeF m_maximumSize
Definition: umlwidget.h:308
UMLWidget::isInResizeArea
virtual bool isInResizeArea(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1432
UMLWidget::setLineWidthCmd
void setLineWidthCmd(uint width)
Definition: umlwidget.cpp:1165
UMLWidget::addConnectedWidget
void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type=Uml::AssociationType::Association, AddWidgetOptions options=Default)
Definition: umlwidget.cpp:2192
UMLWidget::m_moved
bool m_moved
Definition: umlwidget.h:347
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:1116
UMLWidget::forceUpdateFontMetrics
void forceUpdateFontMetrics(QPainter *painter)
Definition: umlwidget.cpp:2036
UMLWidget::m_minimumSize
QSizeF m_minimumSize
Definition: umlwidget.h:307
UMLWidget::m_oldStatusBarMsg
QString m_oldStatusBarMsg
The text in the status bar when the cursor was pressed.
Definition: umlwidget.h:321
UMLWidget::m_resizable
bool m_resizable
Definition: umlwidget.h:305
UMLWidget::slotFillColorChanged
virtual void slotFillColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1026
UMLWidget::getIgnoreSnapToGrid
bool getIgnoreSnapToGrid() const
Definition: umlwidget.cpp:1776
UMLWidget::m_startMovePostion
QPointF m_startMovePostion
Definition: umlwidget.h:301
UMLWidget::setSelectionBounds
void setSelectionBounds()
Definition: umlwidget.cpp:1567
UMLWidget::resize
void resize()
Definition: umlwidget.cpp:1488
UMLWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1318
UMLWidget::m_instanceName
QString m_instanceName
instance name (used if on a deployment diagram)
Definition: umlwidget.h:294
UMLWidget::m_pFontMetrics
QFontMetrics * m_pFontMetrics[FT_INVALID]
Definition: umlwidget.h:306
UMLWidget::m_startMove
bool m_startMove
Definition: umlwidget.h:300
UMLWidget::m_doc
UMLDoc * m_doc
shortcut for UMLApp::app()->document()
Definition: umlwidget.h:304
UMLWidget::adjustUnselectedAssocs
virtual void adjustUnselectedAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1349
UMLWidget::fixedAspectRatio
bool fixedAspectRatio() const
Definition: umlwidget.h:199
UMLWidget::m_resized
bool m_resized
Definition: umlwidget.h:347
UMLWidget::getY
virtual qreal getY() const
Definition: umlwidget.cpp:1703
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:331
UMLWidget::showStereotype
Uml::ShowStereoType::Enum showStereotype() const
Definition: umlwidget.cpp:2125
UMLWidget::slotSnapToGrid
void slotSnapToGrid()
Definition: umlwidget.cpp:1755
UMLWidget::slotWidgetMoved
virtual void slotWidgetMoved(Uml::ID::Type id)
Definition: umlwidget.cpp:1017
UMLWidget::selectionMarkerSize
static const int selectionMarkerSize
Definition: umlwidget.h:45
UMLWidget::setFont
virtual void setFont(const QFont &font)
Definition: umlwidget.cpp:2009
UMLWidget::moveEvent
virtual void moveEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:2135
UMLWidget::calculateSize
virtual QSizeF calculateSize(bool withExtensions=true) const
Definition: umlwidget.cpp:1460
UMLWidget::setStartMovePosition
void setStartMovePosition(const QPointF &position)
Definition: umlwidget.cpp:615
UMLWidget::setSize
void setSize(qreal width, qreal height)
Definition: umlwidget.cpp:1786
UMLWidget::selectMultiple
void selectMultiple(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1640
UMLWidget::resizable
bool resizable() const
Definition: umlwidget.h:207
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1910
UMLWidget::mouseReleaseEvent
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:541
UMLWidget::AddWidgetOption
AddWidgetOption
Definition: umlwidget.h:284
UMLWidget::Default
@ Default
Definition: umlwidget.h:284
UMLWidget::ShowProperties
@ ShowProperties
Definition: umlwidget.h:284
UMLWidget::NoOption
@ NoOption
Definition: umlwidget.h:284
UMLWidget::SwitchDirection
@ SwitchDirection
Definition: umlwidget.h:284
UMLWidget::SetupSize
@ SetupSize
Definition: umlwidget.h:284
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:296
UMLWidget::setShowStereotype
virtual void setShowStereotype(Uml::ShowStereoType::Enum flag)
Definition: umlwidget.cpp:2072
UMLWidget::slotLineWidthChanged
virtual void slotLineWidthChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1078
UMLWidget::setSelectedFlag
void setSelectedFlag(bool _select)
Definition: umlwidget.cpp:1571
UMLWidget::setLineColor
virtual void setLineColor(const QColor &color)
Definition: umlwidget.cpp:1145
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition: umlwidget.cpp:1822
UMLWidget::m_pressOffset
QPointF m_pressOffset
Definition: umlwidget.h:325
UMLWidget::constrain
virtual void constrain(qreal &width, qreal &height)
Definition: umlwidget.cpp:683
UMLWidget::setFontMetrics
void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm)
Definition: umlwidget.cpp:1998
UMLWidget::setFontCmd
void setFontCmd(const QFont &font)
Definition: umlwidget.cpp:2024
UMLWidget::setUseFillColorCmd
void setUseFillColorCmd(bool fc)
Definition: umlwidget.cpp:1107
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:1990
UMLWidget::resizeWidget
virtual void resizeWidget(qreal newW, qreal newH)
Definition: umlwidget.cpp:640
UMLWidget::sigWidgetMoved
void sigWidgetMoved(Uml::ID::Type id)
Definition: moc_umlwidget.cpp:176
UMLWidget::getPos
virtual QPointF getPos() const
Definition: umlwidget.cpp:1714
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:101
WidgetBase::rect
QRectF rect() const
Definition: widgetbase.cpp:835
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:550
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