umbrello: umbrello/umlwidgets/umlwidget.h Source File

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 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef 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 void setX(qreal x);
109 virtual void setY(qreal y);
110
114 qreal height() const {
115 return rect().height();
116 }
117
121 qreal width() const {
122 return rect().width();
123 }
124
125 void setSize(qreal width, qreal height);
126 void setSize(const QSizeF& size);
127
128 virtual void resizeWidget(qreal newW, qreal newH);
129 virtual void notifyParentResize();
130
131 bool getIgnoreSnapToGrid() const;
132 void setIgnoreSnapToGrid(bool to);
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 bool showStereotype() const;
170 virtual void setShowStereotype(bool flag);
171
172 virtual bool showPropertiesDialog();
173
174 virtual void adjustAssocs(qreal dx, qreal dy);
175 virtual void adjustUnselectedAssocs(qreal dx, qreal dy);
176
177 bool isActivated() const;
178 void setActivated(bool active = true);
179
180 virtual void cleanup();
181
182 void updateGeometry(bool withAssocs = true);
183
184 void clipSize();
185
186 void forceUpdateFontMetrics(QPainter *painter);
187 void forceUpdateFontMetrics(QFont &font, QPainter *painter);
188
189 virtual bool loadFromXMI1(QDomElement &qElement);
190 virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement);
191
192 QPointF startMovePosition() const;
193 void setStartMovePosition(const QPointF &position);
194
195 QSizeF startResizeSize() const;
196
197 virtual QSizeF calculateSize(bool withExtensions = true) const;
198 void resize();
199
200 bool fixedAspectRatio() const {
201 return m_fixedAspectRatio;
202 }
203
204 void setFixedAspectRatio(bool state) {
205 m_fixedAspectRatio = state;
206 }
207
208 bool resizable() const {
209 return m_resizable;
210 }
211
212 void setResizable(bool state) {
213 m_resizable = state;
214 }
215
216 typedef enum {
217 FT_NORMAL = 0,
218 FT_BOLD = 1,
219 FT_ITALIC = 2,
220 FT_UNDERLINE = 3,
221 FT_BOLD_ITALIC = 4,
222 FT_BOLD_UNDERLINE = 5,
223 FT_ITALIC_UNDERLINE = 6,
224 FT_BOLD_ITALIC_UNDERLINE = 7,
225 FT_INVALID = 8
226 } FontType;
227
228 virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType);
229 virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType, QPainter &painter);
230
231 QFontMetrics &getFontMetrics(UMLWidget::FontType fontType) const;
232 void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm);
233 void setupFontType(QFont &font, UMLWidget::FontType fontType);
234
235 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
236
237 public Q_SLOTS:
238 virtual void updateWidget();
239 virtual void slotMenuSelection(QAction* action);
240 virtual void slotWidgetMoved(Uml::ID::Type id);
241 virtual void slotFillColorChanged(Uml::ID::Type viewID);
242 virtual void slotLineColorChanged(Uml::ID::Type viewID);
243 virtual void slotTextColorChanged(Uml::ID::Type viewID);
244 virtual void slotLineWidthChanged(Uml::ID::Type viewID);
245
246 void slotSnapToGrid();
247
248 signals:
253 void sigWidgetMoved(Uml::ID::Type id);
254
255 protected:
256 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
257 virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
258 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
259 virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
260 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
261
262 virtual void moveEvent(QGraphicsSceneMouseEvent *event);
263 virtual void moveWidgetBy(qreal diffX, qreal diffY);
264 virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY);
265 virtual void constrain(qreal& width, qreal& height);
266
267 virtual bool isInResizeArea(QGraphicsSceneMouseEvent *me);
268 virtual QCursor resizeCursor() const;
269
270 void selectSingle(QGraphicsSceneMouseEvent *me);
271 void selectMultiple(QGraphicsSceneMouseEvent *me);
272 void deselect(QGraphicsSceneMouseEvent *me);
273 // void resetSelection();
274
275 void setSelectionBounds();
276
277 void resize(QGraphicsSceneMouseEvent *me);
278
279 bool wasSizeChanged();
280 bool wasPositionChanged();
281
282 virtual void toForeground();
283
284 public:
285 enum AddWidgetOption { NoOption = 0, SetupSize = 1, SwitchDirection = 2, ShowProperties = 4, Default = SetupSize | ShowProperties };
286 Q_DECLARE_FLAGS(AddWidgetOptions, AddWidgetOption)
287
288 protected:
289 void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type = Uml::AssociationType::Association, AddWidgetOptions options = Default);
290 void addConnectedUMLObject(UMLObject::ObjectType otype, Uml::AssociationType::Enum type);
291 void addWidget(UMLWidget *widget, bool showProperties = true);
292
294
295 QString m_instanceName;
296 bool m_isInstance;
297 bool m_showStereotype;
298
300
301 bool m_startMove;
302 QPointF m_startMovePostion;
303 QSizeF m_startResizeSize;
304 int m_nPosX;
305 UMLDoc *m_doc;
306 bool m_resizable;
307 QFontMetrics *m_pFontMetrics[FT_INVALID];
308 QSizeF m_minimumSize;
309 QSizeF m_maximumSize;
310
312 bool m_activated;
313
317 bool m_ignoreSnapToGrid;
318 bool m_ignoreSnapComponentSizeToGrid;
319 bool m_fixedAspectRatio;
320
322 QString m_oldStatusBarMsg;
323
326 QPointF m_pressOffset;
327
329 QPointF m_oldPos;
330
332 qreal m_oldW, m_oldH;
333
335 bool m_shiftPressed;
336
341 bool m_inMoveArea, m_inResizeArea;
342
348 bool m_moved, m_resized;
349
350 private:
351 void init();
352
354 mutable AssociationWidgetList m_Assocs;
355 };
356 Q_DECLARE_OPERATORS_FOR_FLAGS(UMLWidget::AddWidgetOptions)
357 #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:29
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:74
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:80
UMLScene
Definition: umlscene.h:69
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
UMLWidget::setActivated
void setActivated(bool active=true)
Definition: umlwidget.cpp:1266
UMLWidget::DefaultMaximumSize
static const QSizeF DefaultMaximumSize
Definition: umlwidget.h:48
UMLWidget::moveByLocal
void moveByLocal(qreal dx, qreal dy)
Definition: umlwidget.cpp:1380
UMLWidget::setIsInstance
void setIsInstance(bool isInstance)
Definition: umlwidget.h:151
UMLWidget::setMaximumSize
void setMaximumSize(const QSizeF &size)
Definition: umlwidget.cpp:251
UMLWidget::resizeMarkerLineCount
static const int resizeMarkerLineCount
Definition: umlwidget.h:51
UMLWidget::mousePressEvent
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:364
UMLWidget::updateWidget
virtual void updateWidget()
Definition: umlwidget.cpp:649
UMLWidget::m_inResizeArea
bool m_inResizeArea
Definition: umlwidget.h:341
UMLWidget::setTextColor
virtual void setTextColor(const QColor &color)
Definition: umlwidget.cpp:1117
UMLWidget::minimumSize
virtual QSizeF minimumSize() const
Definition: umlwidget.cpp:219
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:1087
UMLWidget::setLineColorCmd
virtual void setLineColorCmd(const QColor &color)
Definition: umlwidget.cpp:1128
UMLWidget::UMLWidget
UMLWidget(UMLScene *scene, WidgetType type=wt_UMLWidget, UMLObject *o=0)
Definition: umlwidget.cpp:89
UMLWidget::setY
virtual void setY(qreal y)
Definition: umlwidget.cpp:1697
UMLWidget::getStartMove
bool getStartMove() const
Definition: umlwidget.h:104
UMLWidget::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition: umlwidget.cpp:1192
UMLWidget::showStereotype
bool showStereotype() const
Definition: umlwidget.cpp:2030
UMLWidget::setFillColorCmd
void setFillColorCmd(const QColor &color)
Definition: umlwidget.cpp:1180
UMLWidget::m_Assocs
AssociationWidgetList m_Assocs
A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram.
Definition: umlwidget.h:354
UMLWidget::resizeCursor
virtual QCursor resizeCursor() const
Definition: umlwidget.cpp:1411
UMLWidget::m_oldH
qreal m_oldH
Definition: umlwidget.h:332
UMLWidget::startResizeSize
QSizeF startResizeSize() const
Definition: umlwidget.cpp:616
UMLWidget::setResizable
void setResizable(bool state)
Definition: umlwidget.h:212
UMLWidget::m_ignoreSnapComponentSizeToGrid
bool m_ignoreSnapComponentSizeToGrid
Definition: umlwidget.h:318
UMLWidget::mouseMoveEvent
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:454
UMLWidget::setupFontType
void setupFontType(QFont &font, UMLWidget::FontType fontType)
Definition: umlwidget.cpp:1822
UMLWidget::moveWidgetBy
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition: umlwidget.cpp:281
UMLWidget::init
void init()
Definition: umlwidget.cpp:698
UMLWidget::setSelected
virtual void setSelected(bool _select)
Definition: umlwidget.cpp:1573
UMLWidget::operator=
UMLWidget & operator=(const UMLWidget &other)
Definition: umlwidget.cpp:128
UMLWidget::clipSize
void clipSize()
Definition: umlwidget.cpp:1805
UMLWidget::m_startResizeSize
QSizeF m_startResizeSize
Definition: umlwidget.h:303
UMLWidget::isActivated
bool isActivated() const
Definition: umlwidget.cpp:1256
UMLWidget::setScene
void setScene(UMLScene *scene)
Definition: umlwidget.cpp:1666
UMLWidget::constrainMovementForAllWidgets
virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY)
Definition: umlwidget.cpp:304
UMLWidget::setIgnoreSnapToGrid
void setIgnoreSnapToGrid(bool to)
Definition: umlwidget.cpp:1727
UMLWidget::addConnectedUMLObject
void addConnectedUMLObject(UMLObject::ObjectType otype, Uml::AssociationType::Enum type)
UMLWidget::m_nPosX
int m_nPosX
Definition: umlwidget.h:304
UMLWidget::cleanup
virtual void cleanup()
Definition: umlwidget.cpp:1706
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
UMLWidget::setMinimumSize
void setMinimumSize(const QSizeF &size)
Definition: umlwidget.cpp:230
UMLWidget::m_oldPos
QPointF m_oldPos
The X/Y position the widget had when the movement started.
Definition: umlwidget.h:329
UMLWidget::associationWidgetList
AssociationWidgetList & associationWidgetList() const
Definition: umlwidget.cpp:1284
UMLWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: umlwidget.cpp:1358
UMLWidget::m_ignoreSnapToGrid
bool m_ignoreSnapToGrid
Definition: umlwidget.h:317
UMLWidget::addWidget
void addWidget(UMLWidget *widget, bool showProperties=true)
Definition: umlwidget.cpp:2133
UMLWidget::m_activated
bool m_activated
true if the activate function has been called for this class instance
Definition: umlwidget.h:312
UMLWidget::setLineWidth
virtual void setLineWidth(uint width)
Definition: umlwidget.cpp:1147
UMLWidget::slotMenuSelection
virtual void slotMenuSelection(QAction *action)
Definition: umlwidget.cpp:768
UMLWidget::wasPositionChanged
bool wasPositionChanged()
Definition: umlwidget.cpp:1551
UMLWidget::selectSingle
void selectSingle(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1618
UMLWidget::wasSizeChanged
bool wasSizeChanged()
Definition: umlwidget.cpp:1540
UMLWidget::setFixedAspectRatio
void setFixedAspectRatio(bool state)
Definition: umlwidget.h:204
UMLWidget::deselect
void deselect(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1644
UMLWidget::notifyParentResize
virtual void notifyParentResize()
Definition: umlwidget.cpp:641
UMLWidget::FontType
FontType
Definition: umlwidget.h:216
UMLWidget::FT_BOLD_UNDERLINE
@ FT_BOLD_UNDERLINE
Definition: umlwidget.h:222
UMLWidget::FT_BOLD
@ FT_BOLD
Definition: umlwidget.h:218
UMLWidget::FT_ITALIC_UNDERLINE
@ FT_ITALIC_UNDERLINE
Definition: umlwidget.h:223
UMLWidget::FT_INVALID
@ FT_INVALID
Definition: umlwidget.h:225
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:217
UMLWidget::FT_BOLD_ITALIC
@ FT_BOLD_ITALIC
Definition: umlwidget.h:221
UMLWidget::FT_BOLD_ITALIC_UNDERLINE
@ FT_BOLD_ITALIC_UNDERLINE
Definition: umlwidget.h:224
UMLWidget::FT_UNDERLINE
@ FT_UNDERLINE
Definition: umlwidget.h:220
UMLWidget::FT_ITALIC
@ FT_ITALIC
Definition: umlwidget.h:219
UMLWidget::addAssoc
virtual void addAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1274
UMLWidget::slotTextColorChanged
virtual void slotTextColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1038
UMLWidget::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:585
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
UMLWidget::~UMLWidget
virtual ~UMLWidget()
Definition: umlwidget.cpp:120
UMLWidget::m_shiftPressed
bool m_shiftPressed
If shift or control button were pressed in mouse press event.
Definition: umlwidget.h:335
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1392
UMLWidget::setShowStereotype
virtual void setShowStereotype(bool flag)
Definition: umlwidget.cpp:2018
UMLWidget::setFillColor
virtual void setFillColor(const QColor &color)
Definition: umlwidget.cpp:1168
UMLWidget::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: umlwidget.cpp:259
UMLWidget::removeAssoc
virtual void removeAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1293
UMLWidget::defaultMargin
static const int defaultMargin
Definition: umlwidget.h:49
UMLWidget::slotLineColorChanged
virtual void slotLineColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1053
UMLWidget::startMovePosition
QPointF startMovePosition() const
Definition: umlwidget.cpp:598
UMLWidget::setInstanceName
void setInstanceName(const QString &instanceName)
Definition: umlwidget.h:158
UMLWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlwidget.cpp:2067
UMLWidget::setX
virtual void setX(qreal x)
Definition: umlwidget.cpp:1685
UMLWidget::m_inMoveArea
bool m_inMoveArea
Definition: umlwidget.h:341
UMLWidget::m_fixedAspectRatio
bool m_fixedAspectRatio
Definition: umlwidget.h:319
UMLWidget::setDefaultFontMetrics
virtual void setDefaultFontMetrics(QFont &font, UMLWidget::FontType fontType)
Definition: umlwidget.cpp:1816
UMLWidget::m_isInstance
bool m_isInstance
holds whether this widget is a component instance (i.e. on a deployment diagram)
Definition: umlwidget.h:296
UMLWidget::m_maximumSize
QSizeF m_maximumSize
Definition: umlwidget.h:309
UMLWidget::isInResizeArea
virtual bool isInResizeArea(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1424
UMLWidget::setLineWidthCmd
void setLineWidthCmd(uint width)
Definition: umlwidget.cpp:1157
UMLWidget::addConnectedWidget
void addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type=Uml::AssociationType::Association, AddWidgetOptions options=Default)
Definition: umlwidget.cpp:2096
UMLWidget::m_moved
bool m_moved
Definition: umlwidget.h:348
UMLWidget::toForeground
virtual void toForeground()
Definition: umlwidget.cpp:312
UMLWidget::maximumSize
virtual QSizeF maximumSize()
Definition: umlwidget.cpp:240
UMLWidget::setTextColorCmd
void setTextColorCmd(const QColor &color)
Definition: umlwidget.cpp:1108
UMLWidget::forceUpdateFontMetrics
void forceUpdateFontMetrics(QPainter *painter)
Definition: umlwidget.cpp:1982
UMLWidget::m_minimumSize
QSizeF m_minimumSize
Definition: umlwidget.h:308
UMLWidget::m_oldStatusBarMsg
QString m_oldStatusBarMsg
The text in the status bar when the cursor was pressed.
Definition: umlwidget.h:322
UMLWidget::m_resizable
bool m_resizable
Definition: umlwidget.h:306
UMLWidget::slotFillColorChanged
virtual void slotFillColorChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1018
UMLWidget::getIgnoreSnapToGrid
bool getIgnoreSnapToGrid() const
Definition: umlwidget.cpp:1735
UMLWidget::m_startMovePostion
QPointF m_startMovePostion
Definition: umlwidget.h:302
UMLWidget::setSelectionBounds
void setSelectionBounds()
Definition: umlwidget.cpp:1559
UMLWidget::resize
void resize()
Definition: umlwidget.cpp:1480
UMLWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1310
UMLWidget::m_instanceName
QString m_instanceName
instance name (used if on a deployment diagram)
Definition: umlwidget.h:295
UMLWidget::m_pFontMetrics
QFontMetrics * m_pFontMetrics[FT_INVALID]
Definition: umlwidget.h:307
UMLWidget::m_startMove
bool m_startMove
Definition: umlwidget.h:301
UMLWidget::m_doc
UMLDoc * m_doc
shortcut for UMLApp::app()->getDocument()
Definition: umlwidget.h:305
UMLWidget::adjustUnselectedAssocs
virtual void adjustUnselectedAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1341
UMLWidget::fixedAspectRatio
bool fixedAspectRatio() const
Definition: umlwidget.h:200
UMLWidget::m_resized
bool m_resized
Definition: umlwidget.h:348
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:332
UMLWidget::slotSnapToGrid
void slotSnapToGrid()
Definition: umlwidget.cpp:1714
UMLWidget::slotWidgetMoved
virtual void slotWidgetMoved(Uml::ID::Type id)
Definition: umlwidget.cpp:1009
UMLWidget::selectionMarkerSize
static const int selectionMarkerSize
Definition: umlwidget.h:50
UMLWidget::setFont
virtual void setFont(const QFont &font)
Definition: umlwidget.cpp:1955
UMLWidget::moveEvent
virtual void moveEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:2040
UMLWidget::calculateSize
virtual QSizeF calculateSize(bool withExtensions=true) const
Definition: umlwidget.cpp:1452
UMLWidget::setStartMovePosition
void setStartMovePosition(const QPointF &position)
Definition: umlwidget.cpp:607
UMLWidget::setSize
void setSize(qreal width, qreal height)
Definition: umlwidget.cpp:1745
UMLWidget::selectMultiple
void selectMultiple(QGraphicsSceneMouseEvent *me)
Definition: umlwidget.cpp:1632
UMLWidget::resizable
bool resizable() const
Definition: umlwidget.h:208
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1869
UMLWidget::mouseReleaseEvent
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: umlwidget.cpp:534
UMLWidget::AddWidgetOption
AddWidgetOption
Definition: umlwidget.h:285
UMLWidget::Default
@ Default
Definition: umlwidget.h:285
UMLWidget::ShowProperties
@ ShowProperties
Definition: umlwidget.h:285
UMLWidget::NoOption
@ NoOption
Definition: umlwidget.h:285
UMLWidget::SwitchDirection
@ SwitchDirection
Definition: umlwidget.h:285
UMLWidget::SetupSize
@ SetupSize
Definition: umlwidget.h:285
UMLWidget::operator==
bool operator==(const UMLWidget &other) const
Definition: umlwidget.cpp:166
UMLWidget::m_showStereotype
bool m_showStereotype
should the stereotype be displayed
Definition: umlwidget.h:297
UMLWidget::slotLineWidthChanged
virtual void slotLineWidthChanged(Uml::ID::Type viewID)
Definition: umlwidget.cpp:1070
UMLWidget::setSelectedFlag
void setSelectedFlag(bool _select)
Definition: umlwidget.cpp:1563
UMLWidget::setLineColor
virtual void setLineColor(const QColor &color)
Definition: umlwidget.cpp:1137
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition: umlwidget.cpp:1781
UMLWidget::m_pressOffset
QPointF m_pressOffset
Definition: umlwidget.h:326
UMLWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlwidget.cpp:2045
UMLWidget::constrain
virtual void constrain(qreal &width, qreal &height)
Definition: umlwidget.cpp:675
UMLWidget::setFontMetrics
void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm)
Definition: umlwidget.cpp:1944
UMLWidget::setFontCmd
void setFontCmd(const QFont &font)
Definition: umlwidget.cpp:1970
UMLWidget::setUseFillColorCmd
void setUseFillColorCmd(bool fc)
Definition: umlwidget.cpp:1099
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:1936
UMLWidget::resizeWidget
virtual void resizeWidget(qreal newW, qreal newH)
Definition: umlwidget.cpp:632
UMLWidget::sigWidgetMoved
void sigWidgetMoved(Uml::ID::Type id)
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:105
WidgetBase::rect
QRectF rect() const
Definition: widgetbase.cpp:831
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:543
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:111
WidgetBase::wt_UMLWidget
@ wt_UMLWidget
Definition: widgetbase.h:113
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:353
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
optionstate.h
umlobject.h
umlwidgetlist.h
widgetbase.h