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

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

- File List
- File Members

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 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 AssociationWidgetList associationList() const;
148 MessageWidgetList messageList() const;
149 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 // Load/Save interface:
278
279 virtual void saveToXMI(QXmlStreamWriter& writer);
280 virtual bool loadFromXMI(QDomElement & qElement);
281
282 bool loadUISDiagram(QDomElement & qElement);
283 UMLWidget* loadWidgetFromXMI(QDomElement& widgetElement);
284
285 void addObject(UMLObject *object);
286
287 void selectWidgets(qreal px, qreal py, qreal qx, qreal qy);
288 void selectWidgets(UMLWidgetList &widgets);
289 void selectWidget(UMLWidget* widget, QRectF* rect = 0);
290 void selectWidgetsOfAssoc(AssociationWidget *a);
291
292 ObjectWidget * onWidgetLine(const QPointF &point) const;
293 ObjectWidget * onWidgetDestructionBox(const QPointF &point) const;
294
295 UMLWidget* getFirstMultiSelectedWidget() const;
296
297 UMLWidget* widgetAt(const QPointF& p);
298 AssociationWidget* associationAt(const QPointF& p);
299 MessageWidget* messageAt(const QPointF& p);
300
301 void setupNewWidget(UMLWidget *w, bool setPosition=true);
302
303 bool getCreateObject() const;
304 void setCreateObject(bool bCreate);
305
306 int generateCollaborationId();
307
308 UMLSceneItemList collisions(const QPointF &p, int delta = 3);
309
310 bool isClassDiagram() const { return type() == Uml::DiagramType::Class; }
311 bool isUseCaseDiagram() const { return type() == Uml::DiagramType::UseCase; }
312 bool isSequenceDiagram() const { return type() == Uml::DiagramType::Sequence; }
313 bool isCollaborationDiagram() const { return type() == Uml::DiagramType::Collaboration; }
314 bool isStateDiagram() const { return type() == Uml::DiagramType::State; }
315 bool isActivityDiagram() const { return type() == Uml::DiagramType::Activity; }
316 bool isComponentDiagram() const { return type() == Uml::DiagramType::Component; }
317 bool isDeploymentDiagram() const { return type() == Uml::DiagramType::Deployment; }
318 bool isEntityRelationshipDiagram() const { return type() == Uml::DiagramType::EntityRelationship; }
319 bool isObjectDiagram() const { return type() == Uml::DiagramType::Object; }
320
321 void setWidgetLink(WidgetBase *w);
322 WidgetBase *widgetLink();
323
324 static qreal maxCanvasSize();
325
326 void updateCanvasSizeEstimate(qreal x, qreal y, qreal w, qreal h);
327 void updateSceneRect();
328
329 qreal fixX() const;
330 qreal fixY() const;
331
332 protected:
333 // Methods and members related to loading/saving
334
335 bool loadWidgetsFromXMI(QDomElement & qElement);
336 bool loadMessagesFromXMI(QDomElement & qElement);
337 bool loadAssociationsFromXMI(QDomElement & qElement);
338 bool loadUisDiagramPresentation(QDomElement & qElement);
339
344 Uml::ID::Type m_nLocalID;
345
346 Uml::ID::Type m_nID;
347 Uml::DiagramType::Enum m_Type;
348 QString m_Name;
349 QString m_Documentation;
350 Settings::OptionState m_Options;
351
352 bool m_bUseSnapToGrid;
353 bool m_bUseSnapComponentSizeToGrid;
354 bool m_isOpen;
355
356 // End of methods and members related to loading/saving
358
359 void dragEnterEvent(QGraphicsSceneDragDropEvent* enterEvent);
360 void dragMoveEvent(QGraphicsSceneDragDropEvent* moveEvent);
361 void dropEvent(QGraphicsSceneDragDropEvent* dropEvent);
362
363 void mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent);
364 void mousePressEvent(QGraphicsSceneMouseEvent* mouseEvent);
365 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* mouseEvent);
366 void mouseReleaseEvent(QGraphicsSceneMouseEvent* mouseEvent);
367 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* event);
368
369 QRectF diagramRect();
370
371 void makeSelected(UMLWidget* uw);
372
373 void updateComponentSizes();
374
375 void findMaxBoundingRectangle(const FloatingTextWidget* ft,
376 qreal& px, qreal& py, qreal& qx, qreal& qy);
377 void forceUpdateWidgetFontMetrics(QPainter *painter);
378
379 virtual void drawBackground(QPainter *painter, const QRectF &rect);
380
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
388 int m_nCollaborationId;
389 QPointF m_pos;
390 bool m_bCreateObject;
391 bool m_bDrawSelectedOnly;
392 bool m_bPaste;
393 bool m_bStartedCut;
394
395 private:
396 UMLScenePrivate *m_d;
397 static const qreal s_defaultCanvasWidth;
398 static const qreal s_defaultCanvasHeight;
399 static const qreal s_maxCanvasSize;
400 static const qreal s_sceneBorder;
401 static bool s_showDocumentationIndicator;
402
403 UMLView *m_view;
404 UMLFolder *m_pFolder;
405
406 IDChangeLog * m_pIDChangesLog;
407 bool m_isActivated;
408 bool m_bPopupShowing;
409 QPointF m_PastePoint;
410 UMLDoc* m_doc;
411 UMLViewImageExporter* m_pImageExporter;
412 LayoutGrid* m_layoutGrid;
413 bool m_autoIncrementSequence;
414 qreal m_minX, m_minY;
415 qreal m_maxX, m_maxY;
416 qreal m_fixX;
417 qreal m_fixY;
418
419 void createAutoAttributeAssociation(UMLClassifier *type,
420 UMLAttribute *attr,
421 UMLWidget *widget);
422 void createAutoConstraintAssociation(UMLEntity* refEntity,
423 UMLForeignKeyConstraint* fkConstraint,
424 UMLWidget* widget);
425
426 public slots:
427 void slotToolBarChanged(int c);
428 void slotObjectCreated(UMLObject * o);
429 void slotObjectRemoved(UMLObject * o);
430 void slotMenuSelection(QAction* action);
431 void slotActivate();
432 void slotCutSuccessful();
433 void slotShowView();
434
435 void alignLeft();
436 void alignRight();
437 void alignTop();
438 void alignBottom();
439 void alignVerticalMiddle();
440 void alignHorizontalMiddle();
441 void alignVerticalDistribute();
442 void alignHorizontalDistribute();
443
444signals:
445 void sigResetToolBar();
446
447 void sigFillColorChanged(Uml::ID::Type);
448 void sigGridColorChanged(Uml::ID::Type);
449 void sigLineColorChanged(Uml::ID::Type);
450 void sigTextColorChanged(Uml::ID::Type);
451 void sigLineWidthChanged(Uml::ID::Type);
452 void sigSnapToGridToggled(bool);
453 void sigSnapComponentSizeToGridToggled(bool);
454 void sigShowGridToggled(bool);
455 void sigAssociationRemoved(AssociationWidget*);
456 void sigWidgetRemoved(UMLWidget*);
457
458 friend class DiagramProxyWidget;
459};
460
461QDebug operator<<(QDebug dbg, UMLScene *item);
462
463#endif // UMLSCENE_H
associationwidgetlist.h
AssociationWidgetList
QList< QPointer< AssociationWidget > > AssociationWidgetList
Definition associationwidgetlist.h:17
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:308
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:63
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:113
UMLScene
Definition umlscene.h:65
UMLScene::removeWidget
void removeWidget(UMLWidget *o)
Definition umlscene.cpp:1312
UMLScene::isComponentDiagram
bool isComponentDiagram() const
Definition umlscene.h:316
UMLScene::alignHorizontalMiddle
void alignHorizontalMiddle()
Definition umlscene.cpp:4486
UMLScene::createAutoAttributeAssociations
void createAutoAttributeAssociations(UMLWidget *widget)
Definition umlscene.cpp:2645
UMLScene::loadFromXMI
virtual bool loadFromXMI(QDomElement &qElement)
Definition umlscene.cpp:3875
UMLScene::onWidgetDestructionBox
ObjectWidget * onWidgetDestructionBox(const QPointF &point) const
Definition umlscene.cpp:1062
UMLScene::setIsOpen
void setIsOpen(bool isOpen)
Definition umlscene.cpp:680
UMLScene::toggleSnapComponentSizeToGrid
void toggleSnapComponentSizeToGrid()
Definition umlscene.cpp:3562
UMLScene::endPartialWidgetPaste
void endPartialWidgetPaste()
Definition umlscene.cpp:2259
UMLScene::snapComponentSizeToGrid
bool snapComponentSizeToGrid() const
Definition umlscene.cpp:3596
UMLScene::setPos
void setPos(const QPointF &pos)
Definition umlscene.cpp:483
UMLScene::setSnapGridVisible
void setSnapGridVisible(bool bShow)
Definition umlscene.cpp:3682
UMLScene::setupNewWidget
void setupNewWidget(UMLWidget *w, bool setPosition=true)
Definition umlscene.cpp:734
UMLScene::s_defaultCanvasWidth
static const qreal s_defaultCanvasWidth
The default width of a diagram in pixels.
Definition umlscene.h:397
UMLScene::m_maxY
qreal m_maxY
Gather data for estimating required canvas size (used during loadFromXMI)
Definition umlscene.h:415
UMLScene::s_showDocumentationIndicator
static bool s_showDocumentationIndicator
Status of documentation indicator.
Definition umlscene.h:401
UMLScene::isClassDiagram
bool isClassDiagram() const
Definition umlscene.h:310
UMLScene::font
QFont font() const
Definition umlscene.cpp:3463
UMLScene::setOptionState
void setOptionState(const Settings::OptionState &options)
Definition umlscene.cpp:596
UMLScene::s_sceneBorder
static const qreal s_sceneBorder
A border around the bounding rectangle of the elements in the scene.
Definition umlscene.h:400
UMLScene::alignRight
void alignRight()
Definition umlscene.cpp:4406
UMLScene::m_d
UMLScenePrivate * m_d
Definition umlscene.h:396
UMLScene::setMenu
void setMenu(const QPoint &pos)
UMLScene::loadUISDiagram
bool loadUISDiagram(QDomElement &qElement)
Definition umlscene.cpp:4349
UMLScene::snapY
int snapY() const
Definition umlscene.cpp:3622
UMLScene::triggerToolbarButton
void triggerToolbarButton(WorkToolBar::ToolBar_Buttons button)
Definition umlscene.cpp:2989
UMLScene::snapToGrid
bool snapToGrid() const
Definition umlscene.cpp:3579
UMLScene::isObjectDiagram
bool isObjectDiagram() const
Definition umlscene.h:319
UMLScene::checkMessages
void checkMessages(ObjectWidget *w)
Definition umlscene.cpp:1142
UMLScene::copyAsImage
void copyAsImage(QPixmap *&pix)
Definition umlscene.cpp:2910
UMLScene::selectWidgets
void selectWidgets(qreal px, qreal py, qreal qx, qreal qy)
Definition umlscene.cpp:1805
UMLScene::mouseReleaseEvent
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition umlscene.cpp:1025
UMLScene::setShowDocumentationIndicator
void setShowDocumentationIndicator(bool bShow)
Definition umlscene.cpp:3699
UMLScene::messageAt
MessageWidget * messageAt(const QPointF &p)
Definition umlscene.cpp:1128
UMLScene::m_nID
Uml::ID::Type m_nID
The ID of the view. Allocated by UMLDoc.
Definition umlscene.h:346
UMLScene::snappedX
qreal snappedX(qreal x)
Definition umlscene.cpp:3638
UMLScene::setFolder
void setFolder(UMLFolder *folder)
Definition umlscene.cpp:357
UMLScene::getImageExporter
UMLViewImageExporter * getImageExporter()
Definition umlscene.cpp:1973
UMLScene::widgetOnDiagram
UMLWidget * widgetOnDiagram(Uml::ID::Type id)
Definition umlscene.cpp:1162
UMLScene::contextMenuEvent
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition umlscene.cpp:2997
UMLScene::m_bDrawSelectedOnly
bool m_bDrawSelectedOnly
Definition umlscene.h:391
UMLScene::createAutoConstraintAssociations
void createAutoConstraintAssociations(UMLWidget *widget)
Definition umlscene.cpp:2775
UMLScene::m_pFolder
UMLFolder * m_pFolder
The folder in which this UMLView is contained.
Definition umlscene.h:404
UMLScene::selectedAssociationWidgets
AssociationWidgetList selectedAssociationWidgets() const
Definition umlscene.cpp:1446
UMLScene::setLineColor
void setLineColor(const QColor &color)
Definition umlscene.cpp:520
UMLScene::setStartedCut
void setStartedCut()
Definition umlscene.cpp:3455
UMLScene::autoIncrementSequence
bool autoIncrementSequence() const
Definition umlscene.cpp:389
UMLScene::sigTextColorChanged
void sigTextColorChanged(Uml::ID::Type)
UMLScene::dragMoveEvent
void dragMoveEvent(QGraphicsSceneDragDropEvent *moveEvent)
Definition umlscene.cpp:917
UMLScene::hideEvent
void hideEvent(QHideEvent *he)
Definition umlscene.cpp:792
UMLScene::maxCanvasSize
static qreal maxCanvasSize()
Definition umlscene.cpp:342
UMLScene::sigLineWidthChanged
void sigLineWidthChanged(Uml::ID::Type)
UMLScene::removeAllAssociations
void removeAllAssociations()
Definition umlscene.cpp:2371
UMLScene::getPaste
bool getPaste() const
Definition umlscene.cpp:3014
UMLScene::sigSnapComponentSizeToGridToggled
void sigSnapComponentSizeToGridToggled(bool)
UMLScene::snappedY
qreal snappedY(qreal y)
Definition umlscene.cpp:3656
UMLScene::folder
UMLFolder * folder() const
Definition umlscene.cpp:349
UMLScene::forceUpdateWidgetFontMetrics
void forceUpdateWidgetFontMetrics(QPainter *painter)
Definition umlscene.cpp:3750
UMLScene::selectionSetLineWidth
void selectionSetLineWidth(uint width)
Definition umlscene.cpp:1567
UMLScene::updateSceneRect
void updateSceneRect()
Definition umlscene.cpp:4624
UMLScene::getWidgetAssocs
void getWidgetAssocs(UMLObject *Obj, AssociationWidgetList &Associations)
Definition umlscene.cpp:2355
UMLScene::selectWidgetsOfAssoc
void selectWidgetsOfAssoc(AssociationWidget *a)
Definition umlscene.cpp:1785
UMLScene::UMLScene
UMLScene(UMLFolder *parentFolder, UMLView *view=0)
Definition umlscene.cpp:262
UMLScene::m_view
UMLView * m_view
The view to which this scene is related.
Definition umlscene.h:403
UMLScene::dropEvent
void dropEvent(QGraphicsSceneDragDropEvent *dropEvent)
Definition umlscene.cpp:925
UMLScene::fillColor
const QColor & fillColor() const
Definition umlscene.cpp:491
UMLScene::loadUisDiagramPresentation
bool loadUisDiagramPresentation(QDomElement &qElement)
Definition umlscene.cpp:4248
UMLScene::removeAllWidgets
void removeAllWidgets()
Definition umlscene.cpp:2382
UMLScene::selectAssociations
void selectAssociations(bool bSelect)
Definition umlscene.cpp:2337
UMLScene::selectionSetFillColor
void selectionSetFillColor(const QColor &color)
Definition umlscene.cpp:1587
UMLScene::toggleSnapToGrid
void toggleSnapToGrid()
Definition umlscene.cpp:3553
UMLScene::findWidget
UMLWidget * findWidget(Uml::ID::Type id)
Definition umlscene.cpp:1207
UMLScene::isEntityRelationshipDiagram
bool isEntityRelationshipDiagram() const
Definition umlscene.h:318
UMLScene::setTextColor
void setTextColor(const QColor &color)
Definition umlscene.cpp:558
UMLScene::type
Uml::DiagramType::Enum type() const
Definition umlscene.cpp:443
UMLScene::setShowOpSig
void setShowOpSig(bool bShowOpSig)
Definition umlscene.cpp:3715
UMLScene::resetToolbar
void resetToolbar()
Definition umlscene.cpp:2984
UMLScene::isShowDocumentationIndicator
bool isShowDocumentationIndicator() const
Definition umlscene.cpp:3691
UMLScene::s_maxCanvasSize
static const qreal s_maxCanvasSize
The maximum supported canvas size.
Definition umlscene.h:399
UMLScene::selectedWidgets
UMLWidgetList selectedWidgets() const
Definition umlscene.cpp:1429
UMLScene::createAutoAssociations
void createAutoAssociations(UMLWidget *widget)
Definition umlscene.cpp:2456
UMLScene::m_Type
Uml::DiagramType::Enum m_Type
The type of diagram to represent.
Definition umlscene.h:347
UMLScene::slotCutSuccessful
void slotCutSuccessful()
Definition umlscene.cpp:3413
UMLScene::s_defaultCanvasHeight
static const qreal s_defaultCanvasHeight
The default height of a diagram in pixels.
Definition umlscene.h:398
UMLScene::activateAfterLoad
void activateAfterLoad(bool bUseLog=false)
Definition umlscene.cpp:2231
UMLScene::findAssocWidget
AssociationWidget * findAssocWidget(Uml::ID::Type id)
Definition umlscene.cpp:1236
UMLScene::m_bPaste
bool m_bPaste
Definition umlscene.h:392
UMLScene::setFont
void setFont(QFont font, bool changeAllWidgets=false)
Definition umlscene.cpp:3471
UMLScene::activate
void activate()
Definition umlscene.cpp:1989
UMLScene::addWidgetCmd
void addWidgetCmd(UMLWidget *widget)
Definition umlscene.cpp:631
UMLScene::fixY
qreal fixY() const
Definition umlscene.cpp:4641
UMLScene::unselectChildrenOfSelectedWidgets
void unselectChildrenOfSelectedWidgets()
Definition umlscene.cpp:1617
UMLScene::getDiagram
void getDiagram(QPixmap &diagram, const QRectF &rect)
Definition umlscene.cpp:1911
UMLScene::beginPartialWidgetPaste
void beginPartialWidgetPaste()
Definition umlscene.cpp:2250
UMLScene::m_pIDChangesLog
IDChangeLog * m_pIDChangesLog
LocalID Changes Log for paste actions.
Definition umlscene.h:406
UMLScene::alignLeft
void alignLeft()
Definition umlscene.cpp:4388
UMLScene::setAutoIncrementSequence
void setAutoIncrementSequence(bool state)
Definition umlscene.cpp:394
UMLScene::setType
void setType(Uml::DiagramType::Enum type)
Definition umlscene.cpp:451
UMLScene::removeAssocInViewAndDoc
void removeAssocInViewAndDoc(AssociationWidget *assoc)
Definition umlscene.cpp:2290
UMLScene::m_isOpen
bool m_isOpen
Flag is set to true when diagram is open, i.e. shown to the user.
Definition umlscene.h:354
UMLScene::alignBottom
void alignBottom()
Definition umlscene.cpp:4441
UMLScene::sigAssociationRemoved
void sigAssociationRemoved(AssociationWidget *)
UMLScene::createAutoConstraintAssociation
void createAutoConstraintAssociation(UMLEntity *refEntity, UMLForeignKeyConstraint *fkConstraint, UMLWidget *widget)
Definition umlscene.cpp:2824
UMLScene::sigSnapToGridToggled
void sigSnapToGridToggled(bool)
UMLScene::setWidgetLink
void setWidgetLink(WidgetBase *w)
Definition umlscene.cpp:4585
UMLScene::widgetList
UMLWidgetList widgetList() const
Definition umlscene.cpp:620
UMLScene::drawBackground
virtual void drawBackground(QPainter *painter, const QRectF &rect)
Definition umlscene.cpp:3761
UMLScene::m_minY
qreal m_minY
Gather data for estimating required canvas size (used during loadFromXMI)
Definition umlscene.h:414
UMLScene::diagramRect
QRectF diagramRect()
Definition umlscene.cpp:1419
UMLScene::selectWidget
void selectWidget(UMLWidget *widget, QRectF *rect=0)
Definition umlscene.cpp:1856
UMLScene::addAssociation
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Definition umlscene.cpp:2140
UMLScene::isSequenceDiagram
bool isSequenceDiagram() const
Definition umlscene.h:312
UMLScene::resizeSelection
void resizeSelection()
Definition umlscene.cpp:1696
UMLScene::selectAll
void selectAll()
Definition umlscene.cpp:1719
UMLScene::m_fixY
qreal m_fixY
Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622.
Definition umlscene.h:417
UMLScene::setDocumentation
void setDocumentation(const QString &doc)
Definition umlscene.cpp:381
UMLScene::textColor
const QColor & textColor() const
Definition umlscene.cpp:548
UMLScene::backgroundColor
const QColor & backgroundColor() const
Definition umlscene.cpp:1393
UMLScene::snapX
int snapX() const
Definition umlscene.cpp:3614
UMLScene::updateContainment
void updateContainment(UMLCanvasObject *self)
Definition umlscene.cpp:2404
UMLScene::findMaxBoundingRectangle
void findMaxBoundingRectangle(const FloatingTextWidget *ft, qreal &px, qreal &py, qreal &qx, qreal &qy)
Definition umlscene.cpp:2887
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:501
UMLScene::selectedWidgetsExt
UMLWidgetList selectedWidgetsExt(bool filterText=true)
Definition umlscene.cpp:2067
UMLScene::loadMessagesFromXMI
bool loadMessagesFromXMI(QDomElement &qElement)
Definition umlscene.cpp:4173
UMLScene::onWidgetLine
ObjectWidget * onWidgetLine(const QPointF &point) const
Definition umlscene.cpp:1037
UMLScene::selectedAssocs
AssociationWidgetList selectedAssocs()
Definition umlscene.cpp:2086
UMLScene::clearDiagram
void clearDiagram()
Definition umlscene.cpp:3530
UMLScene::setSnapToGrid
void setSnapToGrid(bool bSnap)
Definition umlscene.cpp:3587
UMLScene::setGridDotColor
void setGridDotColor(const QColor &color)
Definition umlscene.cpp:579
UMLScene::collisions
UMLSceneItemList collisions(const QPointF &p, int delta=3)
Definition umlscene.cpp:1762
UMLScene::name
QString name() const
Definition umlscene.cpp:427
UMLScene::moveSelectedBy
void moveSelectedBy(qreal dX, qreal dY)
Definition umlscene.cpp:1504
UMLScene::lineColor
const QColor & lineColor() const
Definition umlscene.cpp:510
UMLScene::lineWidth
uint lineWidth() const
Definition umlscene.cpp:529
UMLScene::m_minX
qreal m_minX
Definition umlscene.h:414
UMLScene::isSnapGridVisible
bool isSnapGridVisible() const
Definition umlscene.cpp:3674
UMLScene::slotShowView
void slotShowView()
Definition umlscene.cpp:3424
UMLScene::resetPastePoint
void resetPastePoint()
Definition umlscene.cpp:3446
UMLScene::mouseMoveEvent
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition umlscene.cpp:976
UMLScene::deleteSelection
void deleteSelection()
Definition umlscene.cpp:1634
UMLScene::itemAt
QGraphicsItem * itemAt(const QPointF &position) const
Definition umlscene.h:382
UMLScene::fixX
qreal fixX() const
Definition umlscene.cpp:4633
UMLScene::setClassWidgetOptions
void setClassWidgetOptions(ClassOptionsPage *page)
Definition umlscene.cpp:3485
UMLScene::m_bPopupShowing
bool m_bPopupShowing
Status of a popupmenu on view. True - a popup is on view.
Definition umlscene.h:408
UMLScene::documentation
QString documentation() const
Definition umlscene.cpp:373
UMLScene::sigGridColorChanged
void sigGridColorChanged(Uml::ID::Type)
UMLScene::sigWidgetRemoved
void sigWidgetRemoved(UMLWidget *)
UMLScene::isDeploymentDiagram
bool isDeploymentDiagram() const
Definition umlscene.h:317
UMLScene::m_Options
Settings::OptionState m_Options
Options used by view.
Definition umlscene.h:350
UMLScene::setLineWidth
void setLineWidth(uint width)
Definition umlscene.cpp:539
UMLScene::m_nLocalID
Uml::ID::Type m_nLocalID
Definition umlscene.h:344
UMLScene::m_fixX
qreal m_fixX
Compensate for QGraphicsScene offsets, https://bugs.kde.org/show_bug.cgi?id=449622.
Definition umlscene.h:416
UMLScene::slotObjectCreated
void slotObjectCreated(UMLObject *o)
Definition umlscene.cpp:814
UMLScene::isStateDiagram
bool isStateDiagram() const
Definition umlscene.h:314
UMLScene::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition umlscene.cpp:989
UMLScene::isOpen
bool isOpen() const
Definition umlscene.cpp:671
UMLScene::m_PastePoint
QPointF m_PastePoint
The offset at which to paste the clipboard.
Definition umlscene.h:409
UMLScene::setSnapSpacing
void setSnapSpacing(int x, int y)
Definition umlscene.cpp:3630
UMLScene::alignVerticalMiddle
void alignVerticalMiddle()
Definition umlscene.cpp:4458
UMLScene::dragEnterEvent
void dragEnterEvent(QGraphicsSceneDragDropEvent *enterEvent)
Definition umlscene.cpp:871
UMLScene::print
void print(QPrinter *pPrinter, QPainter &pPainter)
Definition umlscene.cpp:688
UMLScene::showEvent
void showEvent(QShowEvent *se)
Definition umlscene.cpp:779
UMLScene::loadWidgetsFromXMI
bool loadWidgetsFromXMI(QDomElement &qElement)
Definition umlscene.cpp:4126
UMLScene::m_bStartedCut
bool m_bStartedCut
Flag if view/children started cut operation.
Definition umlscene.h:393
UMLScene::pos
QPointF pos() const
Definition umlscene.cpp:475
UMLScene::autoIncrementSequenceValue
QString autoIncrementSequenceValue()
Definition umlscene.cpp:402
UMLScene::setCreateObject
void setCreateObject(bool bCreate)
Definition umlscene.cpp:771
UMLScene::mouseDoubleClickEvent
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition umlscene.cpp:1008
UMLScene::slotToolBarChanged
void slotToolBarChanged(int c)
Definition umlscene.cpp:805
UMLScene::alignTop
void alignTop()
Definition umlscene.cpp:4423
UMLScene::isSavedInSeparateFile
bool isSavedInSeparateFile()
Definition umlscene.cpp:1728
UMLScene::m_doc
UMLDoc * m_doc
Pointer to the UMLDoc.
Definition umlscene.h:410
UMLScene::m_pImageExporter
UMLViewImageExporter * m_pImageExporter
Used to export the view.
Definition umlscene.h:411
UMLScene::applyLayout
void applyLayout(const QString &actionText)
Definition umlscene.cpp:3540
UMLScene::m_bUseSnapToGrid
bool m_bUseSnapToGrid
Flag to use snap to grid. The default is off.
Definition umlscene.h:352
UMLScene::selectionSetFont
void selectionSetFont(const QFont &font)
Definition umlscene.cpp:1535
UMLScene::getUniqueSelectionType
WidgetBase::WidgetType getUniqueSelectionType()
Definition umlscene.cpp:3506
UMLScene::m_Documentation
QString m_Documentation
The documentation of the diagram.
Definition umlscene.h:349
UMLScene::m_pos
QPointF m_pos
Definition umlscene.h:389
UMLScene::widgetLink
WidgetBase * widgetLink()
Definition umlscene.cpp:4590
UMLScene::updateCanvasSizeEstimate
void updateCanvasSizeEstimate(qreal x, qreal y, qreal w, qreal h)
Definition umlscene.cpp:4609
UMLScene::createAutoAttributeAssociation
void createAutoAttributeAssociation(UMLClassifier *type, UMLAttribute *attr, UMLWidget *widget)
Definition umlscene.cpp:2713
UMLScene::associationList
AssociationWidgetList associationList() const
Definition umlscene.cpp:606
UMLScene::m_Name
QString m_Name
The name of the diagram.
Definition umlscene.h:348
UMLScene::getFirstMultiSelectedWidget
UMLWidget * getFirstMultiSelectedWidget() const
Definition umlscene.cpp:1083
UMLScene::slotActivate
void slotActivate()
Definition umlscene.cpp:1981
UMLScene::toggleShowGrid
void toggleShowGrid()
Definition umlscene.cpp:3571
UMLScene::getCreateObject
bool getCreateObject() const
Definition umlscene.cpp:763
UMLScene::showOpSig
bool showOpSig() const
Definition umlscene.cpp:3707
UMLScene::slotObjectRemoved
void slotObjectRemoved(UMLObject *o)
Definition umlscene.cpp:855
UMLScene::m_autoIncrementSequence
bool m_autoIncrementSequence
state of auto increment sequence
Definition umlscene.h:413
UMLScene::generateCollaborationId
int generateCollaborationId()
Definition umlscene.cpp:662
UMLScene::~UMLScene
virtual ~UMLScene()
Definition umlscene.cpp:311
UMLScene::setPaste
void setPaste(bool paste)
Definition umlscene.cpp:3022
UMLScene::messageList
MessageWidgetList messageList() const
Definition umlscene.cpp:648
UMLScene::isUseCaseDiagram
bool isUseCaseDiagram() const
Definition umlscene.h:311
UMLScene::createAutoAttributeAssociations2
void createAutoAttributeAssociations2(UMLWidget *widget)
Definition umlscene.cpp:2856
UMLScene::getPastePoint
QPointF getPastePoint()
Definition umlscene.cpp:3435
UMLScene::sigFillColorChanged
void sigFillColorChanged(Uml::ID::Type)
UMLScene::fileLoaded
void fileLoaded()
Definition umlscene.cpp:3724
UMLScene::addObject
void addObject(UMLObject *object)
Definition umlscene.cpp:4239
UMLScene::useFillColor
bool useFillColor() const
Definition umlscene.cpp:1401
UMLScene::clearSelected
void clearSelected()
Definition umlscene.cpp:1484
UMLScene::m_bUseSnapComponentSizeToGrid
bool m_bUseSnapComponentSizeToGrid
Flag to use snap to grid for component size. The default is off.
Definition umlscene.h:353
UMLScene::alignHorizontalDistribute
void alignHorizontalDistribute()
Definition umlscene.cpp:4545
UMLScene::isCollaborationDiagram
bool isCollaborationDiagram() const
Definition umlscene.h:313
UMLScene::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition umlscene.cpp:3031
UMLScene::associationAt
AssociationWidget * associationAt(const QPointF &p)
Definition umlscene.cpp:1113
UMLScene::makeSelected
void makeSelected(UMLWidget *uw)
Definition umlscene.cpp:1775
UMLScene::selectedCount
int selectedCount(bool filterText=false) const
Definition umlscene.cpp:2042
UMLScene::removeAssociations
void removeAssociations(UMLWidget *pWidget)
Definition umlscene.cpp:2323
UMLScene::selectionSetVisualProperty
void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value)
Definition umlscene.cpp:1602
UMLScene::m_nCollaborationId
int m_nCollaborationId
Used for creating unique name of collaboration messages.
Definition umlscene.h:388
UMLScene::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition umlscene.cpp:3801
UMLScene::selectedMessageWidgets
UMLWidgetList selectedMessageWidgets() const
Definition umlscene.cpp:1463
UMLScene::selectionUseFillColor
void selectionUseFillColor(bool useFC)
Definition umlscene.cpp:1517
UMLScene::setUseFillColor
void setUseFillColor(bool ufc)
Definition umlscene.cpp:1409
UMLScene::optionState
Settings::OptionState & optionState()
Definition umlscene.cpp:588
UMLScene::m_isActivated
bool m_isActivated
True if the view was activated after the deserialization(load).
Definition umlscene.h:407
UMLScene::activeView
UMLView * activeView() const
Definition umlscene.cpp:365
UMLScene::loadAssociationsFromXMI
bool loadAssociationsFromXMI(QDomElement &qElement)
Definition umlscene.cpp:4201
UMLScene::addFloatingTextWidget
void addFloatingTextWidget(FloatingTextWidget *pWidget)
Definition umlscene.cpp:2100
UMLScene::setName
void setName(const QString &name)
Definition umlscene.cpp:435
UMLScene::widgetAt
UMLWidget * widgetAt(const QPointF &p)
Definition umlscene.cpp:1097
UMLScene::removeWidgetCmd
void removeWidgetCmd(UMLWidget *o)
Definition umlscene.cpp:1332
UMLScene::m_bCreateObject
bool m_bCreateObject
Definition umlscene.h:390
UMLScene::isActivityDiagram
bool isActivityDiagram() const
Definition umlscene.h:315
UMLScene::m_layoutGrid
LayoutGrid * m_layoutGrid
layout grid in the background
Definition umlscene.h:412
UMLScene::alignVerticalDistribute
void alignVerticalDistribute()
Definition umlscene.cpp:4514
UMLScene::removeOwnedWidgets
void removeOwnedWidgets(UMLWidget *o)
Definition umlscene.cpp:1378
UMLScene::setID
void setID(Uml::ID::Type id)
Definition umlscene.cpp:467
UMLScene::gridDotColor
const QColor & gridDotColor() const
Definition umlscene.cpp:569
UMLScene::selectionSetLineColor
void selectionSetLineColor(const QColor &color)
Definition umlscene.cpp:1549
UMLScene::updateComponentSizes
void updateComponentSizes()
Definition umlscene.cpp:3732
UMLScene::m_maxX
qreal m_maxX
Definition umlscene.h:415
UMLScene::setSnapComponentSizeToGrid
void setSnapComponentSizeToGrid(bool bSnap)
Definition umlscene.cpp:3604
UMLScene::ID
Uml::ID::Type ID() const
Definition umlscene.cpp:459
UMLScene::loadWidgetFromXMI
UMLWidget * loadWidgetFromXMI(QDomElement &widgetElement)
Definition umlscene.cpp:4152
UMLViewImageExporterModel
Definition umlviewimageexportermodel.h:29
UMLViewImageExporter
Definition umlviewimageexporter.h:23
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: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:57
operator<<
QDebug operator<<(QDebug dbg, UMLScene *item)
Definition umlscene.cpp:4576
umlwidgetlist.h
UMLWidgetList
QList< QPointer< UMLWidget > > UMLWidgetList
Definition umlwidgetlist.h:15
widgetbase.h
worktoolbar.h