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

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

- File List
- File Members

umlscene.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2022 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 AlignmentGuide;
34 class ClassOptionsPage;
35 class IDChangeLog;
36 class LayoutGrid;
37 class FloatingTextWidget;
38 class ObjectWidget;
39 class ToolBarState;
40 class ToolBarStateFactory;
41 class UMLFolder;
42 class UMLDoc;
43 class UMLAttribute;
44 class UMLCanvasObject;
45 class UMLClassifier;
46 class UMLViewImageExporter;
47 class UMLForeignKeyConstraint;
48 class UMLEntity;
49 class UMLView;
50
51 class QHideEvent;
52 class QMouseEvent;
53 class QPrinter;
54 class QShowEvent;
55 class UMLScenePrivate;
56
57// migration wrapper for QGraphicsScene items
58 typedef QList<QGraphicsItem*> UMLSceneItemList;
59
65 class UMLScene : public QGraphicsScene
66{
67 Q_OBJECT
68 public:
69 friend class UMLViewImageExporterModel;
70
71 explicit UMLScene(UMLFolder *parentFolder, UMLView *view = nullptr);
72 virtual ~UMLScene();
73
74 UMLView* activeView() const;
75
76 // Accessors and other methods dealing with loaded/saved data
77
78 UMLFolder* folder() const;
79 void setFolder(UMLFolder *folder);
80
81 QString documentation() const;
82 void setDocumentation(const QString &doc);
83
84 bool autoIncrementSequence() const;
85 void setAutoIncrementSequence(bool state);
86 QString autoIncrementSequenceValue();
87
88 QString name() const;
89 void setName(const QString &name);
90
91 Uml::DiagramType::Enum type() const;
92 void setType(Uml::DiagramType::Enum type);
93
94 Uml::ID::Type ID() const;
95 void setID(Uml::ID::Type id);
96
97 QPointF pos() const;
98 void setPos(const QPointF &pos);
99
100 const QColor& fillColor() const;
101 void setFillColor(const QColor &color);
102
103 const QColor& lineColor() const;
104 void setLineColor(const QColor &color);
105
106 uint lineWidth() const;
107 void setLineWidth(uint width);
108
109 const QColor& textColor() const;
110 void setTextColor(const QColor& color);
111
112 const QColor& gridDotColor() const;
113 void setGridDotColor(const QColor& color);
114
115 const QColor& backgroundColor() const;
116
117 bool snapToGrid() const;
118 void setSnapToGrid(bool bSnap);
119
120 bool snapComponentSizeToGrid() const;
121 void setSnapComponentSizeToGrid(bool bSnap);
122
123 int snapX() const;
124 int snapY() const;
125 void setSnapSpacing(int x, int y);
126
127 qreal snappedX(qreal x);
128 qreal snappedY(qreal y);
129
130 bool isSnapGridVisible() const;
131 void setSnapGridVisible(bool bShow);
132
133 bool isShowDocumentationIndicator() const;
134 void setShowDocumentationIndicator(bool bShow);
135
136 AlignmentGuide* alignmentGuide() const;
137
138 bool useFillColor() const;
139 void setUseFillColor(bool ufc);
140
141 QFont font() const;
142 void setFont(QFont font, bool changeAllWidgets = false);
143
144 bool showOpSig() const;
145 void setShowOpSig(bool bShowOpSig);
146
147 Settings::OptionState& optionState();
148 void setOptionState(const Settings::OptionState& options);
149
150 AssociationWidgetList associationList() const;
151 MessageWidgetList messageList() const;
152 UMLWidgetList widgetList() const;
153 void addWidgetCmd(UMLWidget* widget);
154 void addWidgetCmd(AssociationWidget *widget);
155
156 bool isOpen() const;
157 void setIsOpen(bool isOpen);
158
159 // End of accessors and methods that only deal with loaded/saved data
161
162 void print(QPrinter *pPrinter, QPainter & pPainter);
163
164 void hideEvent(QHideEvent *he);
165 void showEvent(QShowEvent *se);
166
167 void checkMessages(ObjectWidget * w);
168
169 UMLWidget* findWidget(Uml::ID::Type id);
170
171 AssociationWidget* findAssocWidget(Uml::ID::Type id);
172 AssociationWidget* findAssocWidget(Uml::AssociationType::Enum at,
173 UMLWidget *pWidgetA, UMLWidget *pWidgetB);
174 AssociationWidget* findAssocWidget(UMLWidget *pWidgetA,
175 UMLWidget *pWidgetB, const QString& roleNameB);
176
177 void removeWidget(UMLWidget *o);
178 void removeWidget(AssociationWidget *w);
179 void removeWidgetCmd(UMLWidget *o);
180 private:
181 void removeOwnedWidgets(UMLWidget* o);
182 public:
183
184 UMLWidgetList selectedWidgets() const;
185 AssociationWidgetList selectedAssociationWidgets() const;
186 UMLWidgetList selectedMessageWidgets() const;
187 void clearSelected();
188
189 void moveSelectedBy(qreal dX, qreal dY);
190
191 int selectedCount(bool filterText = false) const;
192
193 void selectionUseFillColor(bool useFC);
194 void selectionSetFont(const QFont &font);
195 void selectionSetLineColor(const QColor &color);
196 void selectionSetLineWidth(uint width);
197 void selectionSetFillColor(const QColor &color);
198 void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value);
199
200 private:
201 void unselectChildrenOfSelectedWidgets();
202 public:
203 void deleteSelection();
204 void resizeSelection();
205
206 void selectAll();
207
208 UMLWidget* widgetOnDiagram(Uml::ID::Type id);
209 UMLWidget *widgetOnDiagram(WidgetBase::WidgetType type);
210
211 bool isSavedInSeparateFile();
212
213 void setMenu(const QPoint& pos);
214
215 void resetToolbar();
216 void triggerToolbarButton(WorkToolBar::ToolBar_Buttons button);
217
218 bool getPaste() const;
219 void setPaste(bool paste);
220
221 void activate();
222
223 AssociationWidgetList selectedAssocs();
224 UMLWidgetList selectedWidgetsExt(bool filterText = true);
225
226 void activateAfterLoad(bool bUseLog = false);
227
228 void endPartialWidgetPaste();
229 void beginPartialWidgetPaste();
230
231 void removeWidgetCmd(AssociationWidget* pAssoc);
232 void removeAssociations(UMLWidget* pWidget);
233 void selectAssociations(bool bSelect);
234
235 void getWidgetAssocs(UMLObject* Obj, AssociationWidgetList & Associations);
236
237 void removeAllAssociations();
238
239 void removeAllWidgets();
240
241 void getDiagram(QPixmap & diagram, const QRectF &rect);
242 void getDiagram(QPainter &painter, const QRectF &source, const QRectF &target = QRectF());
243
244 void copyAsImage(QPixmap*& pix);
245
246 UMLViewImageExporter* getImageExporter();
247
248 bool addAssociation(AssociationWidget* pAssoc, bool isPasteOperation = false);
249
250 void removeAssocInViewAndDoc(AssociationWidget* assoc);
251
252 void addFloatingTextWidget(FloatingTextWidget* pWidget);
253
254 QPointF getPastePoint();
255 void resetPastePoint();
256
257 void setStartedCut();
258
259 void createAutoAssociations(UMLWidget * widget);
260 void createAutoAttributeAssociations(UMLWidget *widget);
261 void createAutoConstraintAssociations(UMLWidget* widget);
262 void createAutoAttributeAssociations2(UMLWidget *widget);
263
264 void updateContainment(UMLCanvasObject *self);
265
266 void setClassWidgetOptions(ClassOptionsPage * page);
267
268 WidgetBase::WidgetType getUniqueSelectionType();
269
270 void clearDiagram();
271
272 void applyLayout(const QString &actionText);
273
274 void toggleSnapToGrid();
275 void toggleSnapComponentSizeToGrid();
276 void toggleShowGrid();
277
278 void fileLoaded();
279
280 // Load/Save interface:
281
282 virtual void saveToXMI(QXmlStreamWriter& writer);
283 virtual bool loadFromXMI(QDomElement & qElement);
284
285 bool loadUISDiagram(QDomElement & qElement);
286 UMLWidget* loadWidgetFromXMI(QDomElement& widgetElement);
287
288 void addObject(UMLObject *object);
289
290 void selectWidgets(qreal px, qreal py, qreal qx, qreal qy);
291 void selectWidgets(UMLWidgetList &widgets);
292 void selectWidget(UMLWidget *widget, QRectF *rect = nullptr);
293 void selectWidgetsOfAssoc(AssociationWidget *a);
294
295 ObjectWidget * onWidgetLine(const QPointF &point) const;
296 ObjectWidget * onWidgetDestructionBox(const QPointF &point) const;
297
298 UMLWidget* getFirstMultiSelectedWidget() const;
299
300 UMLWidget* widgetAt(const QPointF& p);
301 AssociationWidget* associationAt(const QPointF& p);
302 MessageWidget* messageAt(const QPointF& p);
303
304 void setupNewWidget(UMLWidget *w, bool setPosition=true);
305
306 bool getCreateObject() const;
307 void setCreateObject(bool bCreate);
308
309 int generateCollaborationId();
310
311 UMLSceneItemList collisions(const QPointF &p, int delta = 3);
312
313 bool isClassDiagram() const { return type() == Uml::DiagramType::Class; }
314 bool isUseCaseDiagram() const { return type() == Uml::DiagramType::UseCase; }
315 bool isSequenceDiagram() const { return type() == Uml::DiagramType::Sequence; }
316 bool isCollaborationDiagram() const { return type() == Uml::DiagramType::Collaboration; }
317 bool isStateDiagram() const { return type() == Uml::DiagramType::State; }
318 bool isActivityDiagram() const { return type() == Uml::DiagramType::Activity; }
319 bool isComponentDiagram() const { return type() == Uml::DiagramType::Component; }
320 bool isDeploymentDiagram() const { return type() == Uml::DiagramType::Deployment; }
321 bool isEntityRelationshipDiagram() const { return type() == Uml::DiagramType::EntityRelationship; }
322 bool isObjectDiagram() const { return type() == Uml::DiagramType::Object; }
323
324 void setWidgetLink(WidgetBase *w);
325 WidgetBase *widgetLink();
326
327 static qreal maxCanvasSize();
328
329 void updateCanvasSizeEstimate(qreal x, qreal y, qreal w, qreal h);
330 void updateSceneRect();
331
332 qreal fixX() const;
333 qreal fixY() const;
334
335 protected:
336 // Methods and members related to loading/saving
337
338 bool loadWidgetsFromXMI(QDomElement & qElement);
339 bool loadMessagesFromXMI(QDomElement & qElement);
340 bool loadAssociationsFromXMI(QDomElement & qElement);
341 bool loadUisDiagramPresentation(QDomElement & qElement);
342
347 Uml::ID::Type m_nLocalID;
348
349 Uml::ID::Type m_nID;
350 Uml::DiagramType::Enum m_Type;
351 QString m_Name;
352 QString m_Documentation;
353 Settings::OptionState m_Options;
354
355 bool m_bUseSnapToGrid;
356 bool m_bUseSnapComponentSizeToGrid;
357 bool m_isOpen;
358
359 // End of methods and members related to loading/saving
361
362 void dragEnterEvent(QGraphicsSceneDragDropEvent* enterEvent);
363 void dragMoveEvent(QGraphicsSceneDragDropEvent* moveEvent);
364 void dropEvent(QGraphicsSceneDragDropEvent* dropEvent);
365
366 void mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent);
367 void mousePressEvent(QGraphicsSceneMouseEvent* mouseEvent);
368 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* mouseEvent);
369 void mouseReleaseEvent(QGraphicsSceneMouseEvent* mouseEvent);
370 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
371
372 QRectF diagramRect();
373
374 void makeSelected(UMLWidget* uw);
375
376 void updateComponentSizes();
377
378 void findMaxBoundingRectangle(const FloatingTextWidget* ft,
379 qreal& px, qreal& py, qreal& qx, qreal& qy);
380 void forceUpdateWidgetFontMetrics(QPainter *painter);
381
382 virtual void drawBackground(QPainter *painter, const QRectF &rect);
383 virtual void drawForeground(QPainter *painter, const QRectF &rect);
384
385#if !(QT_DEPRECATED_SINCE(5, 0))
386 inline QGraphicsItem *itemAt(const QPointF &position) const {
387 QList<QGraphicsItem *> itemsAtPoint = items(position);
388 return itemsAtPoint.isEmpty() ? nullptr : itemsAtPoint.first();
389 }
390#endif
391
392 int m_nCollaborationId;
393 QPointF m_pos;
394 bool m_bCreateObject;
395 bool m_bDrawSelectedOnly;
396 bool m_bPaste;
397 bool m_bStartedCut;
398
399 private:
400 UMLScenePrivate *m_d;
401 static const qreal s_defaultCanvasWidth;
402 static const qreal s_defaultCanvasHeight;
403 static const qreal s_maxCanvasSize;
404 static const qreal s_sceneBorder;
405 static bool s_showDocumentationIndicator;
406
407 UMLView *m_view;
408 UMLFolder *m_pFolder;
409
410 IDChangeLog * m_pIDChangesLog;
411 bool m_isActivated;
412 bool m_bPopupShowing;
413 QPointF m_PastePoint;
414 UMLDoc* m_doc;
415 UMLViewImageExporter* m_pImageExporter;
416 LayoutGrid* m_layoutGrid;
417 AlignmentGuide* m_alignmentGuide;
418 bool m_autoIncrementSequence;
419 qreal m_minX, m_minY;
420 qreal m_maxX, m_maxY;
421 qreal m_fixX;
422 qreal m_fixY;
423
424 void createAutoAttributeAssociation(UMLClassifier *type,
425 UMLAttribute *attr,
426 UMLWidget *widget);
427 void createAutoConstraintAssociation(UMLEntity* refEntity,
428 UMLForeignKeyConstraint* fkConstraint,
429 UMLWidget* widget);
430
431 public Q_SLOTS:
432 void slotToolBarChanged(int c);
433 void slotObjectCreated(UMLObject * o);
434 void slotObjectRemoved(UMLObject * o);
435 void slotMenuSelection(QAction* action);
436 void slotActivate();
437 void slotCutSuccessful();
438 void slotShowView();
439
440 void alignLeft();
441 void alignRight();
442 void alignTop();
443 void alignBottom();
444 void alignVerticalMiddle();
445 void alignHorizontalMiddle();
446 void alignVerticalDistribute();
447 void alignHorizontalDistribute();
448
449Q_SIGNALS:
450 void sigResetToolBar();
451
452 void sigFillColorChanged(Uml::ID::Type);
453 void sigGridColorChanged(Uml::ID::Type);
454 void sigLineColorChanged(Uml::ID::Type);
455 void sigTextColorChanged(Uml::ID::Type);
456 void sigLineWidthChanged(Uml::ID::Type);
457 void sigSnapToGridToggled(bool);
458 void sigSnapComponentSizeToGridToggled(bool);
459 void sigShowGridToggled(bool);
460 void sigAssociationRemoved(AssociationWidget*);
461 void sigWidgetRemoved(UMLWidget*);
462
463 friend class DiagramProxyWidget;
464};
465
466QDebug operator<<(QDebug dbg, UMLScene *item);
467
468#endif // UMLSCENE_H
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition: associationwidgetlist.h:17
basictypes.h
AlignmentGuide
Manages alignment guides and snapping for widget movement.
Definition: alignmentguide.h:27
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:311
ToolBarStateFactory
Definition: toolbarstatefactory.h:29
ToolBarState
Definition: toolbarstate.h:65
UMLAttribute
Sets up attribute information.
Definition: umlattribute.h:23
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition: umlcanvasobject.h:32
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: umlclassifier.h:35
UMLDoc
Definition: umldoc.h:63
UMLEntity
Non-graphical Information for an Entity.
Definition: umlentity.h:30
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: umlfolder.h:30
UMLForeignKeyConstraint
Sets up Foreign Key entity constraint information.
Definition: umlforeignkeyconstraint.h:28
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLScene
Definition: umlscene.h:66
UMLScene::removeWidget
void removeWidget(UMLWidget *o)
Definition: umlscene.cpp:1318
UMLScene::isComponentDiagram
bool isComponentDiagram() const
Definition: umlscene.h:319
UMLScene::alignHorizontalMiddle
void alignHorizontalMiddle()
Definition: umlscene.cpp:4537
UMLScene::createAutoAttributeAssociations
void createAutoAttributeAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2650
UMLScene::loadFromXMI
virtual bool loadFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3925
UMLScene::onWidgetDestructionBox
ObjectWidget * onWidgetDestructionBox(const QPointF &point) const
Definition: umlscene.cpp:1068
UMLScene::setIsOpen
void setIsOpen(bool isOpen)
Definition: umlscene.cpp:687
UMLScene::toggleSnapComponentSizeToGrid
void toggleSnapComponentSizeToGrid()
Definition: umlscene.cpp:3567
UMLScene::endPartialWidgetPaste
void endPartialWidgetPaste()
Definition: umlscene.cpp:2265
UMLScene::snapComponentSizeToGrid
bool snapComponentSizeToGrid() const
Definition: umlscene.cpp:3601
UMLScene::setPos
void setPos(const QPointF &pos)
Definition: umlscene.cpp:487
UMLScene::setSnapGridVisible
void setSnapGridVisible(bool bShow)
Definition: umlscene.cpp:3695
UMLScene::setupNewWidget
void setupNewWidget(UMLWidget *w, bool setPosition=true)
Definition: umlscene.cpp:741
UMLScene::s_defaultCanvasWidth
static const qreal s_defaultCanvasWidth
The default width of a diagram in pixels.
Definition: umlscene.h:401
UMLScene::m_maxY
qreal m_maxY
Gather data for estimating required canvas size (used during loadFromXMI)
Definition: umlscene.h:420
UMLScene::s_showDocumentationIndicator
static bool s_showDocumentationIndicator
Status of documentation indicator.
Definition: umlscene.h:405
UMLScene::isClassDiagram
bool isClassDiagram() const
Definition: umlscene.h:313
UMLScene::font
QFont font() const
Definition: umlscene.cpp:3468
UMLScene::setOptionState
void setOptionState(const Settings::OptionState &options)
Definition: umlscene.cpp:600
UMLScene::s_sceneBorder
static const qreal s_sceneBorder
A border around the bounding rectangle of the elements in the scene.
Definition: umlscene.h:404
UMLScene::alignRight
void alignRight()
Definition: umlscene.cpp:4457
UMLScene::m_d
UMLScenePrivate * m_d
Definition: umlscene.h:400
UMLScene::setMenu
void setMenu(const QPoint &pos)
UMLScene::loadUISDiagram
bool loadUISDiagram(QDomElement &qElement)
Definition: umlscene.cpp:4400
UMLScene::snapY
int snapY() const
Definition: umlscene.cpp:3627
UMLScene::triggerToolbarButton
void triggerToolbarButton(WorkToolBar::ToolBar_Buttons button)
Definition: umlscene.cpp:2994
UMLScene::snapToGrid
bool snapToGrid() const
Definition: umlscene.cpp:3584
UMLScene::isObjectDiagram
bool isObjectDiagram() const
Definition: umlscene.h:322
UMLScene::checkMessages
void checkMessages(ObjectWidget *w)
Definition: umlscene.cpp:1148
UMLScene::copyAsImage
void copyAsImage(QPixmap *&pix)
Definition: umlscene.cpp:2915
UMLScene::selectWidgets
void selectWidgets(qreal px, qreal py, qreal qx, qreal qy)
Definition: umlscene.cpp:1811
UMLScene::mouseReleaseEvent
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:1031
UMLScene::setShowDocumentationIndicator
void setShowDocumentationIndicator(bool bShow)
Definition: umlscene.cpp:3712
UMLScene::messageAt
MessageWidget * messageAt(const QPointF &p)
Definition: umlscene.cpp:1134
UMLScene::m_nID
Uml::ID::Type m_nID
The ID of the view. Allocated by UMLDoc.
Definition: umlscene.h:349
UMLScene::snappedX
qreal snappedX(qreal x)
Definition: umlscene.cpp:3651
UMLScene::selectWidget
void selectWidget(UMLWidget *widget, QRectF *rect=nullptr)
Definition: umlscene.cpp:1862
UMLScene::setFolder
void setFolder(UMLFolder *folder)
Definition: umlscene.cpp:361
UMLScene::getImageExporter
UMLViewImageExporter * getImageExporter()
Definition: umlscene.cpp:1979
UMLScene::drawForeground
virtual void drawForeground(QPainter *painter, const QRectF &rect)
Definition: umlscene.cpp:3815
UMLScene::widgetOnDiagram
UMLWidget * widgetOnDiagram(Uml::ID::Type id)
Definition: umlscene.cpp:1168
UMLScene::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: umlscene.cpp:3002
UMLScene::m_bDrawSelectedOnly
bool m_bDrawSelectedOnly
Definition: umlscene.h:395
UMLScene::createAutoConstraintAssociations
void createAutoConstraintAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2780
UMLScene::m_pFolder
UMLFolder * m_pFolder
The folder in which this UMLView is contained.
Definition: umlscene.h:408
UMLScene::selectedAssociationWidgets
AssociationWidgetList selectedAssociationWidgets() const
Definition: umlscene.cpp:1452
UMLScene::setLineColor
void setLineColor(const QColor &color)
Definition: umlscene.cpp:524
UMLScene::setStartedCut
void setStartedCut()
Definition: umlscene.cpp:3460
UMLScene::autoIncrementSequence
bool autoIncrementSequence() const
Definition: umlscene.cpp:393
UMLScene::sigTextColorChanged
void sigTextColorChanged(Uml::ID::Type)
UMLScene::dragMoveEvent
void dragMoveEvent(QGraphicsSceneDragDropEvent *moveEvent)
Definition: umlscene.cpp:924
UMLScene::hideEvent
void hideEvent(QHideEvent *he)
Definition: umlscene.cpp:799
UMLScene::maxCanvasSize
static qreal maxCanvasSize()
Definition: umlscene.cpp:346
UMLScene::sigLineWidthChanged
void sigLineWidthChanged(Uml::ID::Type)
UMLScene::removeAllAssociations
void removeAllAssociations()
Definition: umlscene.cpp:2377
UMLScene::getPaste
bool getPaste() const
Definition: umlscene.cpp:3019
UMLScene::sigSnapComponentSizeToGridToggled
void sigSnapComponentSizeToGridToggled(bool)
UMLScene::snappedY
qreal snappedY(qreal y)
Definition: umlscene.cpp:3669
UMLScene::folder
UMLFolder * folder() const
Definition: umlscene.cpp:353
UMLScene::forceUpdateWidgetFontMetrics
void forceUpdateWidgetFontMetrics(QPainter *painter)
Definition: umlscene.cpp:3763
UMLScene::selectionSetLineWidth
void selectionSetLineWidth(uint width)
Definition: umlscene.cpp:1573
UMLScene::updateSceneRect
void updateSceneRect()
Definition: umlscene.cpp:4675
UMLScene::getWidgetAssocs
void getWidgetAssocs(UMLObject *Obj, AssociationWidgetList &Associations)
Definition: umlscene.cpp:2361
UMLScene::selectWidgetsOfAssoc
void selectWidgetsOfAssoc(AssociationWidget *a)
Definition: umlscene.cpp:1791
UMLScene::m_view
UMLView * m_view
The view to which this scene is related.
Definition: umlscene.h:407
UMLScene::dropEvent
void dropEvent(QGraphicsSceneDragDropEvent *dropEvent)
Definition: umlscene.cpp:932
UMLScene::fillColor
const QColor & fillColor() const
Definition: umlscene.cpp:495
UMLScene::loadUisDiagramPresentation
bool loadUisDiagramPresentation(QDomElement &qElement)
Definition: umlscene.cpp:4299
UMLScene::removeAllWidgets
void removeAllWidgets()
Definition: umlscene.cpp:2388
UMLScene::selectAssociations
void selectAssociations(bool bSelect)
Definition: umlscene.cpp:2343
UMLScene::selectionSetFillColor
void selectionSetFillColor(const QColor &color)
Definition: umlscene.cpp:1593
UMLScene::toggleSnapToGrid
void toggleSnapToGrid()
Definition: umlscene.cpp:3558
UMLScene::findWidget
UMLWidget * findWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1213
UMLScene::isEntityRelationshipDiagram
bool isEntityRelationshipDiagram() const
Definition: umlscene.h:321
UMLScene::setTextColor
void setTextColor(const QColor &color)
Definition: umlscene.cpp:562
UMLScene::type
Uml::DiagramType::Enum type() const
Definition: umlscene.cpp:447
UMLScene::setShowOpSig
void setShowOpSig(bool bShowOpSig)
Definition: umlscene.cpp:3728
UMLScene::resetToolbar
void resetToolbar()
Definition: umlscene.cpp:2989
UMLScene::isShowDocumentationIndicator
bool isShowDocumentationIndicator() const
Definition: umlscene.cpp:3704
UMLScene::s_maxCanvasSize
static const qreal s_maxCanvasSize
The maximum supported canvas size.
Definition: umlscene.h:403
UMLScene::selectedWidgets
UMLWidgetList selectedWidgets() const
Definition: umlscene.cpp:1435
UMLScene::createAutoAssociations
void createAutoAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2462
UMLScene::m_Type
Uml::DiagramType::Enum m_Type
The type of diagram to represent.
Definition: umlscene.h:350
UMLScene::slotCutSuccessful
void slotCutSuccessful()
Definition: umlscene.cpp:3418
UMLScene::s_defaultCanvasHeight
static const qreal s_defaultCanvasHeight
The default height of a diagram in pixels.
Definition: umlscene.h:402
UMLScene::activateAfterLoad
void activateAfterLoad(bool bUseLog=false)
Definition: umlscene.cpp:2237
UMLScene::findAssocWidget
AssociationWidget * findAssocWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1242
UMLScene::m_bPaste
bool m_bPaste
Definition: umlscene.h:396
UMLScene::setFont
void setFont(QFont font, bool changeAllWidgets=false)
Definition: umlscene.cpp:3476
UMLScene::activate
void activate()
Definition: umlscene.cpp:1995
UMLScene::addWidgetCmd
void addWidgetCmd(UMLWidget *widget)
Definition: umlscene.cpp:638
UMLScene::fixY
qreal fixY() const
Definition: umlscene.cpp:4692
UMLScene::unselectChildrenOfSelectedWidgets
void unselectChildrenOfSelectedWidgets()
Definition: umlscene.cpp:1623
UMLScene::getDiagram
void getDiagram(QPixmap &diagram, const QRectF &rect)
Definition: umlscene.cpp:1917
UMLScene::beginPartialWidgetPaste
void beginPartialWidgetPaste()
Definition: umlscene.cpp:2256
UMLScene::m_pIDChangesLog
IDChangeLog * m_pIDChangesLog
LocalID Changes Log for paste actions.
Definition: umlscene.h:410
UMLScene::alignLeft
void alignLeft()
Definition: umlscene.cpp:4439
UMLScene::setAutoIncrementSequence
void setAutoIncrementSequence(bool state)
Definition: umlscene.cpp:398
UMLScene::setType
void setType(Uml::DiagramType::Enum type)
Definition: umlscene.cpp:455
UMLScene::removeAssocInViewAndDoc
void removeAssocInViewAndDoc(AssociationWidget *assoc)
Definition: umlscene.cpp:2296
UMLScene::m_isOpen
bool m_isOpen
Flag is set to true when diagram is open, i.e. shown to the user.
Definition: umlscene.h:357
UMLScene::alignBottom
void alignBottom()
Definition: umlscene.cpp:4492
UMLScene::sigAssociationRemoved
void sigAssociationRemoved(AssociationWidget *)
UMLScene::createAutoConstraintAssociation
void createAutoConstraintAssociation(UMLEntity *refEntity, UMLForeignKeyConstraint *fkConstraint, UMLWidget *widget)
Definition: umlscene.cpp:2829
UMLScene::sigSnapToGridToggled
void sigSnapToGridToggled(bool)
UMLScene::setWidgetLink
void setWidgetLink(WidgetBase *w)
Definition: umlscene.cpp:4636
UMLScene::widgetList
UMLWidgetList widgetList() const
Definition: umlscene.cpp:627
UMLScene::drawBackground
virtual void drawBackground(QPainter *painter, const QRectF &rect)
Definition: umlscene.cpp:3774
UMLScene::m_minY
qreal m_minY
Gather data for estimating required canvas size (used during loadFromXMI)
Definition: umlscene.h:419
UMLScene::diagramRect
QRectF diagramRect()
Definition: umlscene.cpp:1425
UMLScene::addAssociation
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Definition: umlscene.cpp:2146
UMLScene::isSequenceDiagram
bool isSequenceDiagram() const
Definition: umlscene.h:315
UMLScene::resizeSelection
void resizeSelection()
Definition: umlscene.cpp:1702
UMLScene::selectAll
void selectAll()
Definition: umlscene.cpp:1725
UMLScene::m_fixY
qreal m_fixY
Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622.
Definition: umlscene.h:422
UMLScene::setDocumentation
void setDocumentation(const QString &doc)
Definition: umlscene.cpp:385
UMLScene::textColor
const QColor & textColor() const
Definition: umlscene.cpp:552
UMLScene::backgroundColor
const QColor & backgroundColor() const
Definition: umlscene.cpp:1399
UMLScene::snapX
int snapX() const
Definition: umlscene.cpp:3619
UMLScene::updateContainment
void updateContainment(UMLCanvasObject *self)
Definition: umlscene.cpp:2410
UMLScene::findMaxBoundingRectangle
void findMaxBoundingRectangle(const FloatingTextWidget *ft, qreal &px, qreal &py, qreal &qx, qreal &qy)
Definition: umlscene.cpp:2892
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:505
UMLScene::selectedWidgetsExt
UMLWidgetList selectedWidgetsExt(bool filterText=true)
Definition: umlscene.cpp:2073
UMLScene::loadMessagesFromXMI
bool loadMessagesFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:4224
UMLScene::onWidgetLine
ObjectWidget * onWidgetLine(const QPointF &point) const
Definition: umlscene.cpp:1043
UMLScene::selectedAssocs
AssociationWidgetList selectedAssocs()
Definition: umlscene.cpp:2092
UMLScene::clearDiagram
void clearDiagram()
Definition: umlscene.cpp:3535
UMLScene::setSnapToGrid
void setSnapToGrid(bool bSnap)
Definition: umlscene.cpp:3592
UMLScene::setGridDotColor
void setGridDotColor(const QColor &color)
Definition: umlscene.cpp:583
UMLScene::collisions
UMLSceneItemList collisions(const QPointF &p, int delta=3)
Definition: umlscene.cpp:1768
UMLScene::name
QString name() const
Definition: umlscene.cpp:431
UMLScene::moveSelectedBy
void moveSelectedBy(qreal dX, qreal dY)
Definition: umlscene.cpp:1510
UMLScene::lineColor
const QColor & lineColor() const
Definition: umlscene.cpp:514
UMLScene::lineWidth
uint lineWidth() const
Definition: umlscene.cpp:533
UMLScene::m_alignmentGuide
AlignmentGuide * m_alignmentGuide
alignment guide for widget snapping
Definition: umlscene.h:417
UMLScene::m_minX
qreal m_minX
Definition: umlscene.h:419
UMLScene::isSnapGridVisible
bool isSnapGridVisible() const
Definition: umlscene.cpp:3687
UMLScene::slotShowView
void slotShowView()
Definition: umlscene.cpp:3429
UMLScene::resetPastePoint
void resetPastePoint()
Definition: umlscene.cpp:3451
UMLScene::mouseMoveEvent
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:982
UMLScene::deleteSelection
void deleteSelection()
Definition: umlscene.cpp:1640
UMLScene::itemAt
QGraphicsItem * itemAt(const QPointF &position) const
Definition: umlscene.h:386
UMLScene::fixX
qreal fixX() const
Definition: umlscene.cpp:4684
UMLScene::setClassWidgetOptions
void setClassWidgetOptions(ClassOptionsPage *page)
Definition: umlscene.cpp:3490
UMLScene::m_bPopupShowing
bool m_bPopupShowing
Status of a popupmenu on view. True - a popup is on view.
Definition: umlscene.h:412
UMLScene::documentation
QString documentation() const
Definition: umlscene.cpp:377
UMLScene::sigGridColorChanged
void sigGridColorChanged(Uml::ID::Type)
UMLScene::sigWidgetRemoved
void sigWidgetRemoved(UMLWidget *)
UMLScene::isDeploymentDiagram
bool isDeploymentDiagram() const
Definition: umlscene.h:320
UMLScene::m_Options
Settings::OptionState m_Options
Options used by view.
Definition: umlscene.h:353
UMLScene::setLineWidth
void setLineWidth(uint width)
Definition: umlscene.cpp:543
UMLScene::m_nLocalID
Uml::ID::Type m_nLocalID
Definition: umlscene.h:347
UMLScene::m_fixX
qreal m_fixX
Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622.
Definition: umlscene.h:421
UMLScene::slotObjectCreated
void slotObjectCreated(UMLObject *o)
Definition: umlscene.cpp:821
UMLScene::isStateDiagram
bool isStateDiagram() const
Definition: umlscene.h:317
UMLScene::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:995
UMLScene::isOpen
bool isOpen() const
Definition: umlscene.cpp:678
UMLScene::m_PastePoint
QPointF m_PastePoint
The offset at which to paste the clipboard.
Definition: umlscene.h:413
UMLScene::setSnapSpacing
void setSnapSpacing(int x, int y)
Definition: umlscene.cpp:3643
UMLScene::alignVerticalMiddle
void alignVerticalMiddle()
Definition: umlscene.cpp:4509
UMLScene::dragEnterEvent
void dragEnterEvent(QGraphicsSceneDragDropEvent *enterEvent)
Definition: umlscene.cpp:878
UMLScene::print
void print(QPrinter *pPrinter, QPainter &pPainter)
Definition: umlscene.cpp:695
UMLScene::showEvent
void showEvent(QShowEvent *se)
Definition: umlscene.cpp:786
UMLScene::loadWidgetsFromXMI
bool loadWidgetsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:4177
UMLScene::m_bStartedCut
bool m_bStartedCut
Flag if view/children started cut operation.
Definition: umlscene.h:397
UMLScene::pos
QPointF pos() const
Definition: umlscene.cpp:479
UMLScene::autoIncrementSequenceValue
QString autoIncrementSequenceValue()
Definition: umlscene.cpp:406
UMLScene::setCreateObject
void setCreateObject(bool bCreate)
Definition: umlscene.cpp:778
UMLScene::mouseDoubleClickEvent
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: umlscene.cpp:1014
UMLScene::slotToolBarChanged
void slotToolBarChanged(int c)
Definition: umlscene.cpp:812
UMLScene::alignTop
void alignTop()
Definition: umlscene.cpp:4474
UMLScene::isSavedInSeparateFile
bool isSavedInSeparateFile()
Definition: umlscene.cpp:1734
UMLScene::m_doc
UMLDoc * m_doc
Pointer to the UMLDoc.
Definition: umlscene.h:414
UMLScene::m_pImageExporter
UMLViewImageExporter * m_pImageExporter
Used to export the view.
Definition: umlscene.h:415
UMLScene::applyLayout
void applyLayout(const QString &actionText)
Definition: umlscene.cpp:3545
UMLScene::m_bUseSnapToGrid
bool m_bUseSnapToGrid
Flag to use snap to grid. The default is off.
Definition: umlscene.h:355
UMLScene::selectionSetFont
void selectionSetFont(const QFont &font)
Definition: umlscene.cpp:1541
UMLScene::getUniqueSelectionType
WidgetBase::WidgetType getUniqueSelectionType()
Definition: umlscene.cpp:3511
UMLScene::m_Documentation
QString m_Documentation
The documentation of the diagram.
Definition: umlscene.h:352
UMLScene::m_pos
QPointF m_pos
Definition: umlscene.h:393
UMLScene::widgetLink
WidgetBase * widgetLink()
Definition: umlscene.cpp:4641
UMLScene::updateCanvasSizeEstimate
void updateCanvasSizeEstimate(qreal x, qreal y, qreal w, qreal h)
Definition: umlscene.cpp:4660
UMLScene::createAutoAttributeAssociation
void createAutoAttributeAssociation(UMLClassifier *type, UMLAttribute *attr, UMLWidget *widget)
Definition: umlscene.cpp:2718
UMLScene::alignmentGuide
AlignmentGuide * alignmentGuide() const
Definition: umlscene.cpp:3635
UMLScene::associationList
AssociationWidgetList associationList() const
Definition: umlscene.cpp:613
UMLScene::m_Name
QString m_Name
The name of the diagram.
Definition: umlscene.h:351
UMLScene::getFirstMultiSelectedWidget
UMLWidget * getFirstMultiSelectedWidget() const
Definition: umlscene.cpp:1089
UMLScene::slotActivate
void slotActivate()
Definition: umlscene.cpp:1987
UMLScene::toggleShowGrid
void toggleShowGrid()
Definition: umlscene.cpp:3576
UMLScene::getCreateObject
bool getCreateObject() const
Definition: umlscene.cpp:770
UMLScene::showOpSig
bool showOpSig() const
Definition: umlscene.cpp:3720
UMLScene::slotObjectRemoved
void slotObjectRemoved(UMLObject *o)
Definition: umlscene.cpp:862
UMLScene::m_autoIncrementSequence
bool m_autoIncrementSequence
state of auto increment sequence
Definition: umlscene.h:418
UMLScene::generateCollaborationId
int generateCollaborationId()
Definition: umlscene.cpp:669
UMLScene::~UMLScene
virtual ~UMLScene()
Definition: umlscene.cpp:314
UMLScene::setPaste
void setPaste(bool paste)
Definition: umlscene.cpp:3027
UMLScene::messageList
MessageWidgetList messageList() const
Definition: umlscene.cpp:655
UMLScene::isUseCaseDiagram
bool isUseCaseDiagram() const
Definition: umlscene.h:314
UMLScene::createAutoAttributeAssociations2
void createAutoAttributeAssociations2(UMLWidget *widget)
Definition: umlscene.cpp:2861
UMLScene::getPastePoint
QPointF getPastePoint()
Definition: umlscene.cpp:3440
UMLScene::sigFillColorChanged
void sigFillColorChanged(Uml::ID::Type)
UMLScene::fileLoaded
void fileLoaded()
Definition: umlscene.cpp:3737
UMLScene::addObject
void addObject(UMLObject *object)
Definition: umlscene.cpp:4290
UMLScene::useFillColor
bool useFillColor() const
Definition: umlscene.cpp:1407
UMLScene::clearSelected
void clearSelected()
Definition: umlscene.cpp:1490
UMLScene::m_bUseSnapComponentSizeToGrid
bool m_bUseSnapComponentSizeToGrid
Flag to use snap to grid for component size. The default is off.
Definition: umlscene.h:356
UMLScene::alignHorizontalDistribute
void alignHorizontalDistribute()
Definition: umlscene.cpp:4596
UMLScene::isCollaborationDiagram
bool isCollaborationDiagram() const
Definition: umlscene.h:316
UMLScene::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: umlscene.cpp:3036
UMLScene::associationAt
AssociationWidget * associationAt(const QPointF &p)
Definition: umlscene.cpp:1119
UMLScene::makeSelected
void makeSelected(UMLWidget *uw)
Definition: umlscene.cpp:1781
UMLScene::selectedCount
int selectedCount(bool filterText=false) const
Definition: umlscene.cpp:2048
UMLScene::removeAssociations
void removeAssociations(UMLWidget *pWidget)
Definition: umlscene.cpp:2329
UMLScene::selectionSetVisualProperty
void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value)
Definition: umlscene.cpp:1608
UMLScene::m_nCollaborationId
int m_nCollaborationId
Used for creating unique name of collaboration messages.
Definition: umlscene.h:392
UMLScene::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: umlscene.cpp:3852
UMLScene::selectedMessageWidgets
UMLWidgetList selectedMessageWidgets() const
Definition: umlscene.cpp:1469
UMLScene::selectionUseFillColor
void selectionUseFillColor(bool useFC)
Definition: umlscene.cpp:1523
UMLScene::setUseFillColor
void setUseFillColor(bool ufc)
Definition: umlscene.cpp:1415
UMLScene::optionState
Settings::OptionState & optionState()
Definition: umlscene.cpp:592
UMLScene::m_isActivated
bool m_isActivated
True if the view was activated after the deserialization(load).
Definition: umlscene.h:411
UMLScene::activeView
UMLView * activeView() const
Definition: umlscene.cpp:369
UMLScene::loadAssociationsFromXMI
bool loadAssociationsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:4252
UMLScene::addFloatingTextWidget
void addFloatingTextWidget(FloatingTextWidget *pWidget)
Definition: umlscene.cpp:2106
UMLScene::setName
void setName(const QString &name)
Definition: umlscene.cpp:439
UMLScene::widgetAt
UMLWidget * widgetAt(const QPointF &p)
Definition: umlscene.cpp:1103
UMLScene::removeWidgetCmd
void removeWidgetCmd(UMLWidget *o)
Definition: umlscene.cpp:1338
UMLScene::m_bCreateObject
bool m_bCreateObject
Definition: umlscene.h:394
UMLScene::isActivityDiagram
bool isActivityDiagram() const
Definition: umlscene.h:318
UMLScene::m_layoutGrid
LayoutGrid * m_layoutGrid
layout grid in the background
Definition: umlscene.h:416
UMLScene::alignVerticalDistribute
void alignVerticalDistribute()
Definition: umlscene.cpp:4565
UMLScene::removeOwnedWidgets
void removeOwnedWidgets(UMLWidget *o)
Definition: umlscene.cpp:1384
UMLScene::setID
void setID(Uml::ID::Type id)
Definition: umlscene.cpp:471
UMLScene::gridDotColor
const QColor & gridDotColor() const
Definition: umlscene.cpp:573
UMLScene::selectionSetLineColor
void selectionSetLineColor(const QColor &color)
Definition: umlscene.cpp:1555
UMLScene::updateComponentSizes
void updateComponentSizes()
Definition: umlscene.cpp:3745
UMLScene::m_maxX
qreal m_maxX
Definition: umlscene.h:420
UMLScene::setSnapComponentSizeToGrid
void setSnapComponentSizeToGrid(bool bSnap)
Definition: umlscene.cpp:3609
UMLScene::ID
Uml::ID::Type ID() const
Definition: umlscene.cpp:463
UMLScene::loadWidgetFromXMI
UMLWidget * loadWidgetFromXMI(QDomElement &widgetElement)
Definition: umlscene.cpp:4203
UMLScenePrivate
Definition: umlscene.cpp:113
UMLView
Definition: umlview.h:30
UMLViewImageExporter
Definition: umlviewimageexporter.h:23
UMLViewImageExporterModel
Definition: umlviewimageexportermodel.h:29
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:15
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:58
operator<<
QDebug operator<<(QDebug dbg, UMLScene *item)
Definition: umlscene.cpp:4627
umlwidgetlist.h
UMLWidgetList
QList< QPointer< UMLWidget > > UMLWidgetList
Definition: umlwidgetlist.h:15
widgetbase.h
worktoolbar.h