umbrello: umbrello/umlscene.h Source File

umbrello 2.32.0 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 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLSCENE_H
12 #define UMLSCENE_H
13
14 // local includes
15 #include "associationwidgetlist.h"
16 #include "basictypes.h"
17 #include "classifierwidget.h"
18 #include "messagewidgetlist.h"
19 #include "optionstate.h"
20 #include "umlobject.h"
21 #include "umlobjectlist.h"
22 #include "umlwidgetlist.h"
23 #include "worktoolbar.h"
24 #include "widgetbase.h"
25
26 // Qt includes
27 #include <QDomDocument>
28 #include <QGraphicsScene>
29 #include <QGraphicsItem>
30 #include <QGraphicsSceneMouseEvent>
31 #include <QGraphicsPolygonItem>
32 #include <QKeyEvent>
33 #include <QMouseEvent>
34 #include <QPixmap>
35 #include <QXmlStreamWriter>
36
37 // forward declarations
38 class ClassOptionsPage;
39 class IDChangeLog;
40 class LayoutGrid;
41 class FloatingTextWidget;
42 class ObjectWidget;
43 class ToolBarState;
44 class ToolBarStateFactory;
45 class UMLFolder;
46 class UMLDoc;
47 class UMLAttribute;
48 class UMLCanvasObject;
49 class UMLClassifier;
50 class UMLViewImageExporter;
51 class UMLForeignKeyConstraint;
52 class UMLEntity;
53 class UMLView;
54
55 class QHideEvent;
56 class QMouseEvent;
57 class QPrinter;
58 class QShowEvent;
59 class UMLScenePrivate;
60
61 // migration wrapper for QGraphicsScene items
62 typedef QList<QGraphicsItem*> UMLSceneItemList;
63
69 class UMLScene : public QGraphicsScene
70 {
71 Q_OBJECT
72 public:
73 friend class UMLViewImageExporterModel;
74
75 explicit UMLScene(UMLFolder *parentFolder, UMLView *view = 0);
76 virtual ~UMLScene();
77
78 UMLView* activeView() const;
79
80 // Accessors and other methods dealing with loaded/saved data
81
82 UMLFolder* folder() const;
83 void setFolder(UMLFolder *folder);
84
85 QString documentation() const;
86 void setDocumentation(const QString &doc);
87
88 bool autoIncrementSequence() const;
89 void setAutoIncrementSequence(bool state);
90 QString autoIncrementSequenceValue();
91
92 QString name() const;
93 void setName(const QString &name);
94
95 Uml::DiagramType::Enum type() const;
96 void setType(Uml::DiagramType::Enum type);
97
98 Uml::ID::Type ID() const;
99 void setID(Uml::ID::Type id);
100
101 QPointF pos() const;
102 void setPos(const QPointF &pos);
103
104 const QColor& fillColor() const;
105 void setFillColor(const QColor &color);
106
107 const QColor& lineColor() const;
108 void setLineColor(const QColor &color);
109
110 uint lineWidth() const;
111 void setLineWidth(uint width);
112
113 const QColor& textColor() const;
114 void setTextColor(const QColor& color);
115
116 const QColor& gridDotColor() const;
117 void setGridDotColor(const QColor& color);
118
119 const QColor& backgroundColor() const;
120
121 bool snapToGrid() const;
122 void setSnapToGrid(bool bSnap);
123
124 bool snapComponentSizeToGrid() const;
125 void setSnapComponentSizeToGrid(bool bSnap);
126
127 int snapX() const;
128 int snapY() const;
129 void setSnapSpacing(int x, int y);
130
131 qreal snappedX(qreal x);
132 qreal snappedY(qreal y);
133
134 bool isSnapGridVisible() const;
135 void setSnapGridVisible(bool bShow);
136
137 bool isShowDocumentationIndicator() const;
138 void setShowDocumentationIndicator(bool bShow);
139
140 bool useFillColor() const;
141 void setUseFillColor(bool ufc);
142
143 QFont font() const;
144 void setFont(QFont font, bool changeAllWidgets = false);
145
146 bool showOpSig() const;
147 void setShowOpSig(bool bShowOpSig);
148
149 Settings::OptionState& optionState();
150 void setOptionState(const Settings::OptionState& options);
151
152 const AssociationWidgetList associationList() const;
153 const MessageWidgetList messageList() const;
154 const UMLWidgetList widgetList() const;
155 void addWidgetCmd(UMLWidget* widget);
156 void addWidgetCmd(AssociationWidget *widget);
157
158 bool isOpen() const;
159 void setIsOpen(bool isOpen);
160
161 // End of accessors and methods that only deal with loaded/saved data
163
164 void print(QPrinter *pPrinter, QPainter & pPainter);
165
166 void hideEvent(QHideEvent *he);
167 void showEvent(QShowEvent *se);
168
169 void checkMessages(ObjectWidget * w);
170
171 UMLWidget* findWidget(Uml::ID::Type id);
172
173 AssociationWidget* findAssocWidget(Uml::ID::Type id);
174 AssociationWidget* findAssocWidget(Uml::AssociationType::Enum at,
175 UMLWidget *pWidgetA, UMLWidget *pWidgetB);
176 AssociationWidget* findAssocWidget(UMLWidget *pWidgetA,
177 UMLWidget *pWidgetB, const QString& roleNameB);
178
179 void removeWidget(UMLWidget *o);
180 void removeWidget(AssociationWidget *w);
181 void removeWidgetCmd(UMLWidget *o);
182 private:
183 void removeOwnedWidgets(UMLWidget* o);
184 public:
185
186 UMLWidgetList selectedWidgets() const;
187 AssociationWidgetList selectedAssociationWidgets() const;
188 UMLWidgetList selectedMessageWidgets() const;
189 void clearSelected();
190
191 void moveSelectedBy(qreal dX, qreal dY);
192
193 int selectedCount(bool filterText = false) const;
194
195 void selectionUseFillColor(bool useFC);
196 void selectionSetFont(const QFont &font);
197 void selectionSetLineColor(const QColor &color);
198 void selectionSetLineWidth(uint width);
199 void selectionSetFillColor(const QColor &color);
200 void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value);
201
202 private:
203 void unselectChildrenOfSelectedWidgets();
204 public:
205 void deleteSelection();
206 void resizeSelection();
207
208 void selectAll();
209
210 UMLWidget* widgetOnDiagram(Uml::ID::Type id);
211 UMLWidget *widgetOnDiagram(WidgetBase::WidgetType type);
212
213 bool isSavedInSeparateFile();
214
215 void setMenu(const QPoint& pos);
216
217 void resetToolbar();
218 void triggerToolbarButton(WorkToolBar::ToolBar_Buttons button);
219
220 bool getPaste() const;
221 void setPaste(bool paste);
222
223 void activate();
224
225 AssociationWidgetList selectedAssocs();
226 UMLWidgetList selectedWidgetsExt(bool filterText = true);
227
228 void activateAfterLoad(bool bUseLog = false);
229
230 void endPartialWidgetPaste();
231 void beginPartialWidgetPaste();
232
233 void removeWidgetCmd(AssociationWidget* pAssoc);
234 void removeAssociations(UMLWidget* pWidget);
235 void selectAssociations(bool bSelect);
236
237 void getWidgetAssocs(UMLObject* Obj, AssociationWidgetList & Associations);
238
239 void removeAllAssociations();
240
241 void removeAllWidgets();
242
243 void getDiagram(QPixmap & diagram, const QRectF &rect);
244 void getDiagram(QPainter &painter, const QRectF &source, const QRectF &target = QRectF());
245
246 void copyAsImage(QPixmap*& pix);
247
248 UMLViewImageExporter* getImageExporter();
249
250 bool addAssociation(AssociationWidget* pAssoc, bool isPasteOperation = false);
251
252 void removeAssocInViewAndDoc(AssociationWidget* assoc);
253
254 void addFloatingTextWidget(FloatingTextWidget* pWidget);
255
256 QPointF getPastePoint();
257 void resetPastePoint();
258
259 void setStartedCut();
260
261 void createAutoAssociations(UMLWidget * widget);
262 void createAutoAttributeAssociations(UMLWidget *widget);
263 void createAutoConstraintAssociations(UMLWidget* widget);
264 void createAutoAttributeAssociations2(UMLWidget *widget);
265
266 void updateContainment(UMLCanvasObject *self);
267
268 void setClassWidgetOptions(ClassOptionsPage * page);
269
270 WidgetBase::WidgetType getUniqueSelectionType();
271
272 void clearDiagram();
273
274 void applyLayout(const QString &actionText);
275
276 void toggleSnapToGrid();
277 void toggleSnapComponentSizeToGrid();
278 void toggleShowGrid();
279
280 void fileLoaded();
281
282 void resizeSceneToItems();
283
284 // Load/Save interface:
285
286 virtual void saveToXMI1(QXmlStreamWriter& writer);
287 virtual bool loadFromXMI1(QDomElement & qElement);
288
289 bool loadUISDiagram(QDomElement & qElement);
290 UMLWidget* loadWidgetFromXMI(QDomElement& widgetElement);
291
292 void addObject(UMLObject *object);
293
294 void selectWidgets(qreal px, qreal py, qreal qx, qreal qy);
295 void selectWidgets(UMLWidgetList &widgets);
296 void selectWidget(UMLWidget* widget, QRectF* rect = 0);
297 void selectWidgetsOfAssoc(AssociationWidget *a);
298
299 ObjectWidget * onWidgetLine(const QPointF &point) const;
300 ObjectWidget * onWidgetDestructionBox(const QPointF &point) const;
301
302 UMLWidget* getFirstMultiSelectedWidget() const;
303
304 UMLWidget* widgetAt(const QPointF& p);
305 AssociationWidget* associationAt(const QPointF& p);
306 MessageWidget* messageAt(const QPointF& p);
307
308 void setupNewWidget(UMLWidget *w, bool setPosition=true);
309
310 bool getCreateObject() const;
311 void setCreateObject(bool bCreate);
312
313 int generateCollaborationId();
314
315 UMLSceneItemList collisions(const QPointF &p, int delta = 3);
316
317 bool isClassDiagram() { return type() == Uml::DiagramType::Class; }
318 bool isUseCaseDiagram() { return type() == Uml::DiagramType::UseCase; }
319 bool isSequenceDiagram() { return type() == Uml::DiagramType::Sequence; }
320 bool isCollaborationDiagram() { return type() == Uml::DiagramType::Collaboration; }
321 bool isStateDiagram() { return type() == Uml::DiagramType::State; }
322 bool isActivityDiagram() { return type() == Uml::DiagramType::Activity; }
323 bool isComponentDiagram() { return type() == Uml::DiagramType::Component; }
324 bool isDeploymentDiagram() { return type() == Uml::DiagramType::Deployment; }
325 bool isEntityRelationshipDiagram() { return type() == Uml::DiagramType::EntityRelationship; }
326 bool isObjectDiagram() { return type() == Uml::DiagramType::Object; }
327
328 void setWidgetLink(WidgetBase *w);
329 WidgetBase *widgetLink();
330
331 protected:
332 // Methods and members related to loading/saving
333
334 bool loadWidgetsFromXMI(QDomElement & qElement);
335 bool loadMessagesFromXMI(QDomElement & qElement);
336 bool loadAssociationsFromXMI(QDomElement & qElement);
337 bool loadUisDiagramPresentation(QDomElement & qElement);
338
343 Uml::ID::Type m_nLocalID;
344
345 Uml::ID::Type m_nID;
346 Uml::DiagramType::Enum m_Type;
347 QString m_Name;
348 QString m_Documentation;
349 Settings::OptionState m_Options;
350
351 bool m_bUseSnapToGrid;
352 bool m_bUseSnapComponentSizeToGrid;
353 bool m_isOpen;
354
355 // End of methods and members related to loading/saving
357
358 void dragEnterEvent(QGraphicsSceneDragDropEvent* enterEvent);
359 void dragMoveEvent(QGraphicsSceneDragDropEvent* moveEvent);
360 void dropEvent(QGraphicsSceneDragDropEvent* dropEvent);
361
362 void mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent);
363 void mousePressEvent(QGraphicsSceneMouseEvent* mouseEvent);
364 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* mouseEvent);
365 void mouseReleaseEvent(QGraphicsSceneMouseEvent* mouseEvent);
366 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
367
368 QRectF diagramRect();
369
370 void makeSelected(UMLWidget* uw);
371
372 void updateComponentSizes();
373
374 void findMaxBoundingRectangle(const FloatingTextWidget* ft,
375 qreal& px, qreal& py, qreal& qx, qreal& qy);
376 void forceUpdateWidgetFontMetrics(QPainter *painter);
377
378 virtual void drawBackground(QPainter *painter, const QRectF &rect);
379
380 #if QT_VERSION >= 0x050000
381 #if !(QT_DEPRECATED_SINCE(5, 0))
382 inline QGraphicsItem *itemAt(const QPointF &position) const {
383 QList<QGraphicsItem *> itemsAtPoint = items(position);
384 return itemsAtPoint.isEmpty() ? 0 : itemsAtPoint.first();
385 }
386 #endif
387 #endif
388
389 int m_nCollaborationId;
390 QPointF m_pos;
391 bool m_bCreateObject;
392 bool m_bDrawSelectedOnly;
393 bool m_bPaste;
394 bool m_bStartedCut;
395
396 private:
397 UMLScenePrivate *m_d;
398 static const qreal defaultCanvasSize;
399 static bool m_showDocumentationIndicator;
400
401 UMLView *m_view;
402 UMLFolder *m_pFolder;
403
404 IDChangeLog * m_pIDChangesLog;
405 bool m_isActivated;
406 bool m_bPopupShowing;
407 QPointF m_PastePoint;
408 UMLDoc* m_doc;
409 UMLViewImageExporter* m_pImageExporter;
410 LayoutGrid* m_layoutGrid;
411 bool m_autoIncrementSequence;
412
413 void createAutoAttributeAssociation(UMLClassifier *type,
414 UMLAttribute *attr,
415 UMLWidget *widget);
416 void createAutoConstraintAssociation(UMLEntity* refEntity,
417 UMLForeignKeyConstraint* fkConstraint,
418 UMLWidget* widget);
419
420 public slots:
421 void slotToolBarChanged(int c);
422 void slotObjectCreated(UMLObject * o);
423 void slotObjectRemoved(UMLObject * o);
424 void slotMenuSelection(QAction* action);
425 void slotActivate();
426 void slotCutSuccessful();
427 void slotShowView();
428
429 void alignLeft();
430 void alignRight();
431 void alignTop();
432 void alignBottom();
433 void alignVerticalMiddle();
434 void alignHorizontalMiddle();
435 void alignVerticalDistribute();
436 void alignHorizontalDistribute();
437
438 signals:
439 void sigResetToolBar();
440
441 void sigFillColorChanged(Uml::ID::Type);
442 void sigGridColorChanged(Uml::ID::Type);
443 void sigLineColorChanged(Uml::ID::Type);
444 void sigTextColorChanged(Uml::ID::Type);
445 void sigLineWidthChanged(Uml::ID::Type);
446 void sigSnapToGridToggled(bool);
447 void sigSnapComponentSizeToGridToggled(bool);
448 void sigShowGridToggled(bool);
449 void sigAssociationRemoved(AssociationWidget*);
450 void sigWidgetRemoved(UMLWidget*);
451
452 friend class DiagramProxyWidget;
453 };
454
455 QDebug operator<<(QDebug dbg, UMLScene *item);
456
457 #endif // UMLSCENE_H
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:19
basictypes.h
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
ClassOptionsPage
A dialog page to display the class related options.
Definition: classoptionspage.h:40
ClassifierWidget::VisualProperty
VisualProperty
Definition: classifierwidget.h:42
DiagramProxyWidget
Definition: diagramproxywidget.h:30
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:37
IDChangeLog
Definition: idchangelog.h:27
LayoutGrid
Definition: layoutgrid.h:36
MessageWidget
Displays a message.
Definition: messagewidget.h:41
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:33
Settings::OptionState
Definition: optionstate.h:315
ToolBarStateFactory
Definition: toolbarstatefactory.h:34
ToolBarState
Definition: toolbarstate.h:70
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition: umlcanvasobject.h:37
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLDoc
Definition: umldoc.h:75
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:35
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:35
UMLForeignKeyConstraint
Sets up Foreign Key entity constraint information.
Definition: foreignkeyconstraint.h:33
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLScenePrivate
Definition: umlscene.cpp:117
UMLScene
Definition: umlscene.h:70
UMLScene::removeWidget
void removeWidget(UMLWidget *o)
Definition: umlscene.cpp:1290
UMLScene::alignHorizontalMiddle
void alignHorizontalMiddle()
Definition: umlscene.cpp:4320
UMLScene::createAutoAttributeAssociations
void createAutoAttributeAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2617
UMLScene::onWidgetDestructionBox
ObjectWidget * onWidgetDestructionBox(const QPointF &point) const
Definition: umlscene.cpp:1040
UMLScene::setIsOpen
void setIsOpen(bool isOpen)
Definition: umlscene.cpp:662
UMLScene::toggleSnapComponentSizeToGrid
void toggleSnapComponentSizeToGrid()
Definition: umlscene.cpp:3534
UMLScene::endPartialWidgetPaste
void endPartialWidgetPaste()
Definition: umlscene.cpp:2229
UMLScene::snapComponentSizeToGrid
bool snapComponentSizeToGrid() const
Definition: umlscene.cpp:3568
UMLScene::isDeploymentDiagram
bool isDeploymentDiagram()
Definition: umlscene.h:324
UMLScene::setPos
void setPos(const QPointF &pos)
Definition: umlscene.cpp:467
UMLScene::setSnapGridVisible
void setSnapGridVisible(bool bShow)
Definition: umlscene.cpp:3654
UMLScene::setupNewWidget
void setupNewWidget(UMLWidget *w, bool setPosition=true)
Definition: umlscene.cpp:716
UMLScene::isUseCaseDiagram
bool isUseCaseDiagram()
Definition: umlscene.h:318
UMLScene::font
QFont font() const
Definition: umlscene.cpp:3434
UMLScene::setOptionState
void setOptionState(const Settings::OptionState &options)
Definition: umlscene.cpp:580
UMLScene::alignRight
void alignRight()
Definition: umlscene.cpp:4240
UMLScene::m_showDocumentationIndicator
static bool m_showDocumentationIndicator
Status of documentation indicator.
Definition: umlscene.h:399
UMLScene::m_d
UMLScenePrivate * m_d
Definition: umlscene.h:397
UMLScene::setMenu
void setMenu(const QPoint &pos)
UMLScene::loadUISDiagram
bool loadUISDiagram(QDomElement &qElement)
Definition: umlscene.cpp:4183
UMLScene::snapY
int snapY() const
Definition: umlscene.cpp:3594
UMLScene::associationList
const AssociationWidgetList associationList() const
Definition: umlscene.cpp:590
UMLScene::triggerToolbarButton
void triggerToolbarButton(WorkToolBar::ToolBar_Buttons button)
Definition: umlscene.cpp:2961
UMLScene::snapToGrid
bool snapToGrid() const
Definition: umlscene.cpp:3551
UMLScene::checkMessages
void checkMessages(ObjectWidget *w)
Definition: umlscene.cpp:1120
UMLScene::copyAsImage
void copyAsImage(QPixmap *&pix)
Definition: umlscene.cpp:2882
UMLScene::selectWidgets
void selectWidgets(qreal px, qreal py, qreal qx, qreal qy)
Definition: umlscene.cpp:1785
UMLScene::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlscene.cpp:3843
UMLScene::mouseReleaseEvent
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:1003
UMLScene::setShowDocumentationIndicator
void setShowDocumentationIndicator(bool bShow)
Definition: umlscene.cpp:3671
UMLScene::messageAt
MessageWidget * messageAt(const QPointF &p)
Definition: umlscene.cpp:1106
UMLScene::m_nID
Uml::ID::Type m_nID
The ID of the view. Allocated by UMLDoc.
Definition: umlscene.h:345
UMLScene::snappedX
qreal snappedX(qreal x)
Definition: umlscene.cpp:3610
UMLScene::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: umlscene.cpp:3768
UMLScene::setFolder
void setFolder(UMLFolder *folder)
Definition: umlscene.cpp:341
UMLScene::getImageExporter
UMLViewImageExporter * getImageExporter()
Definition: umlscene.cpp:1951
UMLScene::widgetOnDiagram
UMLWidget * widgetOnDiagram(Uml::ID::Type id)
Definition: umlscene.cpp:1140
UMLScene::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: umlscene.cpp:2969
UMLScene::m_bDrawSelectedOnly
bool m_bDrawSelectedOnly
Definition: umlscene.h:392
UMLScene::createAutoConstraintAssociations
void createAutoConstraintAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2747
UMLScene::m_pFolder
UMLFolder * m_pFolder
The folder in which this UMLView is contained.
Definition: umlscene.h:402
UMLScene::selectedAssociationWidgets
AssociationWidgetList selectedAssociationWidgets() const
Definition: umlscene.cpp:1424
UMLScene::setLineColor
void setLineColor(const QColor &color)
Definition: umlscene.cpp:504
UMLScene::setStartedCut
void setStartedCut()
Definition: umlscene.cpp:3426
UMLScene::autoIncrementSequence
bool autoIncrementSequence() const
Definition: umlscene.cpp:373
UMLScene::sigTextColorChanged
void sigTextColorChanged(Uml::ID::Type)
UMLScene::dragMoveEvent
void dragMoveEvent(QGraphicsSceneDragDropEvent *moveEvent)
Definition: umlscene.cpp:895
UMLScene::hideEvent
void hideEvent(QHideEvent *he)
Definition: umlscene.cpp:775
UMLScene::sigLineWidthChanged
void sigLineWidthChanged(Uml::ID::Type)
UMLScene::removeAllAssociations
void removeAllAssociations()
Definition: umlscene.cpp:2342
UMLScene::getPaste
bool getPaste() const
Definition: umlscene.cpp:2986
UMLScene::sigSnapComponentSizeToGridToggled
void sigSnapComponentSizeToGridToggled(bool)
UMLScene::snappedY
qreal snappedY(qreal y)
Definition: umlscene.cpp:3628
UMLScene::folder
UMLFolder * folder() const
Definition: umlscene.cpp:333
UMLScene::forceUpdateWidgetFontMetrics
void forceUpdateWidgetFontMetrics(QPainter *painter)
Definition: umlscene.cpp:3732
UMLScene::selectionSetLineWidth
void selectionSetLineWidth(uint width)
Definition: umlscene.cpp:1547
UMLScene::getWidgetAssocs
void getWidgetAssocs(UMLObject *Obj, AssociationWidgetList &Associations)
Definition: umlscene.cpp:2326
UMLScene::selectWidgetsOfAssoc
void selectWidgetsOfAssoc(AssociationWidget *a)
Definition: umlscene.cpp:1765
UMLScene::UMLScene
UMLScene(UMLFolder *parentFolder, UMLView *view=0)
Definition: umlscene.cpp:263
UMLScene::m_view
UMLView * m_view
The view to which this scene is related.
Definition: umlscene.h:401
UMLScene::isObjectDiagram
bool isObjectDiagram()
Definition: umlscene.h:326
UMLScene::dropEvent
void dropEvent(QGraphicsSceneDragDropEvent *dropEvent)
Definition: umlscene.cpp:903
UMLScene::fillColor
const QColor & fillColor() const
Definition: umlscene.cpp:475
UMLScene::loadUisDiagramPresentation
bool loadUisDiagramPresentation(QDomElement &qElement)
Definition: umlscene.cpp:4085
UMLScene::removeAllWidgets
void removeAllWidgets()
Definition: umlscene.cpp:2353
UMLScene::selectAssociations
void selectAssociations(bool bSelect)
Definition: umlscene.cpp:2308
UMLScene::selectionSetFillColor
void selectionSetFillColor(const QColor &color)
Definition: umlscene.cpp:1567
UMLScene::toggleSnapToGrid
void toggleSnapToGrid()
Definition: umlscene.cpp:3525
UMLScene::findWidget
UMLWidget * findWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1185
UMLScene::setTextColor
void setTextColor(const QColor &color)
Definition: umlscene.cpp:542
UMLScene::type
Uml::DiagramType::Enum type() const
Definition: umlscene.cpp:427
UMLScene::setShowOpSig
void setShowOpSig(bool bShowOpSig)
Definition: umlscene.cpp:3687
UMLScene::resetToolbar
void resetToolbar()
Definition: umlscene.cpp:2956
UMLScene::isShowDocumentationIndicator
bool isShowDocumentationIndicator() const
Definition: umlscene.cpp:3663
UMLScene::selectedWidgets
UMLWidgetList selectedWidgets() const
Definition: umlscene.cpp:1407
UMLScene::createAutoAssociations
void createAutoAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2427
UMLScene::m_Type
Uml::DiagramType::Enum m_Type
The type of diagram to represent.
Definition: umlscene.h:346
UMLScene::slotCutSuccessful
void slotCutSuccessful()
Definition: umlscene.cpp:3384
UMLScene::activateAfterLoad
void activateAfterLoad(bool bUseLog=false)
Definition: umlscene.cpp:2201
UMLScene::findAssocWidget
AssociationWidget * findAssocWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1214
UMLScene::m_bPaste
bool m_bPaste
Definition: umlscene.h:393
UMLScene::setFont
void setFont(QFont font, bool changeAllWidgets=false)
Definition: umlscene.cpp:3442
UMLScene::activate
void activate()
Definition: umlscene.cpp:1967
UMLScene::addWidgetCmd
void addWidgetCmd(UMLWidget *widget)
Definition: umlscene.cpp:615
UMLScene::unselectChildrenOfSelectedWidgets
void unselectChildrenOfSelectedWidgets()
Definition: umlscene.cpp:1597
UMLScene::getDiagram
void getDiagram(QPixmap &diagram, const QRectF &rect)
Definition: umlscene.cpp:1891
UMLScene::beginPartialWidgetPaste
void beginPartialWidgetPaste()
Definition: umlscene.cpp:2220
UMLScene::m_pIDChangesLog
IDChangeLog * m_pIDChangesLog
LocalID Changes Log for paste actions.
Definition: umlscene.h:404
UMLScene::alignLeft
void alignLeft()
Definition: umlscene.cpp:4222
UMLScene::setAutoIncrementSequence
void setAutoIncrementSequence(bool state)
Definition: umlscene.cpp:378
UMLScene::setType
void setType(Uml::DiagramType::Enum type)
Definition: umlscene.cpp:435
UMLScene::removeAssocInViewAndDoc
void removeAssocInViewAndDoc(AssociationWidget *assoc)
Definition: umlscene.cpp:2260
UMLScene::m_isOpen
bool m_isOpen
Flag is set to true when diagram is open, i.e. shown to the user.
Definition: umlscene.h:353
UMLScene::alignBottom
void alignBottom()
Definition: umlscene.cpp:4275
UMLScene::sigAssociationRemoved
void sigAssociationRemoved(AssociationWidget *)
UMLScene::createAutoConstraintAssociation
void createAutoConstraintAssociation(UMLEntity *refEntity, UMLForeignKeyConstraint *fkConstraint, UMLWidget *widget)
Definition: umlscene.cpp:2796
UMLScene::sigSnapToGridToggled
void sigSnapToGridToggled(bool)
UMLScene::setWidgetLink
void setWidgetLink(WidgetBase *w)
Definition: umlscene.cpp:4419
UMLScene::drawBackground
virtual void drawBackground(QPainter *painter, const QRectF &rect)
Definition: umlscene.cpp:3743
UMLScene::diagramRect
QRectF diagramRect()
Definition: umlscene.cpp:1397
UMLScene::selectWidget
void selectWidget(UMLWidget *widget, QRectF *rect=0)
Definition: umlscene.cpp:1836
UMLScene::addAssociation
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Definition: umlscene.cpp:2110
UMLScene::resizeSelection
void resizeSelection()
Definition: umlscene.cpp:1676
UMLScene::isComponentDiagram
bool isComponentDiagram()
Definition: umlscene.h:323
UMLScene::selectAll
void selectAll()
Definition: umlscene.cpp:1699
UMLScene::setDocumentation
void setDocumentation(const QString &doc)
Definition: umlscene.cpp:365
UMLScene::textColor
const QColor & textColor() const
Definition: umlscene.cpp:532
UMLScene::backgroundColor
const QColor & backgroundColor() const
Definition: umlscene.cpp:1371
UMLScene::snapX
int snapX() const
Definition: umlscene.cpp:3586
UMLScene::updateContainment
void updateContainment(UMLCanvasObject *self)
Definition: umlscene.cpp:2375
UMLScene::findMaxBoundingRectangle
void findMaxBoundingRectangle(const FloatingTextWidget *ft, qreal &px, qreal &py, qreal &qx, qreal &qy)
Definition: umlscene.cpp:2859
UMLScene::sigLineColorChanged
void sigLineColorChanged(Uml::ID::Type)
UMLScene::sigResetToolBar
void sigResetToolBar()
UMLScene::sigShowGridToggled
void sigShowGridToggled(bool)
UMLScene::setFillColor
void setFillColor(const QColor &color)
Definition: umlscene.cpp:485
UMLScene::selectedWidgetsExt
UMLWidgetList selectedWidgetsExt(bool filterText=true)
Definition: umlscene.cpp:2045
UMLScene::loadMessagesFromXMI
bool loadMessagesFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:4012
UMLScene::onWidgetLine
ObjectWidget * onWidgetLine(const QPointF &point) const
Definition: umlscene.cpp:1015
UMLScene::selectedAssocs
AssociationWidgetList selectedAssocs()
Definition: umlscene.cpp:2064
UMLScene::clearDiagram
void clearDiagram()
Definition: umlscene.cpp:3501
UMLScene::setSnapToGrid
void setSnapToGrid(bool bSnap)
Definition: umlscene.cpp:3559
UMLScene::setGridDotColor
void setGridDotColor(const QColor &color)
Definition: umlscene.cpp:563
UMLScene::collisions
UMLSceneItemList collisions(const QPointF &p, int delta=3)
Definition: umlscene.cpp:1742
UMLScene::name
QString name() const
Definition: umlscene.cpp:411
UMLScene::moveSelectedBy
void moveSelectedBy(qreal dX, qreal dY)
Definition: umlscene.cpp:1484
UMLScene::resizeSceneToItems
void resizeSceneToItems()
Definition: umlscene.cpp:3705
UMLScene::lineColor
const QColor & lineColor() const
Definition: umlscene.cpp:494
UMLScene::isClassDiagram
bool isClassDiagram()
Definition: umlscene.h:317
UMLScene::lineWidth
uint lineWidth() const
Definition: umlscene.cpp:513
UMLScene::isSnapGridVisible
bool isSnapGridVisible() const
Definition: umlscene.cpp:3646
UMLScene::slotShowView
void slotShowView()
Definition: umlscene.cpp:3395
UMLScene::resetPastePoint
void resetPastePoint()
Definition: umlscene.cpp:3417
UMLScene::messageList
const MessageWidgetList messageList() const
Definition: umlscene.cpp:630
UMLScene::mouseMoveEvent
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:954
UMLScene::deleteSelection
void deleteSelection()
Definition: umlscene.cpp:1614
UMLScene::setClassWidgetOptions
void setClassWidgetOptions(ClassOptionsPage *page)
Definition: umlscene.cpp:3456
UMLScene::m_bPopupShowing
bool m_bPopupShowing
Status of a popupmenu on view. True - a popup is on view.
Definition: umlscene.h:406
UMLScene::isCollaborationDiagram
bool isCollaborationDiagram()
Definition: umlscene.h:320
UMLScene::documentation
QString documentation() const
Definition: umlscene.cpp:357
UMLScene::sigGridColorChanged
void sigGridColorChanged(Uml::ID::Type)
UMLScene::sigWidgetRemoved
void sigWidgetRemoved(UMLWidget *)
UMLScene::m_Options
Settings::OptionState m_Options
Options used by view.
Definition: umlscene.h:349
UMLScene::setLineWidth
void setLineWidth(uint width)
Definition: umlscene.cpp:523
UMLScene::m_nLocalID
Uml::ID::Type m_nLocalID
Definition: umlscene.h:343
UMLScene::slotObjectCreated
void slotObjectCreated(UMLObject *o)
Definition: umlscene.cpp:797
UMLScene::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:967
UMLScene::isOpen
bool isOpen() const
Definition: umlscene.cpp:653
UMLScene::m_PastePoint
QPointF m_PastePoint
The offset at which to paste the clipboard.
Definition: umlscene.h:407
UMLScene::setSnapSpacing
void setSnapSpacing(int x, int y)
Definition: umlscene.cpp:3602
UMLScene::alignVerticalMiddle
void alignVerticalMiddle()
Definition: umlscene.cpp:4292
UMLScene::dragEnterEvent
void dragEnterEvent(QGraphicsSceneDragDropEvent *enterEvent)
Definition: umlscene.cpp:849
UMLScene::print
void print(QPrinter *pPrinter, QPainter &pPainter)
Definition: umlscene.cpp:670
UMLScene::showEvent
void showEvent(QShowEvent *se)
Definition: umlscene.cpp:762
UMLScene::loadWidgetsFromXMI
bool loadWidgetsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3965
UMLScene::m_bStartedCut
bool m_bStartedCut
Flag if view/children started cut operation.
Definition: umlscene.h:394
UMLScene::pos
QPointF pos() const
Definition: umlscene.cpp:459
UMLScene::autoIncrementSequenceValue
QString autoIncrementSequenceValue()
Definition: umlscene.cpp:386
UMLScene::setCreateObject
void setCreateObject(bool bCreate)
Definition: umlscene.cpp:754
UMLScene::mouseDoubleClickEvent
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:986
UMLScene::isStateDiagram
bool isStateDiagram()
Definition: umlscene.h:321
UMLScene::slotToolBarChanged
void slotToolBarChanged(int c)
Definition: umlscene.cpp:788
UMLScene::alignTop
void alignTop()
Definition: umlscene.cpp:4257
UMLScene::isSavedInSeparateFile
bool isSavedInSeparateFile()
Definition: umlscene.cpp:1708
UMLScene::m_doc
UMLDoc * m_doc
Pointer to the UMLDoc.
Definition: umlscene.h:408
UMLScene::m_pImageExporter
UMLViewImageExporter * m_pImageExporter
Used to export the view.
Definition: umlscene.h:409
UMLScene::applyLayout
void applyLayout(const QString &actionText)
Definition: umlscene.cpp:3511
UMLScene::m_bUseSnapToGrid
bool m_bUseSnapToGrid
Flag to use snap to grid. The default is off.
Definition: umlscene.h:351
UMLScene::selectionSetFont
void selectionSetFont(const QFont &font)
Definition: umlscene.cpp:1515
UMLScene::getUniqueSelectionType
WidgetBase::WidgetType getUniqueSelectionType()
Definition: umlscene.cpp:3477
UMLScene::m_Documentation
QString m_Documentation
The documentation of the diagram.
Definition: umlscene.h:348
UMLScene::m_pos
QPointF m_pos
Definition: umlscene.h:390
UMLScene::widgetLink
WidgetBase * widgetLink()
Definition: umlscene.cpp:4424
UMLScene::createAutoAttributeAssociation
void createAutoAttributeAssociation(UMLClassifier *type, UMLAttribute *attr, UMLWidget *widget)
Definition: umlscene.cpp:2685
UMLScene::m_Name
QString m_Name
The name of the diagram.
Definition: umlscene.h:347
UMLScene::getFirstMultiSelectedWidget
UMLWidget * getFirstMultiSelectedWidget() const
Definition: umlscene.cpp:1061
UMLScene::slotActivate
void slotActivate()
Definition: umlscene.cpp:1959
UMLScene::toggleShowGrid
void toggleShowGrid()
Definition: umlscene.cpp:3543
UMLScene::getCreateObject
bool getCreateObject() const
Definition: umlscene.cpp:746
UMLScene::showOpSig
bool showOpSig() const
Definition: umlscene.cpp:3679
UMLScene::slotObjectRemoved
void slotObjectRemoved(UMLObject *o)
Definition: umlscene.cpp:833
UMLScene::m_autoIncrementSequence
bool m_autoIncrementSequence
state of auto increment sequence
Definition: umlscene.h:411
UMLScene::generateCollaborationId
int generateCollaborationId()
Definition: umlscene.cpp:644
UMLScene::~UMLScene
virtual ~UMLScene()
Definition: umlscene.cpp:309
UMLScene::setPaste
void setPaste(bool paste)
Definition: umlscene.cpp:2994
UMLScene::isEntityRelationshipDiagram
bool isEntityRelationshipDiagram()
Definition: umlscene.h:325
UMLScene::createAutoAttributeAssociations2
void createAutoAttributeAssociations2(UMLWidget *widget)
Definition: umlscene.cpp:2828
UMLScene::getPastePoint
QPointF getPastePoint()
Definition: umlscene.cpp:3406
UMLScene::sigFillColorChanged
void sigFillColorChanged(Uml::ID::Type)
UMLScene::fileLoaded
void fileLoaded()
Definition: umlscene.cpp:3696
UMLScene::addObject
void addObject(UMLObject *object)
Definition: umlscene.cpp:4076
UMLScene::useFillColor
bool useFillColor() const
Definition: umlscene.cpp:1379
UMLScene::clearSelected
void clearSelected()
Definition: umlscene.cpp:1464
UMLScene::m_bUseSnapComponentSizeToGrid
bool m_bUseSnapComponentSizeToGrid
Flag to use snap to grid for component size. The default is off.
Definition: umlscene.h:352
UMLScene::alignHorizontalDistribute
void alignHorizontalDistribute()
Definition: umlscene.cpp:4379
UMLScene::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: umlscene.cpp:3003
UMLScene::associationAt
AssociationWidget * associationAt(const QPointF &p)
Definition: umlscene.cpp:1091
UMLScene::makeSelected
void makeSelected(UMLWidget *uw)
Definition: umlscene.cpp:1755
UMLScene::selectedCount
int selectedCount(bool filterText=false) const
Definition: umlscene.cpp:2020
UMLScene::removeAssociations
void removeAssociations(UMLWidget *pWidget)
Definition: umlscene.cpp:2294
UMLScene::selectionSetVisualProperty
void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value)
Definition: umlscene.cpp:1582
UMLScene::m_nCollaborationId
int m_nCollaborationId
Used for creating unique name of collaboration messages.
Definition: umlscene.h:389
UMLScene::selectedMessageWidgets
UMLWidgetList selectedMessageWidgets() const
Definition: umlscene.cpp:1441
UMLScene::selectionUseFillColor
void selectionUseFillColor(bool useFC)
Definition: umlscene.cpp:1497
UMLScene::setUseFillColor
void setUseFillColor(bool ufc)
Definition: umlscene.cpp:1387
UMLScene::optionState
Settings::OptionState & optionState()
Definition: umlscene.cpp:572
UMLScene::m_isActivated
bool m_isActivated
True if the view was activated after the serialization(load).
Definition: umlscene.h:405
UMLScene::activeView
UMLView * activeView() const
Definition: umlscene.cpp:349
UMLScene::loadAssociationsFromXMI
bool loadAssociationsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:4039
UMLScene::addFloatingTextWidget
void addFloatingTextWidget(FloatingTextWidget *pWidget)
Definition: umlscene.cpp:2078
UMLScene::setName
void setName(const QString &name)
Definition: umlscene.cpp:419
UMLScene::widgetAt
UMLWidget * widgetAt(const QPointF &p)
Definition: umlscene.cpp:1075
UMLScene::removeWidgetCmd
void removeWidgetCmd(UMLWidget *o)
Definition: umlscene.cpp:1310
UMLScene::widgetList
const UMLWidgetList widgetList() const
Definition: umlscene.cpp:604
UMLScene::isActivityDiagram
bool isActivityDiagram()
Definition: umlscene.h:322
UMLScene::m_bCreateObject
bool m_bCreateObject
Definition: umlscene.h:391
UMLScene::isSequenceDiagram
bool isSequenceDiagram()
Definition: umlscene.h:319
UMLScene::m_layoutGrid
LayoutGrid * m_layoutGrid
layout grid in the background
Definition: umlscene.h:410
UMLScene::alignVerticalDistribute
void alignVerticalDistribute()
Definition: umlscene.cpp:4348
UMLScene::removeOwnedWidgets
void removeOwnedWidgets(UMLWidget *o)
Definition: umlscene.cpp:1356
UMLScene::setID
void setID(Uml::ID::Type id)
Definition: umlscene.cpp:451
UMLScene::defaultCanvasSize
static const qreal defaultCanvasSize
The default size of a diagram in pixels.
Definition: umlscene.h:398
UMLScene::gridDotColor
const QColor & gridDotColor() const
Definition: umlscene.cpp:553
UMLScene::selectionSetLineColor
void selectionSetLineColor(const QColor &color)
Definition: umlscene.cpp:1529
UMLScene::updateComponentSizes
void updateComponentSizes()
Definition: umlscene.cpp:3714
UMLScene::setSnapComponentSizeToGrid
void setSnapComponentSizeToGrid(bool bSnap)
Definition: umlscene.cpp:3576
UMLScene::ID
Uml::ID::Type ID() const
Definition: umlscene.cpp:443
UMLScene::loadWidgetFromXMI
UMLWidget * loadWidgetFromXMI(QDomElement &widgetElement)
Definition: umlscene.cpp:3991
UMLViewImageExporterModel
Definition: umlviewimageexportermodel.h:34
UMLViewImageExporter
Definition: umlviewimageexporter.h:34
UMLView
Definition: umlview.h:35
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:106
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:112
WorkToolBar::ToolBar_Buttons
ToolBar_Buttons
Definition: worktoolbar.h:57
classifierwidget.h
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
messagewidgetlist.h
MessageWidgetList
QList< QPointer< MessageWidget > > MessageWidgetList
Definition: messagewidgetlist.h:18
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:106
Uml::DiagramType::Enum
Enum
Definition: basictypes.h:77
Uml::DiagramType::Component
@ Component
Definition: basictypes.h:87
Uml::DiagramType::Collaboration
@ Collaboration
Definition: basictypes.h:84
Uml::DiagramType::Activity
@ Activity
Definition: basictypes.h:86
Uml::DiagramType::State
@ State
Definition: basictypes.h:85
Uml::DiagramType::Object
@ Object
Definition: basictypes.h:90
Uml::DiagramType::UseCase
@ UseCase
Definition: basictypes.h:82
Uml::DiagramType::Sequence
@ Sequence
Definition: basictypes.h:83
Uml::DiagramType::Class
@ Class
Definition: basictypes.h:81
Uml::DiagramType::EntityRelationship
@ EntityRelationship
Definition: basictypes.h:89
Uml::DiagramType::Deployment
@ Deployment
Definition: basictypes.h:88
Uml::ID::Type
std::string Type
Definition: basictypes.h:385
optionstate.h
a
QString a
Definition: petalnode.cpp:18
umlobject.h
umlobjectlist.h
UMLSceneItemList
QList< QGraphicsItem * > UMLSceneItemList
Definition: umlscene.h:59
operator<<
QDebug operator<<(QDebug dbg, UMLScene *item)
Definition: umlscene.cpp:4410
umlwidgetlist.h
UMLWidgetList
QList< QPointer< UMLWidget > > UMLWidgetList
Definition: umlwidgetlist.h:17
widgetbase.h
worktoolbar.h