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

- Main Page
- Related Pages
- Topics
- 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 = 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 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 = 0);
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
249signals:
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:65
UMLWidget
The base class for graphical UML objects.
Definition umlwidget.h:36
UMLWidget::setActivated
void setActivated(bool active=true)
Definition umlwidget.cpp:1270
UMLWidget::DefaultMaximumSize
static const QSizeF DefaultMaximumSize
Definition umlwidget.h:43
UMLWidget::moveByLocal
void moveByLocal(qreal dx, qreal dy)
Definition umlwidget.cpp:1386
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:654
UMLWidget::m_inResizeArea
bool m_inResizeArea
Definition umlwidget.h:342
UMLWidget::setTextColor
virtual void setTextColor(const QColor &color)
Definition umlwidget.cpp:1124
UMLWidget::loadFromXMI
virtual bool loadFromXMI(QDomElement &qElement)
Definition umlwidget.cpp:2210
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:1094
UMLWidget::setLineColorCmd
virtual void setLineColorCmd(const QColor &color)
Definition umlwidget.cpp:1135
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:1780
UMLWidget::getStartMove
bool getStartMove() const
Definition umlwidget.h:99
UMLWidget::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition umlwidget.cpp:1196
UMLWidget::setFillColorCmd
void setFillColorCmd(const QColor &color)
Definition umlwidget.cpp:1187
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:1457
UMLWidget::m_oldH
qreal m_oldH
Definition umlwidget.h:333
UMLWidget::startResizeSize
QSizeF startResizeSize() const
Definition umlwidget.cpp:621
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:1911
UMLWidget::moveWidgetBy
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition umlwidget.cpp:278
UMLWidget::init
void init()
Definition umlwidget.cpp:705
UMLWidget::setSelected
virtual void setSelected(bool _select)
Definition umlwidget.cpp:1617
UMLWidget::operator=
UMLWidget & operator=(const UMLWidget &other)
Definition umlwidget.cpp:125
UMLWidget::clipSize
void clipSize()
Definition umlwidget.cpp:1894
UMLWidget::m_startResizeSize
QSizeF m_startResizeSize
Definition umlwidget.h:304
UMLWidget::isActivated
bool isActivated() const
Definition umlwidget.cpp:1260
UMLWidget::tags
QString tags() const
Definition umlwidget.cpp:2136
UMLWidget::setScene
void setScene(UMLScene *scene)
Definition umlwidget.cpp:1713
UMLWidget::constrainMovementForAllWidgets
virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY)
Definition umlwidget.cpp:301
UMLWidget::setIgnoreSnapToGrid
void setIgnoreSnapToGrid(bool to)
Definition umlwidget.cpp:1813
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:1792
UMLWidget::getX
virtual qreal getX() const
Definition umlwidget.cpp:1731
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:1288
UMLWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition umlwidget.cpp:1364
UMLWidget::m_ignoreSnapToGrid
bool m_ignoreSnapToGrid
Definition umlwidget.h:318
UMLWidget::addWidget
void addWidget(UMLWidget *widget, bool showProperties=true)
Definition umlwidget.cpp:2308
UMLWidget::isLocatedIn
virtual bool isLocatedIn(const UMLWidget *other) const
Definition umlwidget.cpp:1414
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:1154
UMLWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition umlwidget.cpp:775
UMLWidget::wasPositionChanged
bool wasPositionChanged()
Definition umlwidget.cpp:1595
UMLWidget::selectSingle
void selectSingle(QGraphicsSceneMouseEvent *me)
Definition umlwidget.cpp:1665
UMLWidget::wasSizeChanged
bool wasSizeChanged()
Definition umlwidget.cpp:1584
UMLWidget::setFixedAspectRatio
void setFixedAspectRatio(bool state)
Definition umlwidget.h:205
UMLWidget::deselect
void deselect(QGraphicsSceneMouseEvent *me)
Definition umlwidget.cpp:1691
UMLWidget::notifyParentResize
virtual void notifyParentResize()
Definition umlwidget.cpp:646
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:1278
UMLWidget::slotTextColorChanged
virtual void slotTextColorChanged(Uml::ID::Type viewID)
Definition umlwidget.cpp:1045
UMLWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition umlwidget.cpp:590
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:1398
UMLWidget::setFillColor
virtual void setFillColor(const QColor &color)
Definition umlwidget.cpp:1175
UMLWidget::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition umlwidget.cpp:256
UMLWidget::removeAssoc
virtual void removeAssoc(AssociationWidget *pAssoc)
Definition umlwidget.cpp:1297
UMLWidget::defaultMargin
static const int defaultMargin
Definition umlwidget.h:44
UMLWidget::slotLineColorChanged
virtual void slotLineColorChanged(Uml::ID::Type viewID)
Definition umlwidget.cpp:1060
UMLWidget::startMovePosition
QPointF startMovePosition() const
Definition umlwidget.cpp:603
UMLWidget::setInstanceName
void setInstanceName(const QString &instanceName)
Definition umlwidget.h:158
UMLWidget::setX
virtual void setX(qreal x)
Definition umlwidget.cpp:1765
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:1905
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:1470
UMLWidget::setLineWidthCmd
void setLineWidthCmd(uint width)
Definition umlwidget.cpp:1164
UMLWidget::addConnectedWidget
void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type=Uml::AssociationType::Association, AddWidgetOptions options=Default)
Definition umlwidget.cpp:2271
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:1115
UMLWidget::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition umlwidget.cpp:2188
UMLWidget::forceUpdateFontMetrics
void forceUpdateFontMetrics(QPainter *painter)
Definition umlwidget.cpp:2084
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:1025
UMLWidget::getIgnoreSnapToGrid
bool getIgnoreSnapToGrid() const
Definition umlwidget.cpp:1821
UMLWidget::m_startMovePostion
QPointF m_startMovePostion
Definition umlwidget.h:303
UMLWidget::setSelectionBounds
void setSelectionBounds()
Definition umlwidget.cpp:1603
UMLWidget::resize
void resize()
Definition umlwidget.cpp:1526
UMLWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition umlwidget.cpp:1314
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:1345
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:1742
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::showStereotype
Uml::ShowStereoType::Enum showStereotype() const
Definition umlwidget.cpp:2173
UMLWidget::slotSnapToGrid
void slotSnapToGrid()
Definition umlwidget.cpp:1800
UMLWidget::slotWidgetMoved
virtual void slotWidgetMoved(Uml::ID::Type id)
Definition umlwidget.cpp:1016
UMLWidget::selectionMarkerSize
static const int selectionMarkerSize
Definition umlwidget.h:45
UMLWidget::setFont
virtual void setFont(const QFont &font)
Definition umlwidget.cpp:2057
UMLWidget::moveEvent
virtual void moveEvent(QGraphicsSceneMouseEvent *event)
Definition umlwidget.cpp:2183
UMLWidget::calculateSize
virtual QSizeF calculateSize(bool withExtensions=true) const
Definition umlwidget.cpp:1498
UMLWidget::setStartMovePosition
void setStartMovePosition(const QPointF &position)
Definition umlwidget.cpp:612
UMLWidget::setSize
void setSize(qreal width, qreal height)
Definition umlwidget.cpp:1831
UMLWidget::selectMultiple
void selectMultiple(QGraphicsSceneMouseEvent *me)
Definition umlwidget.cpp:1679
UMLWidget::resizable
bool resizable() const
Definition umlwidget.h:209
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition umlwidget.cpp:1958
UMLWidget::mouseReleaseEvent
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition umlwidget.cpp:534
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:2120
UMLWidget::slotLineWidthChanged
virtual void slotLineWidthChanged(Uml::ID::Type viewID)
Definition umlwidget.cpp:1077
UMLWidget::setSelectedFlag
void setSelectedFlag(bool _select)
Definition umlwidget.cpp:1607
UMLWidget::setLineColor
virtual void setLineColor(const QColor &color)
Definition umlwidget.cpp:1144
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition umlwidget.cpp:1868
UMLWidget::m_pressOffset
QPointF m_pressOffset
Definition umlwidget.h:327
UMLWidget::constrain
virtual void constrain(qreal &width, qreal &height)
Definition umlwidget.cpp:680
UMLWidget::setFontMetrics
void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm)
Definition umlwidget.cpp:2046
UMLWidget::setFontCmd
void setFontCmd(const QFont &font)
Definition umlwidget.cpp:2072
UMLWidget::setUseFillColorCmd
void setUseFillColorCmd(bool fc)
Definition umlwidget.cpp:1106
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition umlwidget.cpp:2038
UMLWidget::resizeWidget
virtual void resizeWidget(qreal newW, qreal newH)
Definition umlwidget.cpp:637
UMLWidget::sigWidgetMoved
void sigWidgetMoved(Uml::ID::Type id)
UMLWidget::getPos
virtual QPointF getPos() const
Definition umlwidget.cpp:1753
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition widgetbase.h:101
WidgetBase::rect
QRectF rect() const
Definition widgetbase.cpp:838
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