umbrello 26.03.70-1a62d36 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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