umbrello: umbrello/umlwidgets/umlwidget.h Source File

umbrello 2.32.0 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 * 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-2021 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLWIDGET_H
12 #define UMLWIDGET_H
13
14 #include "associationwidgetlist.h"
15 #include "basictypes.h"
16 #include "optionstate.h"
17 #include "umlobject.h"
18 #include "umlwidgetlist.h"
19 #include "widgetbase.h"
20 #include "diagramproxywidget.h"
21
22 #include <QCursor>
23 #include <QFont>
24
25 class IDChangeLog;
26 class UMLDoc;
27 class UMLObject;
28 class UMLScene;
29
30 class QPainter;
31 class QFontMetrics;
32
40 class UMLWidget : public WidgetBase, public DiagramProxyWidget
41 {
42 Q_OBJECT
43 public:
44
45 friend class ToolBarStateArrow; // for calling the mouse*Event handlers
46
47 static const QSizeF DefaultMinimumSize;
48 static const QSizeF DefaultMaximumSize;
49 static const int defaultMargin;
50 static const int selectionMarkerSize;
51 static const int resizeMarkerLineCount;
52
53 explicit UMLWidget(UMLScene *scene, WidgetType type = wt_UMLWidget, UMLObject *o = 0);
54 explicit UMLWidget(UMLScene *scene, WidgetType type = wt_UMLWidget, Uml::ID::Type id = Uml::ID::None);
55 virtual ~UMLWidget();
56
57 // Copy constructor - not implemented.
58 // UMLWidget(const UMLWidget& other);
59
60 UMLWidget& operator=(const UMLWidget& other);
61
62 bool operator==(const UMLWidget& other) const;
63
64 virtual QSizeF minimumSize() const;
65 void setMinimumSize(const QSizeF &size);
66
67 virtual QSizeF maximumSize();
68 void setMaximumSize(const QSizeF &size);
69
70 virtual void setUseFillColor(bool fc);
71 void setUseFillColorCmd(bool fc);
72
73 virtual void setTextColor(const QColor &color);
74 void setTextColorCmd(const QColor &color);
75
76 virtual void setLineColor(const QColor &color);
77 virtual void setLineColorCmd(const QColor &color);
78
79 virtual void setLineWidth(uint width);
80 void setLineWidthCmd(uint width);
81
82 virtual void setFillColor(const QColor &color);
83 void setFillColorCmd(const QColor &color);
84
85 void setSelectedFlag(bool _select);
86 virtual void setSelected(bool _select);
87
88 void setScene(UMLScene *scene);
89
90 virtual bool activate(IDChangeLog* changeLog = 0);
91
92 void setPenFromSettings(QPainter &p);
93 void setPenFromSettings(QPainter *p);
94
95 virtual void setFont(const QFont &font);
96 void setFontCmd(const QFont &font);
97
104 bool getStartMove() const {
105 return m_startMove;
106 }
107
108 virtual qreal getX() const;
109 virtual qreal getY() const;
110 virtual QPointF getPos() const;
111 virtual void setX(qreal x);
112 virtual void setY(qreal y);
113
117 qreal height() const {
118 return rect().height();
119 }
120
124 qreal width() const {
125 return rect().width();
126 }
127
128 void setSize(qreal width, qreal height);
129 void setSize(const QSizeF& size);
130
131 virtual void resizeWidget(qreal newW, qreal newH);
132 virtual void notifyParentResize();
133
134 bool getIgnoreSnapToGrid() const;
135 void setIgnoreSnapToGrid(bool to);
136
137 void moveByLocal(qreal dx, qreal dy);
138
139 virtual void removeAssoc(AssociationWidget* pAssoc);
140 virtual void addAssoc(AssociationWidget* pAssoc);
141
142 AssociationWidgetList &associationWidgetList() const;
143
147 bool isInstance() const {
148 return m_isInstance;
149 }
150
154 void setIsInstance(bool isInstance) {
155 m_isInstance = isInstance;
156 }
157
161 void setInstanceName(const QString &instanceName) {
162 m_instanceName = instanceName;
163 }
164
168 QString instanceName() const {
169 return m_instanceName;
170 }
171
172 Uml::ShowStereoType::Enum showStereotype() const;
173 virtual void setShowStereotype(Uml::ShowStereoType::Enum flag);
174 QString tags() const;
175
176 virtual bool showPropertiesDialog();
177
178 virtual void adjustAssocs(qreal dx, qreal dy);
179 virtual void adjustUnselectedAssocs(qreal dx, qreal dy);
180
181 bool isActivated() const;
182 void setActivated(bool active = true);
183
184 virtual void cleanup();
185
186 void updateGeometry(bool withAssocs = true);
187
188 void clipSize();
189
190 void forceUpdateFontMetrics(QPainter *painter);
191 void forceUpdateFontMetrics(QFont &font, QPainter *painter);
192
193 virtual bool loadFromXMI1(QDomElement &qElement);
194 virtual void saveToXMI1(QXmlStreamWriter& writer);
195
196 QPointF startMovePosition() const;
197 void setStartMovePosition(const QPointF &position);
198
199 QSizeF startResizeSize() const;
200
201 virtual QSizeF calculateSize(bool withExtensions = true) const;
202 void resize();
203
204 bool fixedAspectRatio() const {
205 return m_fixedAspectRatio;
206 }
207
208 void setFixedAspectRatio(bool state) {
209 m_fixedAspectRatio = state;
210 }
211
212 bool resizable() const {
213 return m_resizable;
214 }
215
216 void setResizable(bool state) {
217 m_resizable = state;
218 }
219
220 typedef enum {
221 FT_NORMAL = 0,
222 FT_BOLD = 1,
223 FT_ITALIC = 2,
224 FT_UNDERLINE = 3,
225 FT_BOLD_ITALIC = 4,
226 FT_BOLD_UNDERLINE = 5,
227 FT_ITALIC_UNDERLINE = 6,
228 FT_BOLD_ITALIC_UNDERLINE = 7,
229 FT_INVALID = 8
230 } FontType;
231
232 virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType);
233 virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType, QPainter &painter);
234
235 QFontMetrics &getFontMetrics(UMLWidget::FontType fontType) const;
236 void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm);
237 void setupFontType(QFont &font, UMLWidget::FontType fontType);
238
239 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
240
241 public Q_SLOTS:
242 virtual void updateWidget();
243 virtual void slotMenuSelection(QAction* action);
244 virtual void slotWidgetMoved(Uml::ID::Type id);
245 virtual void slotFillColorChanged(Uml::ID::Type viewID);
246 virtual void slotLineColorChanged(Uml::ID::Type viewID);
247 virtual void slotTextColorChanged(Uml::ID::Type viewID);
248 virtual void slotLineWidthChanged(Uml::ID::Type viewID);
249
250 void slotSnapToGrid();
251
252 signals:
257 void sigWidgetMoved(Uml::ID::Type id);
258
259 protected:
260 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
261 virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
262 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
263 virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
264 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
265
266 virtual void moveEvent(QGraphicsSceneMouseEvent *event);
267 virtual void moveWidgetBy(qreal diffX, qreal diffY);
268 virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY);
269 virtual void constrain(qreal& width, qreal& height);
270
271 virtual bool isInResizeArea(QGraphicsSceneMouseEvent *me);
272 virtual QCursor resizeCursor() const;
273
274 void selectSingle(QGraphicsSceneMouseEvent *me);
275 void selectMultiple(QGraphicsSceneMouseEvent *me);
276 void deselect(QGraphicsSceneMouseEvent *me);
277 // void resetSelection();
278
279 void setSelectionBounds();
280
281 void resize(QGraphicsSceneMouseEvent *me);
282
283 bool wasSizeChanged();
284 bool wasPositionChanged();
285
286 virtual void toForeground();
287
288 public:
289 enum AddWidgetOption { NoOption = 0, SetupSize = 1, SwitchDirection = 2, ShowProperties = 4, Default = SetupSize | ShowProperties };
290 Q_DECLARE_FLAGS(AddWidgetOptions, AddWidgetOption)
291
292 protected:
293 void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type = Uml::AssociationType::Association, AddWidgetOptions options = Default);
294 void addConnectedUMLObject(UMLObject::ObjectType otype, Uml::AssociationType::Enum type);
295 void addWidget(UMLWidget *widget, bool showProperties = true);
296
298
299 QString m_instanceName;
300 bool m_isInstance;
301 Uml::ShowStereoType::Enum m_showStereotype;
302
304
305 bool m_startMove;
306 QPointF m_startMovePostion;
307 QSizeF m_startResizeSize;
308 int m_nPosX;
309 UMLDoc *m_doc;
310 bool m_resizable;
311 QFontMetrics *m_pFontMetrics[FT_INVALID];
312 QSizeF m_minimumSize;
313 QSizeF m_maximumSize;
314
316 bool m_activated;
317
321 bool m_ignoreSnapToGrid;
322 bool m_ignoreSnapComponentSizeToGrid;
323 bool m_fixedAspectRatio;
324
326 QString m_oldStatusBarMsg;
327
330 QPointF m_pressOffset;
331
333 QPointF m_oldPos;
334
336 qreal m_oldW, m_oldH;
337
339 bool m_shiftPressed;
340
345 bool m_inMoveArea, m_inResizeArea;
346
352 bool m_moved, m_resized;
353
354 private:
355 void init();
356
358 mutable AssociationWidgetList m_Assocs;
359 };
360 Q_DECLARE_OPERATORS_FOR_FLAGS(UMLWidget::AddWidgetOptions)
361 #endif
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:19
basictypes.h
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
DiagramProxyWidget
Definition: diagramproxywidget.h:30
IDChangeLog
Definition: idchangelog.h:27
ToolBarStateArrow
Definition: toolbarstatearrow.h:31
UMLDoc
Definition: umldoc.h:75
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:81
UMLScene
Definition: umlscene.h:70
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
UMLWidget::setActivated
void setActivated(bool active=true)
Definition: umlwidget.cpp:1279
UMLWidget::DefaultMaximumSize
static const QSizeF DefaultMaximumSize
Definition: umlwidget.h:48
UMLWidget::moveByLocal
void moveByLocal(qreal dx, qreal dy)
Definition: umlwidget.cpp:1393
UMLWidget::setIsInstance
void setIsInstance(bool isInstance)
Definition: umlwidget.h:154
UMLWidget::setMaximumSize
void setMaximumSize(const QSizeF &size)
Definition: umlwidget.cpp:253
UMLWidget::resizeMarkerLineCount
static const int resizeMarkerLineCount
Definition: umlwidget.h:51
UMLWidget::mousePressEvent
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:366
UMLWidget::updateWidget
virtual void updateWidget()
Definition: umlwidget.cpp:662
UMLWidget::m_inResizeArea
bool m_inResizeArea
Definition: umlwidget.h:345
UMLWidget::setTextColor
virtual void setTextColor(const QColor &color)
Definition: umlwidget.cpp:1130
UMLWidget::minimumSize
virtual QSizeF minimumSize() const
Definition: umlwidget.cpp:221
UMLWidget::instanceName
QString instanceName() const
Definition: umlwidget.h:168
UMLWidget::isInstance
bool isInstance() const
Definition: umlwidget.h:147
UMLWidget::setUseFillColor
virtual void setUseFillColor(bool fc)
Definition: umlwidget.cpp:1100
UMLWidget::setLineColorCmd
virtual void setLineColorCmd(const QColor &color)
Definition: umlwidget.cpp:1141
UMLWidget::UMLWidget
UMLWidget(UMLScene *scene, WidgetType type=wt_UMLWidget, UMLObject *o=0)
Definition: umlwidget.cpp:91
UMLWidget::setY
virtual void setY(qreal y)
Definition: umlwidget.cpp:1743
UMLWidget::getStartMove
bool getStartMove() const
Definition: umlwidget.h:104
UMLWidget::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition: umlwidget.cpp:1205
UMLWidget::setFillColorCmd
void setFillColorCmd(const QColor &color)
Definition: umlwidget.cpp:1193
UMLWidget::m_Assocs
AssociationWidgetList m_Assocs
A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram.
Definition: umlwidget.h:358
UMLWidget::resizeCursor
virtual QCursor resizeCursor() const
Definition: umlwidget.cpp:1424
UMLWidget::m_oldH
qreal m_oldH
Definition: umlwidget.h:336
UMLWidget::startResizeSize
QSizeF startResizeSize() const
Definition: umlwidget.cpp:629
UMLWidget::setResizable
void setResizable(bool state)
Definition: umlwidget.h:216
UMLWidget::m_ignoreSnapComponentSizeToGrid
bool m_ignoreSnapComponentSizeToGrid
Definition: umlwidget.h:322
UMLWidget::mouseMoveEvent
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:465
UMLWidget::setupFontType
void setupFontType(QFont &font, UMLWidget::FontType fontType)
Definition: umlwidget.cpp:1868
UMLWidget::moveWidgetBy
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition: umlwidget.cpp:283
UMLWidget::init
void init()
Definition: umlwidget.cpp:711
UMLWidget::setSelected
virtual void setSelected(bool _select)
Definition: umlwidget.cpp:1586
UMLWidget::operator=
UMLWidget & operator=(const UMLWidget &other)
Definition: umlwidget.cpp:130
UMLWidget::clipSize
void clipSize()
Definition: umlwidget.cpp:1851
UMLWidget::m_startResizeSize
QSizeF m_startResizeSize
Definition: umlwidget.h:307
UMLWidget::isActivated
bool isActivated() const
Definition: umlwidget.cpp:1269
UMLWidget::tags
QString tags() const
Definition: umlwidget.cpp:2093
UMLWidget::setScene
void setScene(UMLScene *scene)
Definition: umlwidget.cpp:1679
UMLWidget::constrainMovementForAllWidgets
virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY)
Definition: umlwidget.cpp:306
UMLWidget::setIgnoreSnapToGrid
void setIgnoreSnapToGrid(bool to)
Definition: umlwidget.cpp:1773
UMLWidget::addConnectedUMLObject
void addConnectedUMLObject(UMLObject::ObjectType otype, Uml::AssociationType::Enum type)
UMLWidget::m_nPosX
int m_nPosX
Definition: umlwidget.h:308
UMLWidget::cleanup
virtual void cleanup()
Definition: umlwidget.cpp:1752
UMLWidget::getX
virtual qreal getX() const
Definition: umlwidget.cpp:1697
UMLWidget::width
qreal width() const
Definition: umlwidget.h:124
UMLWidget::setMinimumSize
void setMinimumSize(const QSizeF &size)
Definition: umlwidget.cpp:232
UMLWidget::m_oldPos
QPointF m_oldPos
The X/Y position the widget had when the movement started.
Definition: umlwidget.h:333
UMLWidget::associationWidgetList
AssociationWidgetList & associationWidgetList() const
Definition: umlwidget.cpp:1297
UMLWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: umlwidget.cpp:1371
UMLWidget::m_ignoreSnapToGrid
bool m_ignoreSnapToGrid
Definition: umlwidget.h:321
UMLWidget::addWidget
void addWidget(UMLWidget *widget, bool showProperties=true)
Definition: umlwidget.cpp:2234
UMLWidget::m_activated
bool m_activated
true if the activate function has been called for this class instance
Definition: umlwidget.h:316
UMLWidget::setLineWidth
virtual void setLineWidth(uint width)
Definition: umlwidget.cpp:1160
UMLWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: umlwidget.cpp:781
UMLWidget::wasPositionChanged
bool wasPositionChanged()
Definition: umlwidget.cpp:1564
UMLWidget::selectSingle
void selectSingle(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1631
UMLWidget::wasSizeChanged
bool wasSizeChanged()
Definition: umlwidget.cpp:1553
UMLWidget::setFixedAspectRatio
void setFixedAspectRatio(bool state)
Definition: umlwidget.h:208
UMLWidget::deselect
void deselect(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1657
UMLWidget::notifyParentResize
virtual void notifyParentResize()
Definition: umlwidget.cpp:654
UMLWidget::FontType
FontType
Definition: umlwidget.h:220
UMLWidget::FT_BOLD_UNDERLINE
@ FT_BOLD_UNDERLINE
Definition: umlwidget.h:226
UMLWidget::FT_BOLD
@ FT_BOLD
Definition: umlwidget.h:222
UMLWidget::FT_ITALIC_UNDERLINE
@ FT_ITALIC_UNDERLINE
Definition: umlwidget.h:227
UMLWidget::FT_INVALID
@ FT_INVALID
Definition: umlwidget.h:229
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:221
UMLWidget::FT_BOLD_ITALIC
@ FT_BOLD_ITALIC
Definition: umlwidget.h:225
UMLWidget::FT_BOLD_ITALIC_UNDERLINE
@ FT_BOLD_ITALIC_UNDERLINE
Definition: umlwidget.h:228
UMLWidget::FT_UNDERLINE
@ FT_UNDERLINE
Definition: umlwidget.h:224
UMLWidget::FT_ITALIC
@ FT_ITALIC
Definition: umlwidget.h:223
UMLWidget::addAssoc
virtual void addAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1287
UMLWidget::slotTextColorChanged
virtual void slotTextColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1051
UMLWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:598
UMLWidget::height
qreal height() const
Definition: umlwidget.h:117
UMLWidget::~UMLWidget
virtual ~UMLWidget()
Definition: umlwidget.cpp:122
UMLWidget::m_shiftPressed
bool m_shiftPressed
If shift or control button were pressed in mouse press event.
Definition: umlwidget.h:339
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1405
UMLWidget::setFillColor
virtual void setFillColor(const QColor &color)
Definition: umlwidget.cpp:1181
UMLWidget::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: umlwidget.cpp:261
UMLWidget::removeAssoc
virtual void removeAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1306
UMLWidget::defaultMargin
static const int defaultMargin
Definition: umlwidget.h:49
UMLWidget::slotLineColorChanged
virtual void slotLineColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1066
UMLWidget::startMovePosition
QPointF startMovePosition() const
Definition: umlwidget.cpp:611
UMLWidget::setInstanceName
void setInstanceName(const QString &instanceName)
Definition: umlwidget.h:161
UMLWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlwidget.cpp:2168
UMLWidget::setX
virtual void setX(qreal x)
Definition: umlwidget.cpp:1731
UMLWidget::m_inMoveArea
bool m_inMoveArea
Definition: umlwidget.h:345
UMLWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: umlwidget.cpp:2145
UMLWidget::m_fixedAspectRatio
bool m_fixedAspectRatio
Definition: umlwidget.h:323
UMLWidget::setDefaultFontMetrics
virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType)
Definition: umlwidget.cpp:1862
UMLWidget::m_isInstance
bool m_isInstance
holds whether this widget is a component instance (i.e. on a deployment diagram)
Definition: umlwidget.h:300
UMLWidget::m_maximumSize
QSizeF m_maximumSize
Definition: umlwidget.h:313
UMLWidget::isInResizeArea
virtual bool isInResizeArea(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1437
UMLWidget::setLineWidthCmd
void setLineWidthCmd(uint width)
Definition: umlwidget.cpp:1170
UMLWidget::addConnectedWidget
void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type=Uml::AssociationType::Association, AddWidgetOptions options=Default)
Definition: umlwidget.cpp:2197
UMLWidget::m_moved
bool m_moved
Definition: umlwidget.h:352
UMLWidget::toForeground
virtual void toForeground()
Definition: umlwidget.cpp:314
UMLWidget::maximumSize
virtual QSizeF maximumSize()
Definition: umlwidget.cpp:242
UMLWidget::setTextColorCmd
void setTextColorCmd(const QColor &color)
Definition: umlwidget.cpp:1121
UMLWidget::forceUpdateFontMetrics
void forceUpdateFontMetrics(QPainter *painter)
Definition: umlwidget.cpp:2041
UMLWidget::m_minimumSize
QSizeF m_minimumSize
Definition: umlwidget.h:312
UMLWidget::m_oldStatusBarMsg
QString m_oldStatusBarMsg
The text in the status bar when the cursor was pressed.
Definition: umlwidget.h:326
UMLWidget::m_resizable
bool m_resizable
Definition: umlwidget.h:310
UMLWidget::slotFillColorChanged
virtual void slotFillColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1031
UMLWidget::getIgnoreSnapToGrid
bool getIgnoreSnapToGrid() const
Definition: umlwidget.cpp:1781
UMLWidget::m_startMovePostion
QPointF m_startMovePostion
Definition: umlwidget.h:306
UMLWidget::setSelectionBounds
void setSelectionBounds()
Definition: umlwidget.cpp:1572
UMLWidget::resize
void resize()
Definition: umlwidget.cpp:1493
UMLWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1323
UMLWidget::m_instanceName
QString m_instanceName
instance name (used if on a deployment diagram)
Definition: umlwidget.h:299
UMLWidget::m_pFontMetrics
QFontMetrics * m_pFontMetrics[FT_INVALID]
Definition: umlwidget.h:311
UMLWidget::m_startMove
bool m_startMove
Definition: umlwidget.h:305
UMLWidget::m_doc
UMLDoc * m_doc
shortcut for UMLApp::app()->document()
Definition: umlwidget.h:309
UMLWidget::adjustUnselectedAssocs
virtual void adjustUnselectedAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1354
UMLWidget::fixedAspectRatio
bool fixedAspectRatio() const
Definition: umlwidget.h:204
UMLWidget::m_resized
bool m_resized
Definition: umlwidget.h:352
UMLWidget::getY
virtual qreal getY() const
Definition: umlwidget.cpp:1708
UMLWidget::DefaultMinimumSize
static const QSizeF DefaultMinimumSize
Definition: umlwidget.h:47
UMLWidget::m_oldW
qreal m_oldW
The width/height the widget had when the resize started.
Definition: umlwidget.h:336
UMLWidget::showStereotype
Uml::ShowStereoType::Enum showStereotype() const
Definition: umlwidget.cpp:2130
UMLWidget::slotSnapToGrid
void slotSnapToGrid()
Definition: umlwidget.cpp:1760
UMLWidget::slotWidgetMoved
virtual void slotWidgetMoved(Uml::ID::Type id)
Definition: umlwidget.cpp:1022
UMLWidget::selectionMarkerSize
static const int selectionMarkerSize
Definition: umlwidget.h:50
UMLWidget::setFont
virtual void setFont(const QFont &font)
Definition: umlwidget.cpp:2014
UMLWidget::moveEvent
virtual void moveEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:2140
UMLWidget::calculateSize
virtual QSizeF calculateSize(bool withExtensions=true) const
Definition: umlwidget.cpp:1465
UMLWidget::setStartMovePosition
void setStartMovePosition(const QPointF &position)
Definition: umlwidget.cpp:620
UMLWidget::setSize
void setSize(qreal width, qreal height)
Definition: umlwidget.cpp:1791
UMLWidget::selectMultiple
void selectMultiple(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1645
UMLWidget::resizable
bool resizable() const
Definition: umlwidget.h:212
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1915
UMLWidget::mouseReleaseEvent
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:546
UMLWidget::AddWidgetOption
AddWidgetOption
Definition: umlwidget.h:289
UMLWidget::Default
@ Default
Definition: umlwidget.h:289
UMLWidget::ShowProperties
@ ShowProperties
Definition: umlwidget.h:289
UMLWidget::NoOption
@ NoOption
Definition: umlwidget.h:289
UMLWidget::SwitchDirection
@ SwitchDirection
Definition: umlwidget.h:289
UMLWidget::SetupSize
@ SetupSize
Definition: umlwidget.h:289
UMLWidget::operator==
bool operator==(const UMLWidget &other) const
Definition: umlwidget.cpp:168
UMLWidget::m_showStereotype
Uml::ShowStereoType::Enum m_showStereotype
if and how the stereotype should be displayed
Definition: umlwidget.h:301
UMLWidget::setShowStereotype
virtual void setShowStereotype(Uml::ShowStereoType::Enum flag)
Definition: umlwidget.cpp:2077
UMLWidget::slotLineWidthChanged
virtual void slotLineWidthChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1083
UMLWidget::setSelectedFlag
void setSelectedFlag(bool _select)
Definition: umlwidget.cpp:1576
UMLWidget::setLineColor
virtual void setLineColor(const QColor &color)
Definition: umlwidget.cpp:1150
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition: umlwidget.cpp:1827
UMLWidget::m_pressOffset
QPointF m_pressOffset
Definition: umlwidget.h:330
UMLWidget::constrain
virtual void constrain(qreal &width, qreal &height)
Definition: umlwidget.cpp:688
UMLWidget::setFontMetrics
void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm)
Definition: umlwidget.cpp:2003
UMLWidget::setFontCmd
void setFontCmd(const QFont &font)
Definition: umlwidget.cpp:2029
UMLWidget::setUseFillColorCmd
void setUseFillColorCmd(bool fc)
Definition: umlwidget.cpp:1112
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:1995
UMLWidget::resizeWidget
virtual void resizeWidget(qreal newW, qreal newH)
Definition: umlwidget.cpp:645
UMLWidget::sigWidgetMoved
void sigWidgetMoved(Uml::ID::Type id)
UMLWidget::getPos
virtual QPointF getPos() const
Definition: umlwidget.cpp:1719
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:106
WidgetBase::rect
QRectF rect() const
Definition: widgetbase.cpp:840
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:555
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:112
WidgetBase::wt_UMLWidget
@ wt_UMLWidget
Definition: widgetbase.h:114
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
diagramproxywidget.h
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:106
Uml::AssociationType::Association
@ Association
Definition: basictypes.h:110
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:387
Uml::ID::Type
std::string Type
Definition: basictypes.h:385
Uml::ShowStereoType::Enum
Enum
Definition: basictypes.h:162
optionstate.h
umlobject.h
umlwidgetlist.h
widgetbase.h