umbrello: umbrello/umlwidgets/widgetbase.h Source File

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

widgetbase.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) 2004-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef WIDGETBASE_H
12 #define WIDGETBASE_H
13
14 #include "basictypes.h"
15 #include "icon_utils.h"
16
17 #include <QColor>
18 #include <QDomDocument>
19 #include <QFont>
20 #include <QGraphicsObject>
21 #include <QObject>
22 #include <QPainter>
23 #include <QPointer>
24 #include <QXmlStreamWriter>
25
26 // forward declarations
27 class QAction;
28 class ActivityWidget;
29 class ActorWidget;
30 class ArtifactWidget;
31 class AssociationWidget;
32 class BoxWidget;
33 class CategoryWidget;
34 class ClassifierWidget;
35 class CombinedFragmentWidget;
36 class ComponentWidget;
37 class DatatypeWidget;
38 class EntityWidget;
39 class EnumWidget;
40 class FloatingDashLineWidget;
41 class FloatingTextWidget;
42 class ForkJoinWidget;
43 class IDChangeLog;
44 class InterfaceWidget;
45 class MessageWidget;
46 class NodeWidget;
47 class NoteWidget;
48 class ObjectNodeWidget;
49 class ObjectWidget;
50 class PackageWidget;
51 class PinWidget;
52 class PortWidget;
53 class PinPortBase;
54 class PreconditionWidget;
55 class RegionWidget;
56 class SignalWidget;
57 class StateWidget;
58 //class TextWidget;
59 class UseCaseWidget;
60 class UMLDoc;
61 class UMLObject;
62 class UMLScene;
63 class UMLWidget; // required by function onWidget()
64
91 class QGraphicsObjectWrapper: public QGraphicsObject
92 {
93 public:
94 virtual void setSelected(bool state);
95 protected:
96 bool m_calledFromItemChange{false};
97 QVariant itemChange(GraphicsItemChange change, const QVariant &value);
98 };
99
105 class WidgetBase : public QGraphicsObjectWrapper
106 {
107 Q_OBJECT
108 Q_ENUMS(WidgetType)
109
110 public:
111 enum WidgetType
112 {
113 wt_Min = 299, // lower bounds check value
114 wt_UMLWidget, // does not have UMLObject representation
115 wt_Actor, // has UMLObject representation
116 wt_UseCase, // has UMLObject representation
117 wt_Class, // has UMLObject representation
118 wt_Interface, // has UMLObject representation
119 wt_Datatype, // has UMLObject representation
120 wt_Enum, // has UMLObject representation
121 wt_Entity, // has UMLObject representation
122 wt_Package, // has UMLObject representation
123 wt_Object, // has UMLObject representation
124 wt_Note, // does not have UMLObject representation
125 wt_Box, // does not have UMLObject representation
126 wt_Message, // does not have UMLObject representation
127 wt_Text, // does not have UMLObject representation
128 wt_State, // does not have UMLObject representation
129 wt_Activity, // does not have UMLObject representation
130 wt_Component, // has UMLObject representation
131 wt_Artifact, // has UMLObject representation
132 wt_Node, // has UMLObject representation
133 wt_Association, // has UMLObject representation
134 wt_ForkJoin, // does not have UMLObject representation
135 wt_Precondition, // does not have UMLObject representation
136 wt_CombinedFragment, // does not have UMLObject representation
137 wt_FloatingDashLine, // does not have UMLObject representation
138 wt_Signal, // does not have UMLObject representation
139 wt_Pin,
140 wt_ObjectNode,
141 wt_Region,
142 wt_Category, // has UMLObject representation
143 wt_Port, // has UMLObject representation
144 wt_Instance, // has UMLObject representation == wt_Object
145 wt_Max // upper bounds check value
146 };
147
148 static QString toString(WidgetType wt);
149 static QString toI18nString(WidgetType wt);
150 static Icon_Utils::IconType toIcon(WidgetType wt);
151
152 explicit WidgetBase(UMLScene * scene, WidgetType type= wt_UMLWidget, Uml::ID::Type id = Uml::ID::None);
153 virtual ~WidgetBase();
154
155 UMLObject* umlObject() const;
156 virtual void setUMLObject(UMLObject *obj);
157
158 Uml::ID::Type id() const;
159 void setID(Uml::ID::Type id);
160
161 void setLocalID(Uml::ID::Type id);
162 Uml::ID::Type localID() const;
163
164 virtual UMLWidget *widgetWithID(Uml::ID::Type id);
165
166 WidgetType baseType() const;
167 void setBaseType(const WidgetType& baseType);
168 QLatin1String baseTypeStr() const;
169 QString baseTypeStrWithoutPrefix() const;
170
171 virtual void setSelected(bool select);
172
173 UMLScene* umlScene() const;
174 UMLDoc* umlDoc() const;
175
176 QString documentation() const;
177 bool hasDocumentation();
178 virtual void setDocumentation(const QString& doc);
179
180 QString name() const;
181 virtual void setName(const QString &strName);
182
183 QColor lineColor() const;
184 virtual void setLineColor(const QColor& color);
185
186 uint lineWidth() const;
187 virtual void setLineWidth(uint width);
188
189 QColor textColor() const;
190 virtual void setTextColor(const QColor& color);
191
192 QColor fillColor() const;
193 virtual void setFillColor(const QColor& color);
194
195 bool usesDiagramLineColor() const;
196 void setUsesDiagramLineColor(bool state);
197
198 bool usesDiagramLineWidth() const;
199 void setUsesDiagramLineWidth(bool state);
200
201 bool useFillColor();
202 virtual void setUseFillColor(bool state);
203
204 bool usesDiagramTextColor() const;
205 void setUsesDiagramTextColor(bool state);
206
207 bool usesDiagramFillColor() const;
208 void setUsesDiagramFillColor(bool state);
209
210 bool usesDiagramUseFillColor() const;
211 void setUsesDiagramUseFillColor(bool state);
212
213 virtual QFont font() const;
214 virtual void setFont(const QFont& font);
215
216 bool autoResize();
217 void setAutoResize(bool state);
218
219 bool changesShape();
220 void setChangesShape(bool state);
221
222 virtual bool showPropertiesDialog();
223
224 virtual bool loadFromXMI1(QDomElement &qElement);
225 virtual void saveToXMI1(QXmlStreamWriter& writer);
226
227 virtual void removeAssoc(AssociationWidget* pAssoc);
228 virtual void addAssoc(AssociationWidget* pAssoc);
229
230 WidgetBase& operator=(const WidgetBase& other);
231
232 QRectF rect() const;
233 void setRect(const QRectF& rect);
234 void setRect(qreal x, qreal y, qreal width, qreal height);
235
236 virtual QRectF boundingRect() const;
237
238 virtual UMLWidget* onWidget(const QPointF &p);
239
240 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
241
242 bool isActivityWidget() { return baseType() == wt_Activity; }
243 bool isActorWidget() { return baseType() == wt_Actor; }
244 bool isArtifactWidget() { return baseType() == wt_Artifact; }
245 bool isAssociationWidget() { return baseType() == wt_Association; }
246 bool isBoxWidget() { return baseType() == wt_Box; }
247 bool isCategoryWidget() { return baseType() == wt_Category; }
248 bool isClassWidget() { return baseType() == wt_Class; }
249 bool isCombinedFragmentWidget() { return baseType() == wt_CombinedFragment; }
250 bool isComponentWidget() { return baseType() == wt_Component; }
251 bool isDatatypeWidget() { return baseType() == wt_Datatype; }
252 bool isEntityWidget() { return baseType() == wt_Entity; }
253 bool isEnumWidget() { return baseType() == wt_Enum; }
254 bool isFloatingDashLineWidget() { return baseType() == wt_FloatingDashLine; }
255 bool isForkJoinWidget() { return baseType() == wt_ForkJoin; }
256 bool isInterfaceWidget() { return baseType() == wt_Interface; }
257 bool isMessageWidget() { return baseType() == wt_Message; }
258 bool isNodeWidget() { return baseType() == wt_Node; }
259 bool isNoteWidget() { return baseType() == wt_Note; }
260 bool isObjectNodeWidget() { return baseType() == wt_ObjectNode; }
261 bool isObjectWidget() { return baseType() == wt_Object; }
262 bool isPackageWidget() { return baseType() == wt_Package; }
263 bool isPinWidget() { return baseType() == wt_Pin; }
264 bool isPortWidget() { return baseType() == wt_Port; }
265 bool isPreconditionWidget() { return baseType() == wt_Precondition; }
266 bool isRegionWidget() { return baseType() == wt_Region; }
267 bool isSignalWidget() { return baseType() == wt_Signal; }
268 bool isStateWidget() { return baseType() == wt_State; }
269 bool isTextWidget() { return baseType() == wt_Text; }
270 bool isUseCaseWidget() { return baseType() == wt_UseCase; }
271
272 ActivityWidget* asActivityWidget();
273 ActorWidget* asActorWidget();
274 ArtifactWidget* asArtifactWidget();
275 AssociationWidget* asAssociationWidget();
276 BoxWidget* asBoxWidget();
277 CategoryWidget* asCategoryWidget();
278 ClassifierWidget* asClassifierWidget();
279 CombinedFragmentWidget* asCombinedFragmentWidget();
280 ComponentWidget* asComponentWidget();
281 DatatypeWidget* asDatatypeWidget();
282 EntityWidget* asEntityWidget();
283 EnumWidget* asEnumWidget();
284 FloatingDashLineWidget* asFloatingDashLineWidget();
285 ForkJoinWidget* asForkJoinWidget();
286 InterfaceWidget* asInterfaceWidget();
287 MessageWidget* asMessageWidget();
288 NodeWidget* asNodeWidget();
289 NoteWidget* asNoteWidget();
290 ObjectNodeWidget* asObjectNodeWidget();
291 ObjectWidget* asObjectWidget();
292 PackageWidget* asPackageWidget();
293 PinWidget* asPinWidget();
294 PinPortBase* asPinPortBase();
295 PortWidget* asPortWidget();
296 PreconditionWidget* asPreconditionWidget();
297 RegionWidget* asRegionWidget();
298 SignalWidget* asSignalWidget();
299 StateWidget* asStateWidget();
300 FloatingTextWidget* asFloatingTextWidget();
301 // TextWidget* asTextWidget();
302 UseCaseWidget* asUseCaseWidget();
303 UMLWidget* asUMLWidget();
304
305 static bool widgetHasUMLObject(WidgetBase::WidgetType type);
306 virtual bool activate(IDChangeLog *changeLog = 0);
307
308 public Q_SLOTS:
309 virtual void slotMenuSelection(QAction *trigger);
310
311 protected:
312 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
313
314 private:
315 WidgetType m_baseType;
316 protected:
317 UMLScene *m_scene;
318 QPointer<UMLObject> m_umlObject;
319 QString m_Doc;
320 QString m_Text;
321 QRectF m_rect;
322
328 Uml::ID::Type m_nId;
329
333 Uml::ID::Type m_nLocalID;
334
335 QColor m_textColor;
336 QColor m_lineColor;
337 QColor m_fillColor;
338 QBrush m_brush;
339 QFont m_font;
340 uint m_lineWidth;
341 bool m_useFillColor;
342
348 bool m_usesDiagramFillColor;
349 bool m_usesDiagramLineColor;
350 bool m_usesDiagramLineWidth;
351 bool m_usesDiagramTextColor;
352 bool m_usesDiagramUseFillColor;
353 bool m_autoResize;
354 bool m_changesShape;
355 };
356
357 #endif
basictypes.h
ActivityWidget
A graphical version of a UML Activity.
Definition: activitywidget.h:34
ActorWidget
A graphical version of a UML Actor.
Definition: actorwidget.h:42
ArtifactWidget
A graphical version of an Artifact.
Definition: artifactwidget.h:31
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
BoxWidget
Displays a box.
Definition: boxwidget.h:28
CategoryWidget
A graphical version of a UMLCategory.
Definition: categorywidget.h:37
ClassifierWidget
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:33
CombinedFragmentWidget
A graphical version of a UML combined fragment.
Definition: combinedfragmentwidget.h:33
ComponentWidget
A graphical version of a Component.
Definition: componentwidget.h:30
DatatypeWidget
A graphical version of an datatype.
Definition: datatypewidget.h:30
EntityWidget
A graphical version of an entity.
Definition: entitywidget.h:30
EnumWidget
A graphical version of an enum.
Definition: enumwidget.h:28
FloatingDashLineWidget
A dash line for UML combined fragments.
Definition: floatingdashlinewidget.h:34
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:37
ForkJoinWidget
Displays a fork/join plate in a state diagram.
Definition: forkjoinwidget.h:26
IDChangeLog
Definition: idchangelog.h:27
InterfaceWidget
Definition: interfacewidget.h:25
MessageWidget
Displays a message.
Definition: messagewidget.h:41
NodeWidget
A graphical version of a Node.
Definition: nodewidget.h:28
NoteWidget
Displays a note box.
Definition: notewidget.h:31
ObjectNodeWidget
A graphical version of a UML Activity.
Definition: objectnodewidget.h:29
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:33
PackageWidget
A graphical version of a Package.
Definition: packagewidget.h:31
PinPortBase
Abstract base class for PinWidget and PortWidget.
Definition: pinportbase.h:28
PinWidget
A graphical version of a UML pin.
Definition: pinwidget.h:29
PortWidget
A graphical version of a port on a component.
Definition: portwidget.h:28
PreconditionWidget
A graphical version of a UML Precondition (new in UML 2.0).
Definition: preconditionwidget.h:33
QGraphicsObjectWrapper
Definition: widgetbase.h:92
QGraphicsObjectWrapper::itemChange
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Definition: widgetbase.cpp:57
QGraphicsObjectWrapper::m_calledFromItemChange
bool m_calledFromItemChange
Definition: widgetbase.h:96
QGraphicsObjectWrapper::setSelected
virtual void setSelected(bool state)
Definition: widgetbase.cpp:41
RegionWidget
Definition: regionwidget.h:20
SignalWidget
Definition: signalwidget.h:28
StateWidget
A graphical version of a UML State.
Definition: statewidget.h:39
UMLDoc
Definition: umldoc.h:75
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLScene
Definition: umlscene.h:70
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
UseCaseWidget
A graphical version of a UMLUseCase.
Definition: usecasewidget.h:43
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:106
WidgetBase::m_nId
Uml::ID::Type m_nId
Definition: widgetbase.h:328
WidgetBase::isPackageWidget
bool isPackageWidget()
Definition: widgetbase.h:262
WidgetBase::setUsesDiagramFillColor
void setUsesDiagramFillColor(bool state)
Definition: widgetbase.cpp:506
WidgetBase::asNoteWidget
NoteWidget * asNoteWidget()
Definition: widgetbase.cpp:1493
WidgetBase::isNoteWidget
bool isNoteWidget()
Definition: widgetbase.h:259
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:321
WidgetBase::m_scene
UMLScene * m_scene
Definition: widgetbase.h:317
WidgetBase::localID
Uml::ID::Type localID() const
Definition: widgetbase.cpp:250
WidgetBase::m_umlObject
QPointer< UMLObject > m_umlObject
Definition: widgetbase.h:318
WidgetBase::asActorWidget
ActorWidget * asActorWidget()
Definition: widgetbase.cpp:1477
WidgetBase::usesDiagramTextColor
bool usesDiagramTextColor() const
Definition: widgetbase.cpp:452
WidgetBase::isMessageWidget
bool isMessageWidget()
Definition: widgetbase.h:257
WidgetBase::m_useFillColor
bool m_useFillColor
flag indicates if the UMLWidget uses the Diagram FillColour
Definition: widgetbase.h:341
WidgetBase::toI18nString
static QString toI18nString(WidgetType wt)
Definition: widgetbase.cpp:1236
WidgetBase::~WidgetBase
virtual ~WidgetBase()
Definition: widgetbase.cpp:120
WidgetBase::asObjectWidget
ObjectWidget * asObjectWidget()
Definition: widgetbase.cpp:1495
WidgetBase::asPinWidget
PinWidget * asPinWidget()
Definition: widgetbase.cpp:1497
WidgetBase::boundingRect
virtual QRectF boundingRect() const
Definition: widgetbase.cpp:869
WidgetBase::isAssociationWidget
bool isAssociationWidget()
Definition: widgetbase.h:245
WidgetBase::isComponentWidget
bool isComponentWidget()
Definition: widgetbase.h:250
WidgetBase::asUMLWidget
UMLWidget * asUMLWidget()
Definition: widgetbase.cpp:1507
WidgetBase::asFloatingDashLineWidget
FloatingDashLineWidget * asFloatingDashLineWidget()
Definition: widgetbase.cpp:1488
WidgetBase::m_autoResize
bool m_autoResize
Definition: widgetbase.h:353
WidgetBase::addAssoc
virtual void addAssoc(AssociationWidget *pAssoc)
Definition: widgetbase.cpp:709
WidgetBase::setLineWidth
virtual void setLineWidth(uint width)
Definition: widgetbase.cpp:420
WidgetBase::baseTypeStr
QLatin1String baseTypeStr() const
Definition: widgetbase.cpp:145
WidgetBase::m_usesDiagramLineColor
bool m_usesDiagramLineColor
Definition: widgetbase.h:349
WidgetBase::slotMenuSelection
virtual void slotMenuSelection(QAction *trigger)
Definition: widgetbase.cpp:972
WidgetBase::isEntityWidget
bool isEntityWidget()
Definition: widgetbase.h:252
WidgetBase::isStateWidget
bool isStateWidget()
Definition: widgetbase.h:268
WidgetBase::isActivityWidget
bool isActivityWidget()
Definition: widgetbase.h:242
WidgetBase::m_Doc
QString m_Doc
Only used if m_umlObject is not set.
Definition: widgetbase.h:319
WidgetBase::removeAssoc
virtual void removeAssoc(AssociationWidget *pAssoc)
Definition: widgetbase.cpp:718
WidgetBase::isUseCaseWidget
bool isUseCaseWidget()
Definition: widgetbase.h:270
WidgetBase::autoResize
bool autoResize()
Definition: widgetbase.cpp:572
WidgetBase::asNodeWidget
NodeWidget * asNodeWidget()
Definition: widgetbase.cpp:1492
WidgetBase::asCombinedFragmentWidget
CombinedFragmentWidget * asCombinedFragmentWidget()
Definition: widgetbase.cpp:1483
WidgetBase::useFillColor
bool useFillColor()
Definition: widgetbase.cpp:431
WidgetBase::m_usesDiagramUseFillColor
bool m_usesDiagramUseFillColor
Definition: widgetbase.h:352
WidgetBase::baseTypeStrWithoutPrefix
QString baseTypeStrWithoutPrefix() const
Definition: widgetbase.cpp:154
WidgetBase::isObjectWidget
bool isObjectWidget()
Definition: widgetbase.h:261
WidgetBase::usesDiagramLineColor
bool usesDiagramLineColor() const
Definition: widgetbase.cpp:476
WidgetBase::asFloatingTextWidget
FloatingTextWidget * asFloatingTextWidget()
Definition: widgetbase.cpp:1504
WidgetBase::isActorWidget
bool isActorWidget()
Definition: widgetbase.h:243
WidgetBase::asPinPortBase
PinPortBase * asPinPortBase()
Definition: widgetbase.cpp:1498
WidgetBase::setUsesDiagramLineColor
void setUsesDiagramLineColor(bool state)
Definition: widgetbase.cpp:486
WidgetBase::m_rect
QRectF m_rect
widget size
Definition: widgetbase.h:321
WidgetBase::m_fillColor
QColor m_fillColor
color of the background of the widget
Definition: widgetbase.h:337
WidgetBase::asCategoryWidget
CategoryWidget * asCategoryWidget()
Definition: widgetbase.cpp:1481
WidgetBase::setRect
void setRect(const QRectF &rect)
Definition: widgetbase.cpp:848
WidgetBase::setAutoResize
void setAutoResize(bool state)
Definition: widgetbase.cpp:581
WidgetBase::isCombinedFragmentWidget
bool isCombinedFragmentWidget()
Definition: widgetbase.h:249
WidgetBase::asMessageWidget
MessageWidget * asMessageWidget()
Definition: widgetbase.cpp:1491
WidgetBase::asActivityWidget
ActivityWidget * asActivityWidget()
Definition: widgetbase.cpp:1476
WidgetBase::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: widgetbase.cpp:923
WidgetBase::asAssociationWidget
AssociationWidget * asAssociationWidget()
Definition: widgetbase.cpp:1479
WidgetBase::isFloatingDashLineWidget
bool isFloatingDashLineWidget()
Definition: widgetbase.h:254
WidgetBase::asInterfaceWidget
InterfaceWidget * asInterfaceWidget()
Definition: widgetbase.cpp:1490
WidgetBase::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: widgetbase.cpp:629
WidgetBase::textColor
QColor textColor() const
Definition: widgetbase.cpp:347
WidgetBase::setUsesDiagramLineWidth
void setUsesDiagramLineWidth(bool state)
Definition: widgetbase.cpp:546
WidgetBase::isRegionWidget
bool isRegionWidget()
Definition: widgetbase.h:266
WidgetBase::isObjectNodeWidget
bool isObjectNodeWidget()
Definition: widgetbase.h:260
WidgetBase::usesDiagramLineWidth
bool usesDiagramLineWidth() const
Definition: widgetbase.cpp:536
WidgetBase::setFillColor
virtual void setFillColor(const QColor &color)
Definition: widgetbase.cpp:399
WidgetBase::asPreconditionWidget
PreconditionWidget * asPreconditionWidget()
Definition: widgetbase.cpp:1500
WidgetBase::asEnumWidget
EnumWidget * asEnumWidget()
Definition: widgetbase.cpp:1487
WidgetBase::asForkJoinWidget
ForkJoinWidget * asForkJoinWidget()
Definition: widgetbase.cpp:1489
WidgetBase::asStateWidget
StateWidget * asStateWidget()
Definition: widgetbase.cpp:1503
WidgetBase::toString
static QString toString(WidgetType wt)
Definition: widgetbase.cpp:1226
WidgetBase::asBoxWidget
BoxWidget * asBoxWidget()
Definition: widgetbase.cpp:1480
WidgetBase::m_baseType
WidgetType m_baseType
Type of widget.
Definition: widgetbase.h:315
WidgetBase::isPortWidget
bool isPortWidget()
Definition: widgetbase.h:264
WidgetBase::rect
QRectF rect() const
Definition: widgetbase.cpp:840
WidgetBase::m_usesDiagramTextColor
bool m_usesDiagramTextColor
Definition: widgetbase.h:351
WidgetBase::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: widgetbase.cpp:735
WidgetBase::asPackageWidget
PackageWidget * asPackageWidget()
Definition: widgetbase.cpp:1496
WidgetBase::asComponentWidget
ComponentWidget * asComponentWidget()
Definition: widgetbase.cpp:1484
WidgetBase::WidgetBase
WidgetBase(UMLScene *scene, WidgetType type=wt_UMLWidget, Uml::ID::Type id=Uml::ID::None)
Definition: widgetbase.cpp:74
WidgetBase::setTextColor
virtual void setTextColor(const QColor &color)
Definition: widgetbase.cpp:357
WidgetBase::umlDoc
UMLDoc * umlDoc() const
Definition: widgetbase.cpp:184
WidgetBase::umlObject
UMLObject * umlObject() const
Definition: widgetbase.cpp:194
WidgetBase::asClassifierWidget
ClassifierWidget * asClassifierWidget()
Definition: widgetbase.cpp:1482
WidgetBase::isForkJoinWidget
bool isForkJoinWidget()
Definition: widgetbase.h:255
WidgetBase::isTextWidget
bool isTextWidget()
Definition: widgetbase.h:269
WidgetBase::usesDiagramFillColor
bool usesDiagramFillColor() const
Definition: widgetbase.cpp:496
WidgetBase::setID
void setID(Uml::ID::Type id)
Definition: widgetbase.cpp:212
WidgetBase::onWidget
virtual UMLWidget * onWidget(const QPointF &p)
Definition: widgetbase.cpp:884
WidgetBase::setLocalID
void setLocalID(Uml::ID::Type id)
Definition: widgetbase.cpp:238
WidgetBase::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: widgetbase.cpp:915
WidgetBase::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition: widgetbase.cpp:691
WidgetBase::isPinWidget
bool isPinWidget()
Definition: widgetbase.h:263
WidgetBase::m_Text
QString m_Text
Definition: widgetbase.h:320
WidgetBase::isInterfaceWidget
bool isInterfaceWidget()
Definition: widgetbase.h:256
WidgetBase::asRegionWidget
RegionWidget * asRegionWidget()
Definition: widgetbase.cpp:1501
WidgetBase::hasDocumentation
bool hasDocumentation()
Definition: widgetbase.cpp:293
WidgetBase::id
Uml::ID::Type id() const
Definition: widgetbase.cpp:226
WidgetBase::m_textColor
QColor m_textColor
Color of the text of the widget. Is saved to XMI.
Definition: widgetbase.h:335
WidgetBase::isNodeWidget
bool isNodeWidget()
Definition: widgetbase.h:258
WidgetBase::m_brush
QBrush m_brush
Definition: widgetbase.h:338
WidgetBase::setUMLObject
virtual void setUMLObject(UMLObject *obj)
Definition: widgetbase.cpp:204
WidgetBase::isArtifactWidget
bool isArtifactWidget()
Definition: widgetbase.h:244
WidgetBase::setChangesShape
void setChangesShape(bool state)
Definition: widgetbase.cpp:599
WidgetBase::setDocumentation
virtual void setDocumentation(const QString &doc)
Definition: widgetbase.cpp:306
WidgetBase::m_changesShape
bool m_changesShape
The widget changes its shape when the number of connections or their positions are changed.
Definition: widgetbase.h:354
WidgetBase::widgetHasUMLObject
static bool widgetHasUMLObject(WidgetBase::WidgetType type)
Definition: widgetbase.cpp:665
WidgetBase::asSignalWidget
SignalWidget * asSignalWidget()
Definition: widgetbase.cpp:1502
WidgetBase::isBoxWidget
bool isBoxWidget()
Definition: widgetbase.h:246
WidgetBase::documentation
QString documentation() const
Definition: widgetbase.cpp:281
WidgetBase::isClassWidget
bool isClassWidget()
Definition: widgetbase.h:248
WidgetBase::setUsesDiagramUseFillColor
void setUsesDiagramUseFillColor(bool state)
Definition: widgetbase.cpp:526
WidgetBase::lineColor
QColor lineColor() const
Definition: widgetbase.cpp:368
WidgetBase::m_lineColor
QColor m_lineColor
Color of the lines of the widget. Is saved to XMI.
Definition: widgetbase.h:336
WidgetBase::asPortWidget
PortWidget * asPortWidget()
Definition: widgetbase.cpp:1499
WidgetBase::m_usesDiagramLineWidth
bool m_usesDiagramLineWidth
Definition: widgetbase.h:350
WidgetBase::m_nLocalID
Uml::ID::Type m_nLocalID
Definition: widgetbase.h:333
WidgetBase::isSignalWidget
bool isSignalWidget()
Definition: widgetbase.h:267
WidgetBase::operator=
WidgetBase & operator=(const WidgetBase &other)
Definition: widgetbase.cpp:812
WidgetBase::changesShape
bool changesShape()
Definition: widgetbase.cpp:590
WidgetBase::asUseCaseWidget
UseCaseWidget * asUseCaseWidget()
Definition: widgetbase.cpp:1506
WidgetBase::m_font
QFont m_font
Definition: widgetbase.h:339
WidgetBase::umlScene
UMLScene * umlScene() const
Definition: widgetbase.cpp:174
WidgetBase::usesDiagramUseFillColor
bool usesDiagramUseFillColor() const
Definition: widgetbase.cpp:516
WidgetBase::isPreconditionWidget
bool isPreconditionWidget()
Definition: widgetbase.h:265
WidgetBase::widgetWithID
virtual UMLWidget * widgetWithID(Uml::ID::Type id)
Definition: widgetbase.cpp:267
WidgetBase::isCategoryWidget
bool isCategoryWidget()
Definition: widgetbase.h:247
WidgetBase::isEnumWidget
bool isEnumWidget()
Definition: widgetbase.h:253
WidgetBase::isDatatypeWidget
bool isDatatypeWidget()
Definition: widgetbase.h:251
WidgetBase::setUseFillColor
virtual void setUseFillColor(bool state)
Definition: widgetbase.cpp:441
WidgetBase::asDatatypeWidget
DatatypeWidget * asDatatypeWidget()
Definition: widgetbase.cpp:1485
WidgetBase::m_usesDiagramFillColor
bool m_usesDiagramFillColor
Definition: widgetbase.h:348
WidgetBase::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: widgetbase.cpp:614
WidgetBase::asEntityWidget
EntityWidget * asEntityWidget()
Definition: widgetbase.cpp:1486
WidgetBase::setSelected
virtual void setSelected(bool select)
Definition: widgetbase.cpp:165
WidgetBase::setName
virtual void setName(const QString &strName)
Definition: widgetbase.cpp:334
WidgetBase::asArtifactWidget
ArtifactWidget * asArtifactWidget()
Definition: widgetbase.cpp:1478
WidgetBase::setBaseType
void setBaseType(const WidgetType &baseType)
Definition: widgetbase.cpp:136
WidgetBase::lineWidth
uint lineWidth() const
Definition: widgetbase.cpp:410
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:555
WidgetBase::setFont
virtual void setFont(const QFont &font)
Definition: widgetbase.cpp:563
WidgetBase::setUsesDiagramTextColor
void setUsesDiagramTextColor(bool state)
Definition: widgetbase.cpp:462
WidgetBase::asObjectNodeWidget
ObjectNodeWidget * asObjectNodeWidget()
Definition: widgetbase.cpp:1494
WidgetBase::fillColor
QColor fillColor() const
Definition: widgetbase.cpp:389
WidgetBase::toIcon
static Icon_Utils::IconType toIcon(WidgetType wt)
Definition: widgetbase.cpp:1344
WidgetBase::m_lineWidth
uint m_lineWidth
Width of the lines of the widget. Is saved to XMI.
Definition: widgetbase.h:340
WidgetBase::baseType
WidgetType baseType() const
Definition: widgetbase.cpp:127
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:112
WidgetBase::wt_Object
@ wt_Object
Definition: widgetbase.h:123
WidgetBase::wt_ForkJoin
@ wt_ForkJoin
Definition: widgetbase.h:134
WidgetBase::wt_Instance
@ wt_Instance
Definition: widgetbase.h:144
WidgetBase::wt_Enum
@ wt_Enum
Definition: widgetbase.h:120
WidgetBase::wt_Message
@ wt_Message
Definition: widgetbase.h:126
WidgetBase::wt_ObjectNode
@ wt_ObjectNode
Definition: widgetbase.h:140
WidgetBase::wt_Entity
@ wt_Entity
Definition: widgetbase.h:121
WidgetBase::wt_Actor
@ wt_Actor
Definition: widgetbase.h:115
WidgetBase::wt_Category
@ wt_Category
Definition: widgetbase.h:142
WidgetBase::wt_Package
@ wt_Package
Definition: widgetbase.h:122
WidgetBase::wt_Node
@ wt_Node
Definition: widgetbase.h:132
WidgetBase::wt_Region
@ wt_Region
Definition: widgetbase.h:141
WidgetBase::wt_Port
@ wt_Port
Definition: widgetbase.h:143
WidgetBase::wt_Artifact
@ wt_Artifact
Definition: widgetbase.h:131
WidgetBase::wt_Class
@ wt_Class
Definition: widgetbase.h:117
WidgetBase::wt_Pin
@ wt_Pin
Definition: widgetbase.h:139
WidgetBase::wt_Interface
@ wt_Interface
Definition: widgetbase.h:118
WidgetBase::wt_Activity
@ wt_Activity
Definition: widgetbase.h:129
WidgetBase::wt_Text
@ wt_Text
Definition: widgetbase.h:127
WidgetBase::wt_UseCase
@ wt_UseCase
Definition: widgetbase.h:116
WidgetBase::wt_Max
@ wt_Max
Definition: widgetbase.h:145
WidgetBase::wt_State
@ wt_State
Definition: widgetbase.h:128
WidgetBase::wt_Precondition
@ wt_Precondition
Definition: widgetbase.h:135
WidgetBase::wt_Min
@ wt_Min
Definition: widgetbase.h:113
WidgetBase::wt_Association
@ wt_Association
Definition: widgetbase.h:133
WidgetBase::wt_Datatype
@ wt_Datatype
Definition: widgetbase.h:119
WidgetBase::wt_Component
@ wt_Component
Definition: widgetbase.h:130
WidgetBase::wt_UMLWidget
@ wt_UMLWidget
Definition: widgetbase.h:114
WidgetBase::wt_CombinedFragment
@ wt_CombinedFragment
Definition: widgetbase.h:136
WidgetBase::wt_Note
@ wt_Note
Definition: widgetbase.h:124
WidgetBase::wt_Box
@ wt_Box
Definition: widgetbase.h:125
WidgetBase::wt_FloatingDashLine
@ wt_FloatingDashLine
Definition: widgetbase.h:137
WidgetBase::wt_Signal
@ wt_Signal
Definition: widgetbase.h:138
WidgetBase::setLineColor
virtual void setLineColor(const QColor &color)
Definition: widgetbase.cpp:378
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
icon_utils.h
Icon_Utils::IconType
IconType
Definition: icon_utils.h:47
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