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

umlscene.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef UMLSCENE_H
7#define UMLSCENE_H
8
9// local includes
10#include "associationwidgetlist.h"
11#include "basictypes.h"
12#include "classifierwidget.h"
13#include "messagewidgetlist.h"
14#include "optionstate.h"
15#include "umlobject.h"
16#include "umlobjectlist.h"
17#include "umlwidgetlist.h"
18#include "worktoolbar.h"
19#include "widgetbase.h"
20
21// Qt includes
22#include <QDomDocument>
23#include <QGraphicsScene>
24#include <QGraphicsItem>
25#include <QGraphicsSceneMouseEvent>
26#include <QGraphicsPolygonItem>
27#include <QKeyEvent>
28#include <QMouseEvent>
29#include <QPixmap>
30#include <QXmlStreamWriter>
31
32// forward declarations
33 class ClassOptionsPage;
34 class IDChangeLog;
35 class LayoutGrid;
36 class FloatingTextWidget;
37 class ObjectWidget;
38 class ToolBarState;
39 class ToolBarStateFactory;
40 class UMLFolder;
41 class UMLDoc;
42 class UMLAttribute;
43 class UMLCanvasObject;
44 class UMLClassifier;
45 class UMLViewImageExporter;
46 class UMLForeignKeyConstraint;
47 class UMLEntity;
48 class UMLView;
49
50 class QHideEvent;
51 class QMouseEvent;
52 class QPrinter;
53 class QShowEvent;
54 class UMLScenePrivate;
55
56// migration wrapper for QGraphicsScene items
57 typedef QList<QGraphicsItem*> UMLSceneItemList;
58
64 class UMLScene : public QGraphicsScene
65{
66 Q_OBJECT
67 public:
68 friend class UMLViewImageExporterModel;
69
70 explicit UMLScene(UMLFolder *parentFolder, UMLView *view = 0);
71 virtual ~UMLScene();
72
73 UMLView* activeView() const;
74
75 // Accessors and other methods dealing with loaded/saved data
76
77 UMLFolder* folder() const;
78 void setFolder(UMLFolder *folder);
79
80 QString documentation() const;
81 void setDocumentation(const QString &doc);
82
83 bool autoIncrementSequence() const;
84 void setAutoIncrementSequence(bool state);
85 QString autoIncrementSequenceValue();
86
87 QString name() const;
88 void setName(const QString &name);
89
90 Uml::DiagramType::Enum type() const;
91 void setType(Uml::DiagramType::Enum type);
92
93 Uml::ID::Type ID() const;
94 void setID(Uml::ID::Type id);
95
96 QPointF pos() const;
97 void setPos(const QPointF &pos);
98
99 const QColor& fillColor() const;
100 void setFillColor(const QColor &color);
101
102 const QColor& lineColor() const;
103 void setLineColor(const QColor &color);
104
105 uint lineWidth() const;
106 void setLineWidth(uint width);
107
108 const QColor& textColor() const;
109 void setTextColor(const QColor& color);
110
111 const QColor& gridDotColor() const;
112 void setGridDotColor(const QColor& color);
113
114 const QColor& backgroundColor() const;
115
116 bool snapToGrid() const;
117 void setSnapToGrid(bool bSnap);
118
119 bool snapComponentSizeToGrid() const;
120 void setSnapComponentSizeToGrid(bool bSnap);
121
122 int snapX() const;
123 int snapY() const;
124 void setSnapSpacing(int x, int y);
125
126 qreal snappedX(qreal x);
127 qreal snappedY(qreal y);
128
129 bool isSnapGridVisible() const;
130 void setSnapGridVisible(bool bShow);
131
132 bool isShowDocumentationIndicator() const;
133 void setShowDocumentationIndicator(bool bShow);
134
135 bool useFillColor() const;
136 void setUseFillColor(bool ufc);
137
138 QFont font() const;
139 void setFont(QFont font, bool changeAllWidgets = false);
140
141 bool showOpSig() const;
142 void setShowOpSig(bool bShowOpSig);
143
144 Settings::OptionState& optionState();
145 void setOptionState(const Settings::OptionState& options);
146
147 const AssociationWidgetList associationList() const;
148 const MessageWidgetList messageList() const;
149 const UMLWidgetList widgetList() const;
150 void addWidgetCmd(UMLWidget* widget);
151 void addWidgetCmd(AssociationWidget *widget);
152
153 bool isOpen() const;
154 void setIsOpen(bool isOpen);
155
156 // End of accessors and methods that only deal with loaded/saved data
158
159 void print(QPrinter *pPrinter, QPainter & pPainter);
160
161 void hideEvent(QHideEvent *he);
162 void showEvent(QShowEvent *se);
163
164 void checkMessages(ObjectWidget * w);
165
166 UMLWidget* findWidget(Uml::ID::Type id);
167
168 AssociationWidget* findAssocWidget(Uml::ID::Type id);
169 AssociationWidget* findAssocWidget(Uml::AssociationType::Enum at,
170 UMLWidget *pWidgetA, UMLWidget *pWidgetB);
171 AssociationWidget* findAssocWidget(UMLWidget *pWidgetA,
172 UMLWidget *pWidgetB, const QString& roleNameB);
173
174 void removeWidget(UMLWidget *o);
175 void removeWidget(AssociationWidget *w);
176 void removeWidgetCmd(UMLWidget *o);
177 private:
178 void removeOwnedWidgets(UMLWidget* o);
179 public:
180
181 UMLWidgetList selectedWidgets() const;
182 AssociationWidgetList selectedAssociationWidgets() const;
183 UMLWidgetList selectedMessageWidgets() const;
184 void clearSelected();
185
186 void moveSelectedBy(qreal dX, qreal dY);
187
188 int selectedCount(bool filterText = false) const;
189
190 void selectionUseFillColor(bool useFC);
191 void selectionSetFont(const QFont &font);
192 void selectionSetLineColor(const QColor &color);
193 void selectionSetLineWidth(uint width);
194 void selectionSetFillColor(const QColor &color);
195 void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value);
196
197 private:
198 void unselectChildrenOfSelectedWidgets();
199 public:
200 void deleteSelection();
201 void resizeSelection();
202
203 void selectAll();
204
205 UMLWidget* widgetOnDiagram(Uml::ID::Type id);
206 UMLWidget *widgetOnDiagram(WidgetBase::WidgetType type);
207
208 bool isSavedInSeparateFile();
209
210 void setMenu(const QPoint& pos);
211
212 void resetToolbar();
213 void triggerToolbarButton(WorkToolBar::ToolBar_Buttons button);
214
215 bool getPaste() const;
216 void setPaste(bool paste);
217
218 void activate();
219
220 AssociationWidgetList selectedAssocs();
221 UMLWidgetList selectedWidgetsExt(bool filterText = true);
222
223 void activateAfterLoad(bool bUseLog = false);
224
225 void endPartialWidgetPaste();
226 void beginPartialWidgetPaste();
227
228 void removeWidgetCmd(AssociationWidget* pAssoc);
229 void removeAssociations(UMLWidget* pWidget);
230 void selectAssociations(bool bSelect);
231
232 void getWidgetAssocs(UMLObject* Obj, AssociationWidgetList & Associations);
233
234 void removeAllAssociations();
235
236 void removeAllWidgets();
237
238 void getDiagram(QPixmap & diagram, const QRectF &rect);
239 void getDiagram(QPainter &painter, const QRectF &source, const QRectF &target = QRectF());
240
241 void copyAsImage(QPixmap*& pix);
242
243 UMLViewImageExporter* getImageExporter();
244
245 bool addAssociation(AssociationWidget* pAssoc, bool isPasteOperation = false);
246
247 void removeAssocInViewAndDoc(AssociationWidget* assoc);
248
249 void addFloatingTextWidget(FloatingTextWidget* pWidget);
250
251 QPointF getPastePoint();
252 void resetPastePoint();
253
254 void setStartedCut();
255
256 void createAutoAssociations(UMLWidget * widget);
257 void createAutoAttributeAssociations(UMLWidget *widget);
258 void createAutoConstraintAssociations(UMLWidget* widget);
259 void createAutoAttributeAssociations2(UMLWidget *widget);
260
261 void updateContainment(UMLCanvasObject *self);
262
263 void setClassWidgetOptions(ClassOptionsPage * page);
264
265 WidgetBase::WidgetType getUniqueSelectionType();
266
267 void clearDiagram();
268
269 void applyLayout(const QString &actionText);
270
271 void toggleSnapToGrid();
272 void toggleSnapComponentSizeToGrid();
273 void toggleShowGrid();
274
275 void fileLoaded();
276
277 void resizeSceneToItems();
278
279 // Load/Save interface:
280
281 virtual void saveToXMI1(QXmlStreamWriter& writer);
282 virtual bool loadFromXMI1(QDomElement & qElement);
283
284 bool loadUISDiagram(QDomElement & qElement);
285 UMLWidget* loadWidgetFromXMI(QDomElement& widgetElement);
286
287 void addObject(UMLObject *object);
288
289 void selectWidgets(qreal px, qreal py, qreal qx, qreal qy);
290 void selectWidgets(UMLWidgetList &widgets);
291 void selectWidget(UMLWidget* widget, QRectF* rect = 0);
292 void selectWidgetsOfAssoc(AssociationWidget *a);
293
294 ObjectWidget * onWidgetLine(const QPointF &point) const;
295 ObjectWidget * onWidgetDestructionBox(const QPointF &point) const;
296
297 UMLWidget* getFirstMultiSelectedWidget() const;
298
299 UMLWidget* widgetAt(const QPointF& p);
300 AssociationWidget* associationAt(const QPointF& p);
301 MessageWidget* messageAt(const QPointF& p);
302
303 void setupNewWidget(UMLWidget *w, bool setPosition=true);
304
305 bool getCreateObject() const;
306 void setCreateObject(bool bCreate);
307
308 int generateCollaborationId();
309
310 UMLSceneItemList collisions(const QPointF &p, int delta = 3);
311
312 bool isClassDiagram() const { return type() == Uml::DiagramType::Class; }
313 bool isUseCaseDiagram() const { return type() == Uml::DiagramType::UseCase; }
314 bool isSequenceDiagram() const { return type() == Uml::DiagramType::Sequence; }
315 bool isCollaborationDiagram() const { return type() == Uml::DiagramType::Collaboration; }
316 bool isStateDiagram() const { return type() == Uml::DiagramType::State; }
317 bool isActivityDiagram() const { return type() == Uml::DiagramType::Activity; }
318 bool isComponentDiagram() const { return type() == Uml::DiagramType::Component; }
319 bool isDeploymentDiagram() const { return type() == Uml::DiagramType::Deployment; }
320 bool isEntityRelationshipDiagram() const { return type() == Uml::DiagramType::EntityRelationship; }
321 bool isObjectDiagram() const { return type() == Uml::DiagramType::Object; }
322
323 void setWidgetLink(WidgetBase *w);
324 WidgetBase *widgetLink();
325
326 protected:
327 // Methods and members related to loading/saving
328
329 bool loadWidgetsFromXMI(QDomElement & qElement);
330 bool loadMessagesFromXMI(QDomElement & qElement);
331 bool loadAssociationsFromXMI(QDomElement & qElement);
332 bool loadUisDiagramPresentation(QDomElement & qElement);
333
338 Uml::ID::Type m_nLocalID;
339
340 Uml::ID::Type m_nID;
341 Uml::DiagramType::Enum m_Type;
342 QString m_Name;
343 QString m_Documentation;
344 Settings::OptionState m_Options;
345
346 bool m_bUseSnapToGrid;
347 bool m_bUseSnapComponentSizeToGrid;
348 bool m_isOpen;
349
350 // End of methods and members related to loading/saving
352
353 void dragEnterEvent(QGraphicsSceneDragDropEvent* enterEvent);
354 void dragMoveEvent(QGraphicsSceneDragDropEvent* moveEvent);
355 void dropEvent(QGraphicsSceneDragDropEvent* dropEvent);
356
357 void mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent);
358 void mousePressEvent(QGraphicsSceneMouseEvent* mouseEvent);
359 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* mouseEvent);
360 void mouseReleaseEvent(QGraphicsSceneMouseEvent* mouseEvent);
361 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
362
363 QRectF diagramRect();
364
365 void makeSelected(UMLWidget* uw);
366
367 void updateComponentSizes();
368
369 void findMaxBoundingRectangle(const FloatingTextWidget* ft,
370 qreal& px, qreal& py, qreal& qx, qreal& qy);
371 void forceUpdateWidgetFontMetrics(QPainter *painter);
372
373 virtual void drawBackground(QPainter *painter, const QRectF &rect);
374
375#if QT_VERSION >= 0x050000
376#if !(QT_DEPRECATED_SINCE(5, 0))
377 inline QGraphicsItem *itemAt(const QPointF &position) const {
378 QList<QGraphicsItem *> itemsAtPoint = items(position);
379 return itemsAtPoint.isEmpty() ? 0 : itemsAtPoint.first();
380 }
381#endif
382#endif
383
384 int m_nCollaborationId;
385 QPointF m_pos;
386 bool m_bCreateObject;
387 bool m_bDrawSelectedOnly;
388 bool m_bPaste;
389 bool m_bStartedCut;
390
391 private:
392 UMLScenePrivate *m_d;
393 static const qreal defaultCanvasSize;
394 static bool m_showDocumentationIndicator;
395
396 UMLView *m_view;
397 UMLFolder *m_pFolder;
398
399 IDChangeLog * m_pIDChangesLog;
400 bool m_isActivated;
401 bool m_bPopupShowing;
402 QPointF m_PastePoint;
403 UMLDoc* m_doc;
404 UMLViewImageExporter* m_pImageExporter;
405 LayoutGrid* m_layoutGrid;
406 bool m_autoIncrementSequence;
407
408 void createAutoAttributeAssociation(UMLClassifier *type,
409 UMLAttribute *attr,
410 UMLWidget *widget);
411 void createAutoConstraintAssociation(UMLEntity* refEntity,
412 UMLForeignKeyConstraint* fkConstraint,
413 UMLWidget* widget);
414
415 public slots:
416 void slotToolBarChanged(int c);
417 void slotObjectCreated(UMLObject * o);
418 void slotObjectRemoved(UMLObject * o);
419 void slotMenuSelection(QAction* action);
420 void slotActivate();
421 void slotCutSuccessful();
422 void slotShowView();
423
424 void alignLeft();
425 void alignRight();
426 void alignTop();
427 void alignBottom();
428 void alignVerticalMiddle();
429 void alignHorizontalMiddle();
430 void alignVerticalDistribute();
431 void alignHorizontalDistribute();
432
433signals:
434 void sigResetToolBar();
435
436 void sigFillColorChanged(Uml::ID::Type);
437 void sigGridColorChanged(Uml::ID::Type);
438 void sigLineColorChanged(Uml::ID::Type);
439 void sigTextColorChanged(Uml::ID::Type);
440 void sigLineWidthChanged(Uml::ID::Type);
441 void sigSnapToGridToggled(bool);
442 void sigSnapComponentSizeToGridToggled(bool);
443 void sigShowGridToggled(bool);
444 void sigAssociationRemoved(AssociationWidget*);
445 void sigWidgetRemoved(UMLWidget*);
446
447 friend class DiagramProxyWidget;
448};
449
450QDebug operator<<(QDebug dbg, UMLScene *item);
451
452#endif // UMLSCENE_H
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:15
basictypes.h
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:47
ClassOptionsPage
A dialog page to display the class related options.
Definition: classoptionspage.h:35
ClassifierWidget::VisualProperty
VisualProperty
Definition: classifierwidget.h:37
DiagramProxyWidget
Definition: diagramproxywidget.h:25
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:32
IDChangeLog
Definition: idchangelog.h:22
LayoutGrid
Definition: layoutgrid.h:23
MessageWidget
Displays a message.
Definition: messagewidget.h:36
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:28
Settings::OptionState
Definition: optionstate.h:310
ToolBarStateFactory
Definition: toolbarstatefactory.h:29
ToolBarState
Definition: toolbarstate.h:65
UMLAttribute
Sets up attribute information.
Definition: attribute.h:23
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition: umlcanvasobject.h:32
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:35
UMLDoc
Definition: umldoc.h:70
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:30
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:30
UMLForeignKeyConstraint
Sets up Foreign Key entity constraint information.
Definition: foreignkeyconstraint.h:28
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLScenePrivate
Definition: umlscene.cpp:112
UMLScene
Definition: umlscene.h:65
UMLScene::removeWidget
void removeWidget(UMLWidget *o)
Definition: umlscene.cpp:1285
UMLScene::isComponentDiagram
bool isComponentDiagram() const
Definition: umlscene.h:318
UMLScene::alignHorizontalMiddle
void alignHorizontalMiddle()
Definition: umlscene.cpp:4315
UMLScene::createAutoAttributeAssociations
void createAutoAttributeAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2612
UMLScene::onWidgetDestructionBox
ObjectWidget * onWidgetDestructionBox(const QPointF &point) const
Definition: umlscene.cpp:1035
UMLScene::setIsOpen
void setIsOpen(bool isOpen)
Definition: umlscene.cpp:657
UMLScene::toggleSnapComponentSizeToGrid
void toggleSnapComponentSizeToGrid()
Definition: umlscene.cpp:3529
UMLScene::endPartialWidgetPaste
void endPartialWidgetPaste()
Definition: umlscene.cpp:2224
UMLScene::snapComponentSizeToGrid
bool snapComponentSizeToGrid() const
Definition: umlscene.cpp:3563
UMLScene::setPos
void setPos(const QPointF &pos)
Definition: umlscene.cpp:462
UMLScene::setSnapGridVisible
void setSnapGridVisible(bool bShow)
Definition: umlscene.cpp:3649
UMLScene::setupNewWidget
void setupNewWidget(UMLWidget *w, bool setPosition=true)
Definition: umlscene.cpp:711
UMLScene::isClassDiagram
bool isClassDiagram() const
Definition: umlscene.h:312
UMLScene::font
QFont font() const
Definition: umlscene.cpp:3429
UMLScene::setOptionState
void setOptionState(const Settings::OptionState &options)
Definition: umlscene.cpp:575
UMLScene::alignRight
void alignRight()
Definition: umlscene.cpp:4235
UMLScene::m_showDocumentationIndicator
static bool m_showDocumentationIndicator
Status of documentation indicator.
Definition: umlscene.h:394
UMLScene::m_d
UMLScenePrivate * m_d
Definition: umlscene.h:392
UMLScene::setMenu
void setMenu(const QPoint &pos)
UMLScene::loadUISDiagram
bool loadUISDiagram(QDomElement &qElement)
Definition: umlscene.cpp:4178
UMLScene::snapY
int snapY() const
Definition: umlscene.cpp:3589
UMLScene::associationList
const AssociationWidgetList associationList() const
Definition: umlscene.cpp:585
UMLScene::triggerToolbarButton
void triggerToolbarButton(WorkToolBar::ToolBar_Buttons button)
Definition: umlscene.cpp:2956
UMLScene::snapToGrid
bool snapToGrid() const
Definition: umlscene.cpp:3546
UMLScene::isObjectDiagram
bool isObjectDiagram() const
Definition: umlscene.h:321
UMLScene::checkMessages
void checkMessages(ObjectWidget *w)
Definition: umlscene.cpp:1115
UMLScene::copyAsImage
void copyAsImage(QPixmap *&pix)
Definition: umlscene.cpp:2877
UMLScene::selectWidgets
void selectWidgets(qreal px, qreal py, qreal qx, qreal qy)
Definition: umlscene.cpp:1780
UMLScene::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlscene.cpp:3838
UMLScene::mouseReleaseEvent
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:998
UMLScene::setShowDocumentationIndicator
void setShowDocumentationIndicator(bool bShow)
Definition: umlscene.cpp:3666
UMLScene::messageAt
MessageWidget * messageAt(const QPointF &p)
Definition: umlscene.cpp:1101
UMLScene::m_nID
Uml::ID::Type m_nID
The ID of the view. Allocated by UMLDoc.
Definition: umlscene.h:340
UMLScene::snappedX
qreal snappedX(qreal x)
Definition: umlscene.cpp:3605
UMLScene::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: umlscene.cpp:3763
UMLScene::setFolder
void setFolder(UMLFolder *folder)
Definition: umlscene.cpp:336
UMLScene::getImageExporter
UMLViewImageExporter * getImageExporter()
Definition: umlscene.cpp:1946
UMLScene::widgetOnDiagram
UMLWidget * widgetOnDiagram(Uml::ID::Type id)
Definition: umlscene.cpp:1135
UMLScene::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: umlscene.cpp:2964
UMLScene::m_bDrawSelectedOnly
bool m_bDrawSelectedOnly
Definition: umlscene.h:387
UMLScene::createAutoConstraintAssociations
void createAutoConstraintAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2742
UMLScene::m_pFolder
UMLFolder * m_pFolder
The folder in which this UMLView is contained.
Definition: umlscene.h:397
UMLScene::selectedAssociationWidgets
AssociationWidgetList selectedAssociationWidgets() const
Definition: umlscene.cpp:1419
UMLScene::setLineColor
void setLineColor(const QColor &color)
Definition: umlscene.cpp:499
UMLScene::setStartedCut
void setStartedCut()
Definition: umlscene.cpp:3421
UMLScene::autoIncrementSequence
bool autoIncrementSequence() const
Definition: umlscene.cpp:368
UMLScene::sigTextColorChanged
void sigTextColorChanged(Uml::ID::Type)
Definition: moc_umlscene.cpp:384
UMLScene::dragMoveEvent
void dragMoveEvent(QGraphicsSceneDragDropEvent *moveEvent)
Definition: umlscene.cpp:890
UMLScene::hideEvent
void hideEvent(QHideEvent *he)
Definition: umlscene.cpp:770
UMLScene::sigLineWidthChanged
void sigLineWidthChanged(Uml::ID::Type)
Definition: moc_umlscene.cpp:391
UMLScene::removeAllAssociations
void removeAllAssociations()
Definition: umlscene.cpp:2337
UMLScene::getPaste
bool getPaste() const
Definition: umlscene.cpp:2981
UMLScene::sigSnapComponentSizeToGridToggled
void sigSnapComponentSizeToGridToggled(bool)
Definition: moc_umlscene.cpp:405
UMLScene::snappedY
qreal snappedY(qreal y)
Definition: umlscene.cpp:3623
UMLScene::folder
UMLFolder * folder() const
Definition: umlscene.cpp:328
UMLScene::forceUpdateWidgetFontMetrics
void forceUpdateWidgetFontMetrics(QPainter *painter)
Definition: umlscene.cpp:3727
UMLScene::selectionSetLineWidth
void selectionSetLineWidth(uint width)
Definition: umlscene.cpp:1542
UMLScene::getWidgetAssocs
void getWidgetAssocs(UMLObject *Obj, AssociationWidgetList &Associations)
Definition: umlscene.cpp:2321
UMLScene::selectWidgetsOfAssoc
void selectWidgetsOfAssoc(AssociationWidget *a)
Definition: umlscene.cpp:1760
UMLScene::UMLScene
UMLScene(UMLFolder *parentFolder, UMLView *view=0)
Definition: umlscene.cpp:258
UMLScene::m_view
UMLView * m_view
The view to which this scene is related.
Definition: umlscene.h:396
UMLScene::dropEvent
void dropEvent(QGraphicsSceneDragDropEvent *dropEvent)
Definition: umlscene.cpp:898
UMLScene::fillColor
const QColor & fillColor() const
Definition: umlscene.cpp:470
UMLScene::loadUisDiagramPresentation
bool loadUisDiagramPresentation(QDomElement &qElement)
Definition: umlscene.cpp:4080
UMLScene::removeAllWidgets
void removeAllWidgets()
Definition: umlscene.cpp:2348
UMLScene::selectAssociations
void selectAssociations(bool bSelect)
Definition: umlscene.cpp:2303
UMLScene::selectionSetFillColor
void selectionSetFillColor(const QColor &color)
Definition: umlscene.cpp:1562
UMLScene::toggleSnapToGrid
void toggleSnapToGrid()
Definition: umlscene.cpp:3520
UMLScene::findWidget
UMLWidget * findWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1180
UMLScene::isEntityRelationshipDiagram
bool isEntityRelationshipDiagram() const
Definition: umlscene.h:320
UMLScene::setTextColor
void setTextColor(const QColor &color)
Definition: umlscene.cpp:537
UMLScene::type
Uml::DiagramType::Enum type() const
Definition: umlscene.cpp:422
UMLScene::setShowOpSig
void setShowOpSig(bool bShowOpSig)
Definition: umlscene.cpp:3682
UMLScene::resetToolbar
void resetToolbar()
Definition: umlscene.cpp:2951
UMLScene::isShowDocumentationIndicator
bool isShowDocumentationIndicator() const
Definition: umlscene.cpp:3658
UMLScene::selectedWidgets
UMLWidgetList selectedWidgets() const
Definition: umlscene.cpp:1402
UMLScene::createAutoAssociations
void createAutoAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2422
UMLScene::m_Type
Uml::DiagramType::Enum m_Type
The type of diagram to represent.
Definition: umlscene.h:341
UMLScene::slotCutSuccessful
void slotCutSuccessful()
Definition: umlscene.cpp:3379
UMLScene::activateAfterLoad
void activateAfterLoad(bool bUseLog=false)
Definition: umlscene.cpp:2196
UMLScene::findAssocWidget
AssociationWidget * findAssocWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1209
UMLScene::m_bPaste
bool m_bPaste
Definition: umlscene.h:388
UMLScene::setFont
void setFont(QFont font, bool changeAllWidgets=false)
Definition: umlscene.cpp:3437
UMLScene::activate
void activate()
Definition: umlscene.cpp:1962
UMLScene::addWidgetCmd
void addWidgetCmd(UMLWidget *widget)
Definition: umlscene.cpp:610
UMLScene::unselectChildrenOfSelectedWidgets
void unselectChildrenOfSelectedWidgets()
Definition: umlscene.cpp:1592
UMLScene::getDiagram
void getDiagram(QPixmap &diagram, const QRectF &rect)
Definition: umlscene.cpp:1886
UMLScene::beginPartialWidgetPaste
void beginPartialWidgetPaste()
Definition: umlscene.cpp:2215
UMLScene::m_pIDChangesLog
IDChangeLog * m_pIDChangesLog
LocalID Changes Log for paste actions.
Definition: umlscene.h:399
UMLScene::alignLeft
void alignLeft()
Definition: umlscene.cpp:4217
UMLScene::setAutoIncrementSequence
void setAutoIncrementSequence(bool state)
Definition: umlscene.cpp:373
UMLScene::setType
void setType(Uml::DiagramType::Enum type)
Definition: umlscene.cpp:430
UMLScene::removeAssocInViewAndDoc
void removeAssocInViewAndDoc(AssociationWidget *assoc)
Definition: umlscene.cpp:2255
UMLScene::m_isOpen
bool m_isOpen
Flag is set to true when diagram is open, i.e. shown to the user.
Definition: umlscene.h:348
UMLScene::alignBottom
void alignBottom()
Definition: umlscene.cpp:4270
UMLScene::sigAssociationRemoved
void sigAssociationRemoved(AssociationWidget *)
Definition: moc_umlscene.cpp:419
UMLScene::createAutoConstraintAssociation
void createAutoConstraintAssociation(UMLEntity *refEntity, UMLForeignKeyConstraint *fkConstraint, UMLWidget *widget)
Definition: umlscene.cpp:2791
UMLScene::sigSnapToGridToggled
void sigSnapToGridToggled(bool)
Definition: moc_umlscene.cpp:398
UMLScene::setWidgetLink
void setWidgetLink(WidgetBase *w)
Definition: umlscene.cpp:4414
UMLScene::drawBackground
virtual void drawBackground(QPainter *painter, const QRectF &rect)
Definition: umlscene.cpp:3738
UMLScene::diagramRect
QRectF diagramRect()
Definition: umlscene.cpp:1392
UMLScene::selectWidget
void selectWidget(UMLWidget *widget, QRectF *rect=0)
Definition: umlscene.cpp:1831
UMLScene::addAssociation
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Definition: umlscene.cpp:2105
UMLScene::isSequenceDiagram
bool isSequenceDiagram() const
Definition: umlscene.h:314
UMLScene::resizeSelection
void resizeSelection()
Definition: umlscene.cpp:1671
UMLScene::selectAll
void selectAll()
Definition: umlscene.cpp:1694
UMLScene::setDocumentation
void setDocumentation(const QString &doc)
Definition: umlscene.cpp:360
UMLScene::textColor
const QColor & textColor() const
Definition: umlscene.cpp:527
UMLScene::backgroundColor
const QColor & backgroundColor() const
Definition: umlscene.cpp:1366
UMLScene::snapX
int snapX() const
Definition: umlscene.cpp:3581
UMLScene::updateContainment
void updateContainment(UMLCanvasObject *self)
Definition: umlscene.cpp:2370
UMLScene::findMaxBoundingRectangle
void findMaxBoundingRectangle(const FloatingTextWidget *ft, qreal &px, qreal &py, qreal &qx, qreal &qy)
Definition: umlscene.cpp:2854
UMLScene::sigLineColorChanged
void sigLineColorChanged(Uml::ID::Type)
Definition: moc_umlscene.cpp:377
UMLScene::sigResetToolBar
void sigResetToolBar()
Definition: moc_umlscene.cpp:357
UMLScene::sigShowGridToggled
void sigShowGridToggled(bool)
Definition: moc_umlscene.cpp:412
UMLScene::setFillColor
void setFillColor(const QColor &color)
Definition: umlscene.cpp:480
UMLScene::selectedWidgetsExt
UMLWidgetList selectedWidgetsExt(bool filterText=true)
Definition: umlscene.cpp:2040
UMLScene::loadMessagesFromXMI
bool loadMessagesFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:4007
UMLScene::onWidgetLine
ObjectWidget * onWidgetLine(const QPointF &point) const
Definition: umlscene.cpp:1010
UMLScene::selectedAssocs
AssociationWidgetList selectedAssocs()
Definition: umlscene.cpp:2059
UMLScene::clearDiagram
void clearDiagram()
Definition: umlscene.cpp:3496
UMLScene::setSnapToGrid
void setSnapToGrid(bool bSnap)
Definition: umlscene.cpp:3554
UMLScene::setGridDotColor
void setGridDotColor(const QColor &color)
Definition: umlscene.cpp:558
UMLScene::collisions
UMLSceneItemList collisions(const QPointF &p, int delta=3)
Definition: umlscene.cpp:1737
UMLScene::name
QString name() const
Definition: umlscene.cpp:406
UMLScene::moveSelectedBy
void moveSelectedBy(qreal dX, qreal dY)
Definition: umlscene.cpp:1479
UMLScene::resizeSceneToItems
void resizeSceneToItems()
Definition: umlscene.cpp:3700
UMLScene::lineColor
const QColor & lineColor() const
Definition: umlscene.cpp:489
UMLScene::lineWidth
uint lineWidth() const
Definition: umlscene.cpp:508
UMLScene::isSnapGridVisible
bool isSnapGridVisible() const
Definition: umlscene.cpp:3641
UMLScene::slotShowView
void slotShowView()
Definition: umlscene.cpp:3390
UMLScene::resetPastePoint
void resetPastePoint()
Definition: umlscene.cpp:3412
UMLScene::messageList
const MessageWidgetList messageList() const
Definition: umlscene.cpp:625
UMLScene::mouseMoveEvent
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:949
UMLScene::deleteSelection
void deleteSelection()
Definition: umlscene.cpp:1609
UMLScene::setClassWidgetOptions
void setClassWidgetOptions(ClassOptionsPage *page)
Definition: umlscene.cpp:3451
UMLScene::m_bPopupShowing
bool m_bPopupShowing
Status of a popupmenu on view. True - a popup is on view.
Definition: umlscene.h:401
UMLScene::documentation
QString documentation() const
Definition: umlscene.cpp:352
UMLScene::sigGridColorChanged
void sigGridColorChanged(Uml::ID::Type)
Definition: moc_umlscene.cpp:370
UMLScene::sigWidgetRemoved
void sigWidgetRemoved(UMLWidget *)
Definition: moc_umlscene.cpp:426
UMLScene::isDeploymentDiagram
bool isDeploymentDiagram() const
Definition: umlscene.h:319
UMLScene::m_Options
Settings::OptionState m_Options
Options used by view.
Definition: umlscene.h:344
UMLScene::setLineWidth
void setLineWidth(uint width)
Definition: umlscene.cpp:518
UMLScene::m_nLocalID
Uml::ID::Type m_nLocalID
Definition: umlscene.h:338
UMLScene::slotObjectCreated
void slotObjectCreated(UMLObject *o)
Definition: umlscene.cpp:792
UMLScene::isStateDiagram
bool isStateDiagram() const
Definition: umlscene.h:316
UMLScene::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:962
UMLScene::isOpen
bool isOpen() const
Definition: umlscene.cpp:648
UMLScene::m_PastePoint
QPointF m_PastePoint
The offset at which to paste the clipboard.
Definition: umlscene.h:402
UMLScene::setSnapSpacing
void setSnapSpacing(int x, int y)
Definition: umlscene.cpp:3597
UMLScene::alignVerticalMiddle
void alignVerticalMiddle()
Definition: umlscene.cpp:4287
UMLScene::dragEnterEvent
void dragEnterEvent(QGraphicsSceneDragDropEvent *enterEvent)
Definition: umlscene.cpp:844
UMLScene::print
void print(QPrinter *pPrinter, QPainter &pPainter)
Definition: umlscene.cpp:665
UMLScene::showEvent
void showEvent(QShowEvent *se)
Definition: umlscene.cpp:757
UMLScene::loadWidgetsFromXMI
bool loadWidgetsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3960
UMLScene::m_bStartedCut
bool m_bStartedCut
Flag if view/children started cut operation.
Definition: umlscene.h:389
UMLScene::pos
QPointF pos() const
Definition: umlscene.cpp:454
UMLScene::autoIncrementSequenceValue
QString autoIncrementSequenceValue()
Definition: umlscene.cpp:381
UMLScene::setCreateObject
void setCreateObject(bool bCreate)
Definition: umlscene.cpp:749
UMLScene::mouseDoubleClickEvent
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:981
UMLScene::slotToolBarChanged
void slotToolBarChanged(int c)
Definition: umlscene.cpp:783
UMLScene::alignTop
void alignTop()
Definition: umlscene.cpp:4252
UMLScene::isSavedInSeparateFile
bool isSavedInSeparateFile()
Definition: umlscene.cpp:1703
UMLScene::m_doc
UMLDoc * m_doc
Pointer to the UMLDoc.
Definition: umlscene.h:403
UMLScene::m_pImageExporter
UMLViewImageExporter * m_pImageExporter
Used to export the view.
Definition: umlscene.h:404
UMLScene::applyLayout
void applyLayout(const QString &actionText)
Definition: umlscene.cpp:3506
UMLScene::m_bUseSnapToGrid
bool m_bUseSnapToGrid
Flag to use snap to grid. The default is off.
Definition: umlscene.h:346
UMLScene::selectionSetFont
void selectionSetFont(const QFont &font)
Definition: umlscene.cpp:1510
UMLScene::getUniqueSelectionType
WidgetBase::WidgetType getUniqueSelectionType()
Definition: umlscene.cpp:3472
UMLScene::m_Documentation
QString m_Documentation
The documentation of the diagram.
Definition: umlscene.h:343
UMLScene::m_pos
QPointF m_pos
Definition: umlscene.h:385
UMLScene::widgetLink
WidgetBase * widgetLink()
Definition: umlscene.cpp:4419
UMLScene::createAutoAttributeAssociation
void createAutoAttributeAssociation(UMLClassifier *type, UMLAttribute *attr, UMLWidget *widget)
Definition: umlscene.cpp:2680
UMLScene::m_Name
QString m_Name
The name of the diagram.
Definition: umlscene.h:342
UMLScene::getFirstMultiSelectedWidget
UMLWidget * getFirstMultiSelectedWidget() const
Definition: umlscene.cpp:1056
UMLScene::slotActivate
void slotActivate()
Definition: umlscene.cpp:1954
UMLScene::toggleShowGrid
void toggleShowGrid()
Definition: umlscene.cpp:3538
UMLScene::getCreateObject
bool getCreateObject() const
Definition: umlscene.cpp:741
UMLScene::showOpSig
bool showOpSig() const
Definition: umlscene.cpp:3674
UMLScene::slotObjectRemoved
void slotObjectRemoved(UMLObject *o)
Definition: umlscene.cpp:828
UMLScene::m_autoIncrementSequence
bool m_autoIncrementSequence
state of auto increment sequence
Definition: umlscene.h:406
UMLScene::generateCollaborationId
int generateCollaborationId()
Definition: umlscene.cpp:639
UMLScene::~UMLScene
virtual ~UMLScene()
Definition: umlscene.cpp:304
UMLScene::setPaste
void setPaste(bool paste)
Definition: umlscene.cpp:2989
UMLScene::isUseCaseDiagram
bool isUseCaseDiagram() const
Definition: umlscene.h:313
UMLScene::createAutoAttributeAssociations2
void createAutoAttributeAssociations2(UMLWidget *widget)
Definition: umlscene.cpp:2823
UMLScene::getPastePoint
QPointF getPastePoint()
Definition: umlscene.cpp:3401
UMLScene::sigFillColorChanged
void sigFillColorChanged(Uml::ID::Type)
Definition: moc_umlscene.cpp:363
UMLScene::fileLoaded
void fileLoaded()
Definition: umlscene.cpp:3691
UMLScene::addObject
void addObject(UMLObject *object)
Definition: umlscene.cpp:4071
UMLScene::useFillColor
bool useFillColor() const
Definition: umlscene.cpp:1374
UMLScene::clearSelected
void clearSelected()
Definition: umlscene.cpp:1459
UMLScene::m_bUseSnapComponentSizeToGrid
bool m_bUseSnapComponentSizeToGrid
Flag to use snap to grid for component size. The default is off.
Definition: umlscene.h:347
UMLScene::alignHorizontalDistribute
void alignHorizontalDistribute()
Definition: umlscene.cpp:4374
UMLScene::isCollaborationDiagram
bool isCollaborationDiagram() const
Definition: umlscene.h:315
UMLScene::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: umlscene.cpp:2998
UMLScene::associationAt
AssociationWidget * associationAt(const QPointF &p)
Definition: umlscene.cpp:1086
UMLScene::makeSelected
void makeSelected(UMLWidget *uw)
Definition: umlscene.cpp:1750
UMLScene::selectedCount
int selectedCount(bool filterText=false) const
Definition: umlscene.cpp:2015
UMLScene::removeAssociations
void removeAssociations(UMLWidget *pWidget)
Definition: umlscene.cpp:2289
UMLScene::selectionSetVisualProperty
void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value)
Definition: umlscene.cpp:1577
UMLScene::m_nCollaborationId
int m_nCollaborationId
Used for creating unique name of collaboration messages.
Definition: umlscene.h:384
UMLScene::selectedMessageWidgets
UMLWidgetList selectedMessageWidgets() const
Definition: umlscene.cpp:1436
UMLScene::selectionUseFillColor
void selectionUseFillColor(bool useFC)
Definition: umlscene.cpp:1492
UMLScene::setUseFillColor
void setUseFillColor(bool ufc)
Definition: umlscene.cpp:1382
UMLScene::optionState
Settings::OptionState & optionState()
Definition: umlscene.cpp:567
UMLScene::m_isActivated
bool m_isActivated
True if the view was activated after the serialization(load).
Definition: umlscene.h:400
UMLScene::activeView
UMLView * activeView() const
Definition: umlscene.cpp:344
UMLScene::loadAssociationsFromXMI
bool loadAssociationsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:4034
UMLScene::addFloatingTextWidget
void addFloatingTextWidget(FloatingTextWidget *pWidget)
Definition: umlscene.cpp:2073
UMLScene::setName
void setName(const QString &name)
Definition: umlscene.cpp:414
UMLScene::widgetAt
UMLWidget * widgetAt(const QPointF &p)
Definition: umlscene.cpp:1070
UMLScene::removeWidgetCmd
void removeWidgetCmd(UMLWidget *o)
Definition: umlscene.cpp:1305
UMLScene::widgetList
const UMLWidgetList widgetList() const
Definition: umlscene.cpp:599
UMLScene::m_bCreateObject
bool m_bCreateObject
Definition: umlscene.h:386
UMLScene::isActivityDiagram
bool isActivityDiagram() const
Definition: umlscene.h:317
UMLScene::m_layoutGrid
LayoutGrid * m_layoutGrid
layout grid in the background
Definition: umlscene.h:405
UMLScene::alignVerticalDistribute
void alignVerticalDistribute()
Definition: umlscene.cpp:4343
UMLScene::removeOwnedWidgets
void removeOwnedWidgets(UMLWidget *o)
Definition: umlscene.cpp:1351
UMLScene::setID
void setID(Uml::ID::Type id)
Definition: umlscene.cpp:446
UMLScene::defaultCanvasSize
static const qreal defaultCanvasSize
The default size of a diagram in pixels.
Definition: umlscene.h:393
UMLScene::gridDotColor
const QColor & gridDotColor() const
Definition: umlscene.cpp:548
UMLScene::selectionSetLineColor
void selectionSetLineColor(const QColor &color)
Definition: umlscene.cpp:1524
UMLScene::updateComponentSizes
void updateComponentSizes()
Definition: umlscene.cpp:3709
UMLScene::setSnapComponentSizeToGrid
void setSnapComponentSizeToGrid(bool bSnap)
Definition: umlscene.cpp:3571
UMLScene::ID
Uml::ID::Type ID() const
Definition: umlscene.cpp:438
UMLScene::loadWidgetFromXMI
UMLWidget * loadWidgetFromXMI(QDomElement &widgetElement)
Definition: umlscene.cpp:3986
UMLViewImageExporterModel
Definition: umlviewimageexportermodel.h:29
UMLViewImageExporter
Definition: umlviewimageexporter.h:29
UMLView
Definition: umlview.h:30
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:101
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:107
WorkToolBar::ToolBar_Buttons
ToolBar_Buttons
Definition: worktoolbar.h:52
classifierwidget.h
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
messagewidgetlist.h
MessageWidgetList
QList< QPointer< MessageWidget > > MessageWidgetList
Definition: messagewidgetlist.h:13
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:92
Uml::DiagramType::Enum
Enum
Definition: basictypes.h:63
Uml::DiagramType::Component
@ Component
Definition: basictypes.h:73
Uml::DiagramType::Collaboration
@ Collaboration
Definition: basictypes.h:70
Uml::DiagramType::Activity
@ Activity
Definition: basictypes.h:72
Uml::DiagramType::State
@ State
Definition: basictypes.h:71
Uml::DiagramType::Object
@ Object
Definition: basictypes.h:76
Uml::DiagramType::UseCase
@ UseCase
Definition: basictypes.h:68
Uml::DiagramType::Sequence
@ Sequence
Definition: basictypes.h:69
Uml::DiagramType::Class
@ Class
Definition: basictypes.h:67
Uml::DiagramType::EntityRelationship
@ EntityRelationship
Definition: basictypes.h:75
Uml::DiagramType::Deployment
@ Deployment
Definition: basictypes.h:74
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
optionstate.h
a
QString a
Definition: petalnode.cpp:13
umlobject.h
umlobjectlist.h
UMLSceneItemList
QList< QGraphicsItem * > UMLSceneItemList
Definition: umlscene.h:54
operator<<
QDebug operator<<(QDebug dbg, UMLScene *item)
Definition: umlscene.cpp:4405
umlwidgetlist.h
UMLWidgetList
QList< QPointer< UMLWidget > > UMLWidgetList
Definition: umlwidgetlist.h:13
widgetbase.h
worktoolbar.h