umbrello: umbrello/umlwidgets/widgetbase.h Source File

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

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

- File List
- File Members

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
22class QAction;
23class ActivityWidget;
24class ActorWidget;
25class ArtifactWidget;
26class AssociationWidget;
27class BoxWidget;
28class CategoryWidget;
29class ClassifierWidget;
30class CombinedFragmentWidget;
31class ComponentWidget;
32class DatatypeWidget;
33class EntityWidget;
34class EnumWidget;
35class FloatingDashLineWidget;
36class FloatingTextWidget;
37class ForkJoinWidget;
38class IDChangeLog;
39class InterfaceWidget;
40class MessageWidget;
41class NodeWidget;
42class NoteWidget;
43class ObjectNodeWidget;
44class ObjectWidget;
45class PackageWidget;
46class PinWidget;
47class PortWidget;
48class PinPortBase;
49class PreconditionWidget;
50class RegionWidget;
51class SignalWidget;
52class StateWidget;
53//class TextWidget;
54class UseCaseWidget;
55class UMLDoc;
56class UMLObject;
57class UMLScene;
58class UMLWidget; // required by function onWidget()
59
86 class QGraphicsObjectWrapper: public QGraphicsObject
87{
88public:
89 virtual void setSelected(bool state);
90protected:
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
105public:
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 virtual bool showPropertiesDialog();
218
219 virtual bool loadFromXMI(QDomElement &qElement);
220 virtual void saveToXMI(QXmlStreamWriter& writer);
221
222 virtual void removeAssoc(AssociationWidget* pAssoc);
223 virtual void addAssoc(AssociationWidget* pAssoc);
224
225 WidgetBase& operator=(const WidgetBase& other);
226
227 QRectF rect() const;
228 void setRect(const QRectF& rect);
229 void setRect(qreal x, qreal y, qreal width, qreal height);
230
231 virtual QRectF boundingRect() const;
232
233 virtual UMLWidget* onWidget(const QPointF &p);
234
235 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
236
237 bool isActivityWidget() const { return baseType() == wt_Activity; }
238 bool isActorWidget() const { return baseType() == wt_Actor; }
239 bool isArtifactWidget() const { return baseType() == wt_Artifact; }
240 bool isAssociationWidget() const { return baseType() == wt_Association; }
241 bool isBoxWidget() const { return baseType() == wt_Box; }
242 bool isCategoryWidget() const { return baseType() == wt_Category; }
243 bool isClassWidget() const { return baseType() == wt_Class; }
244 bool isCombinedFragmentWidget() const { return baseType() == wt_CombinedFragment; }
245 bool isComponentWidget() const { return baseType() == wt_Component; }
246 bool isDatatypeWidget() const { return baseType() == wt_Datatype; }
247 bool isEntityWidget() const { return baseType() == wt_Entity; }
248 bool isEnumWidget() const { return baseType() == wt_Enum; }
249 bool isFloatingDashLineWidget() const { return baseType() == wt_FloatingDashLine; }
250 bool isForkJoinWidget() const { return baseType() == wt_ForkJoin; }
251 bool isInterfaceWidget() const { return baseType() == wt_Interface; }
252 bool isMessageWidget() const { return baseType() == wt_Message; }
253 bool isNodeWidget() const { return baseType() == wt_Node; }
254 bool isNoteWidget() const { return baseType() == wt_Note; }
255 bool isObjectNodeWidget() const { return baseType() == wt_ObjectNode; }
256 bool isObjectWidget() const { return baseType() == wt_Object; }
257 bool isPackageWidget() const { return baseType() == wt_Package; }
258 bool isPinWidget() const { return baseType() == wt_Pin; }
259 bool isPortWidget() const { return baseType() == wt_Port; }
260 bool isPreconditionWidget() const { return baseType() == wt_Precondition; }
261 bool isRegionWidget() const { return baseType() == wt_Region; }
262 bool isSignalWidget() const { return baseType() == wt_Signal; }
263 bool isStateWidget() const { return baseType() == wt_State; }
264 bool isTextWidget() const { return baseType() == wt_Text; }
265 bool isUseCaseWidget() const { return baseType() == wt_UseCase; }
266
267 ActivityWidget* asActivityWidget();
268 ActorWidget* asActorWidget();
269 ArtifactWidget* asArtifactWidget();
270 AssociationWidget* asAssociationWidget();
271 BoxWidget* asBoxWidget();
272 CategoryWidget* asCategoryWidget();
273 ClassifierWidget* asClassifierWidget();
274 CombinedFragmentWidget* asCombinedFragmentWidget();
275 ComponentWidget* asComponentWidget();
276 DatatypeWidget* asDatatypeWidget();
277 EntityWidget* asEntityWidget();
278 EnumWidget* asEnumWidget();
279 FloatingDashLineWidget* asFloatingDashLineWidget();
280 ForkJoinWidget* asForkJoinWidget();
281 InterfaceWidget* asInterfaceWidget();
282 MessageWidget* asMessageWidget();
283 NodeWidget* asNodeWidget();
284 NoteWidget* asNoteWidget();
285 ObjectNodeWidget* asObjectNodeWidget();
286 ObjectWidget* asObjectWidget();
287 PackageWidget* asPackageWidget();
288 PinWidget* asPinWidget();
289 PinPortBase* asPinPortBase();
290 PortWidget* asPortWidget();
291 PreconditionWidget* asPreconditionWidget();
292 RegionWidget* asRegionWidget();
293 SignalWidget* asSignalWidget();
294 StateWidget* asStateWidget();
295 FloatingTextWidget* asFloatingTextWidget();
296// TextWidget* asTextWidget();
297 UseCaseWidget* asUseCaseWidget();
298 UMLWidget* asUMLWidget();
299
300 const ActivityWidget* asActivityWidget() const;
301 const ActorWidget* asActorWidget() const;
302 const ArtifactWidget* asArtifactWidget() const;
303 const AssociationWidget* asAssociationWidget() const;
304 const BoxWidget* asBoxWidget() const;
305 const CategoryWidget* asCategoryWidget() const;
306 const ClassifierWidget* asClassifierWidget() const;
307 const CombinedFragmentWidget* asCombinedFragmentWidget() const;
308 const ComponentWidget* asComponentWidget() const;
309 const DatatypeWidget* asDatatypeWidget() const;
310 const EntityWidget* asEntityWidget() const;
311 const EnumWidget* asEnumWidget() const;
312 const FloatingDashLineWidget* asFloatingDashLineWidget() const;
313 const ForkJoinWidget* asForkJoinWidget() const;
314 const InterfaceWidget* asInterfaceWidget() const;
315 const MessageWidget* asMessageWidget() const;
316 const NodeWidget* asNodeWidget() const;
317 const NoteWidget* asNoteWidget() const;
318 const ObjectNodeWidget* asObjectNodeWidget() const;
319 const ObjectWidget* asObjectWidget() const;
320 const PackageWidget* asPackageWidget() const;
321 const PinWidget* asPinWidget() const;
322 const PinPortBase* asPinPortBase() const;
323 const PortWidget* asPortWidget() const;
324 const PreconditionWidget* asPreconditionWidget() const;
325 const RegionWidget* asRegionWidget() const;
326 const SignalWidget* asSignalWidget() const;
327 const StateWidget* asStateWidget() const;
328 const FloatingTextWidget* asFloatingTextWidget() const;
329// const TextWidget* asTextWidget() const;
330 const UseCaseWidget* asUseCaseWidget() const;
331 const UMLWidget* asUMLWidget() const;
332
333 static bool widgetHasUMLObject(WidgetBase::WidgetType type);
334 virtual bool activate(IDChangeLog *changeLog = 0);
335
336public Q_SLOTS:
337 virtual void slotMenuSelection(QAction *trigger);
338
339protected:
340 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
341
342private:
343 WidgetType m_baseType;
344protected:
345 UMLScene *m_scene;
346 QPointer<UMLObject> m_umlObject;
347 QString m_Doc;
348 QString m_Text;
349 QRectF m_rect;
350
356 Uml::ID::Type m_nId;
357
361 Uml::ID::Type m_nLocalID;
362
363 QColor m_textColor;
364 QColor m_lineColor;
365 QColor m_fillColor;
366 QBrush m_brush;
367 QFont m_font;
368 uint m_lineWidth;
369 bool m_useFillColor;
370
376 bool m_usesDiagramFillColor;
377 bool m_usesDiagramLineColor;
378 bool m_usesDiagramLineWidth;
379 bool m_usesDiagramTextColor;
380 bool m_usesDiagramUseFillColor;
381 bool m_autoResize;
382 bool m_changesShape;
383};
384
385#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:65
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:356
WidgetBase::setUsesDiagramFillColor
void setUsesDiagramFillColor(bool state)
Definition widgetbase.cpp:500
WidgetBase::asNoteWidget
NoteWidget * asNoteWidget()
Definition widgetbase.cpp:1481
WidgetBase::name
QString name() const
Definition widgetbase.cpp:315
WidgetBase::loadFromXMI
virtual bool loadFromXMI(QDomElement &qElement)
Definition widgetbase.cpp:730
WidgetBase::isPackageWidget
bool isPackageWidget() const
Definition widgetbase.h:257
WidgetBase::m_scene
UMLScene * m_scene
Definition widgetbase.h:345
WidgetBase::localID
Uml::ID::Type localID() const
Definition widgetbase.cpp:244
WidgetBase::isClassWidget
bool isClassWidget() const
Definition widgetbase.h:243
WidgetBase::m_umlObject
QPointer< UMLObject > m_umlObject
Definition widgetbase.h:346
WidgetBase::asActorWidget
ActorWidget * asActorWidget()
Definition widgetbase.cpp:1465
WidgetBase::usesDiagramTextColor
bool usesDiagramTextColor() const
Definition widgetbase.cpp:446
WidgetBase::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition widgetbase.cpp:623
WidgetBase::isObjectNodeWidget
bool isObjectNodeWidget() const
Definition widgetbase.h:255
WidgetBase::m_useFillColor
bool m_useFillColor
flag indicates if the UMLWidget uses the Diagram FillColour
Definition widgetbase.h:369
WidgetBase::isInterfaceWidget
bool isInterfaceWidget() const
Definition widgetbase.h:251
WidgetBase::toI18nString
static QString toI18nString(WidgetType wt)
Definition widgetbase.cpp:1224
WidgetBase::isFloatingDashLineWidget
bool isFloatingDashLineWidget() const
Definition widgetbase.h:249
WidgetBase::~WidgetBase
virtual ~WidgetBase()
Definition widgetbase.cpp:114
WidgetBase::isMessageWidget
bool isMessageWidget() const
Definition widgetbase.h:252
WidgetBase::asObjectWidget
ObjectWidget * asObjectWidget()
Definition widgetbase.cpp:1483
WidgetBase::asPinWidget
PinWidget * asPinWidget()
Definition widgetbase.cpp:1485
WidgetBase::boundingRect
virtual QRectF boundingRect() const
Definition widgetbase.cpp:868
WidgetBase::asUMLWidget
UMLWidget * asUMLWidget()
Definition widgetbase.cpp:1495
WidgetBase::asFloatingDashLineWidget
FloatingDashLineWidget * asFloatingDashLineWidget()
Definition widgetbase.cpp:1476
WidgetBase::m_autoResize
bool m_autoResize
Definition widgetbase.h:381
WidgetBase::addAssoc
virtual void addAssoc(AssociationWidget *pAssoc)
Definition widgetbase.cpp:704
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:242
WidgetBase::isActorWidget
bool isActorWidget() const
Definition widgetbase.h:238
WidgetBase::m_usesDiagramLineColor
bool m_usesDiagramLineColor
Definition widgetbase.h:377
WidgetBase::hasDocumentation
bool hasDocumentation() const
Definition widgetbase.cpp:287
WidgetBase::slotMenuSelection
virtual void slotMenuSelection(QAction *trigger)
Definition widgetbase.cpp:971
WidgetBase::isTextWidget
bool isTextWidget() const
Definition widgetbase.h:264
WidgetBase::m_Doc
QString m_Doc
Only used if m_umlObject is not set.
Definition widgetbase.h:347
WidgetBase::removeAssoc
virtual void removeAssoc(AssociationWidget *pAssoc)
Definition widgetbase.cpp:713
WidgetBase::isDatatypeWidget
bool isDatatypeWidget() const
Definition widgetbase.h:246
WidgetBase::asNodeWidget
NodeWidget * asNodeWidget()
Definition widgetbase.cpp:1480
WidgetBase::isForkJoinWidget
bool isForkJoinWidget() const
Definition widgetbase.h:250
WidgetBase::asCombinedFragmentWidget
CombinedFragmentWidget * asCombinedFragmentWidget()
Definition widgetbase.cpp:1471
WidgetBase::m_usesDiagramUseFillColor
bool m_usesDiagramUseFillColor
Definition widgetbase.h:380
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:1492
WidgetBase::isObjectWidget
bool isObjectWidget() const
Definition widgetbase.h:256
WidgetBase::asPinPortBase
PinPortBase * asPinPortBase()
Definition widgetbase.cpp:1486
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:349
WidgetBase::m_fillColor
QColor m_fillColor
color of the background of the widget
Definition widgetbase.h:365
WidgetBase::asCategoryWidget
CategoryWidget * asCategoryWidget()
Definition widgetbase.cpp:1469
WidgetBase::isRegionWidget
bool isRegionWidget() const
Definition widgetbase.h:261
WidgetBase::setRect
void setRect(const QRectF &rect)
Definition widgetbase.cpp:846
WidgetBase::setAutoResize
void setAutoResize(bool state)
Definition widgetbase.cpp:575
WidgetBase::asMessageWidget
MessageWidget * asMessageWidget()
Definition widgetbase.cpp:1479
WidgetBase::asActivityWidget
ActivityWidget * asActivityWidget()
Definition widgetbase.cpp:1464
WidgetBase::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition widgetbase.cpp:922
WidgetBase::autoResize
bool autoResize() const
Definition widgetbase.cpp:566
WidgetBase::asAssociationWidget
AssociationWidget * asAssociationWidget()
Definition widgetbase.cpp:1467
WidgetBase::asInterfaceWidget
InterfaceWidget * asInterfaceWidget()
Definition widgetbase.cpp:1478
WidgetBase::isNodeWidget
bool isNodeWidget() const
Definition widgetbase.h:253
WidgetBase::textColor
QColor textColor() const
Definition widgetbase.cpp:341
WidgetBase::setUsesDiagramLineWidth
void setUsesDiagramLineWidth(bool state)
Definition widgetbase.cpp:540
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:1488
WidgetBase::asEnumWidget
EnumWidget * asEnumWidget()
Definition widgetbase.cpp:1475
WidgetBase::asForkJoinWidget
ForkJoinWidget * asForkJoinWidget()
Definition widgetbase.cpp:1477
WidgetBase::isAssociationWidget
bool isAssociationWidget() const
Definition widgetbase.h:240
WidgetBase::asStateWidget
StateWidget * asStateWidget()
Definition widgetbase.cpp:1491
WidgetBase::toString
static QString toString(WidgetType wt)
Definition widgetbase.cpp:1214
WidgetBase::asBoxWidget
BoxWidget * asBoxWidget()
Definition widgetbase.cpp:1468
WidgetBase::m_baseType
WidgetType m_baseType
Type of widget.
Definition widgetbase.h:343
WidgetBase::rect
QRectF rect() const
Definition widgetbase.cpp:838
WidgetBase::isPreconditionWidget
bool isPreconditionWidget() const
Definition widgetbase.h:260
WidgetBase::m_usesDiagramTextColor
bool m_usesDiagramTextColor
Definition widgetbase.h:379
WidgetBase::asPackageWidget
PackageWidget * asPackageWidget()
Definition widgetbase.cpp:1484
WidgetBase::isUseCaseWidget
bool isUseCaseWidget() const
Definition widgetbase.h:265
WidgetBase::asComponentWidget
ComponentWidget * asComponentWidget()
Definition widgetbase.cpp:1472
WidgetBase::setTextColor
virtual void setTextColor(const QColor &color)
Definition widgetbase.cpp:351
WidgetBase::isEntityWidget
bool isEntityWidget() const
Definition widgetbase.h:247
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:1470
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:263
WidgetBase::onWidget
virtual UMLWidget * onWidget(const QPointF &p)
Definition widgetbase.cpp:883
WidgetBase::setLocalID
void setLocalID(Uml::ID::Type id)
Definition widgetbase.cpp:232
WidgetBase::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition widgetbase.cpp:914
WidgetBase::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition widgetbase.cpp:685
WidgetBase::isPortWidget
bool isPortWidget() const
Definition widgetbase.h:259
WidgetBase::isPinWidget
bool isPinWidget() const
Definition widgetbase.h:258
WidgetBase::m_Text
QString m_Text
Definition widgetbase.h:348
WidgetBase::asRegionWidget
RegionWidget * asRegionWidget()
Definition widgetbase.cpp:1489
WidgetBase::id
Uml::ID::Type id() const
Definition widgetbase.cpp:220
WidgetBase::isSignalWidget
bool isSignalWidget() const
Definition widgetbase.h:262
WidgetBase::isComponentWidget
bool isComponentWidget() const
Definition widgetbase.h:245
WidgetBase::m_textColor
QColor m_textColor
Color of the text of the widget. Is saved to XMI.
Definition widgetbase.h:363
WidgetBase::m_brush
QBrush m_brush
Definition widgetbase.h:366
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:382
WidgetBase::widgetHasUMLObject
static bool widgetHasUMLObject(WidgetBase::WidgetType type)
Definition widgetbase.cpp:659
WidgetBase::asSignalWidget
SignalWidget * asSignalWidget()
Definition widgetbase.cpp:1490
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:364
WidgetBase::asPortWidget
PortWidget * asPortWidget()
Definition widgetbase.cpp:1487
WidgetBase::useFillColor
bool useFillColor() const
Definition widgetbase.cpp:425
WidgetBase::m_usesDiagramLineWidth
bool m_usesDiagramLineWidth
Definition widgetbase.h:378
WidgetBase::m_nLocalID
Uml::ID::Type m_nLocalID
Definition widgetbase.h:361
WidgetBase::isBoxWidget
bool isBoxWidget() const
Definition widgetbase.h:241
WidgetBase::operator=
WidgetBase & operator=(const WidgetBase &other)
Definition widgetbase.cpp:807
WidgetBase::asUseCaseWidget
UseCaseWidget * asUseCaseWidget()
Definition widgetbase.cpp:1494
WidgetBase::m_font
QFont m_font
Definition widgetbase.h:367
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:1473
WidgetBase::m_usesDiagramFillColor
bool m_usesDiagramFillColor
Definition widgetbase.h:376
WidgetBase::isArtifactWidget
bool isArtifactWidget() const
Definition widgetbase.h:239
WidgetBase::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition widgetbase.cpp:608
WidgetBase::asEntityWidget
EntityWidget * asEntityWidget()
Definition widgetbase.cpp:1474
WidgetBase::setSelected
virtual void setSelected(bool select)
Definition widgetbase.cpp:159
WidgetBase::isNoteWidget
bool isNoteWidget() const
Definition widgetbase.h:254
WidgetBase::setName
virtual void setName(const QString &strName)
Definition widgetbase.cpp:328
WidgetBase::asArtifactWidget
ArtifactWidget * asArtifactWidget()
Definition widgetbase.cpp:1466
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:244
WidgetBase::asObjectNodeWidget
ObjectNodeWidget * asObjectNodeWidget()
Definition widgetbase.cpp:1482
WidgetBase::fillColor
QColor fillColor() const
Definition widgetbase.cpp:383
WidgetBase::toIcon
static Icon_Utils::IconType toIcon(WidgetType wt)
Definition widgetbase.cpp:1332
WidgetBase::isEnumWidget
bool isEnumWidget() const
Definition widgetbase.h:248
WidgetBase::m_lineWidth
uint m_lineWidth
Width of the lines of the widget. Is saved to XMI.
Definition widgetbase.h:368
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:237
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