umbrello/umbrello
umlscene.cpp
Go to the documentation of this file.
529 pPainter.drawText(page.left(), page.bottom() + 3, page.right(), 2*fontHeight, Qt::AlignLeft, string);
604 disconnect(m_doc, SIGNAL(sigObjectCreated(UMLObject*)), this, SLOT(slotObjectCreated(UMLObject*)));
899 DEBUG(DBG_SRC) << "association widget = " << association->name() << " / type = " << association->baseTypeStr();
1243 disconnect(this, SIGNAL(sigFillColorChanged(Uml::ID::Type)), o, SLOT(slotFillColorChanged(Uml::ID::Type)));
1244 disconnect(this, SIGNAL(sigLineColorChanged(Uml::ID::Type)), o, SLOT(slotLineColorChanged(Uml::ID::Type)));
1245 disconnect(this, SIGNAL(sigTextColorChanged(Uml::ID::Type)), o, SLOT(slotTextColorChanged(Uml::ID::Type)));
1412 void UMLScene::selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value)
1505 selectWidgets(sceneRect().left(), sceneRect().top(), sceneRect().right(), sceneRect().bottom());
1519 const QString msgPrefix(QLatin1String("UMLScene::isSavedInSeparateFile(") + name() + QLatin1String("): "));
1710 DEBUG(DBG_SRC) << "painter=" << painter.window() << ", source=" << source << ", target=" << target;
2406 AssociationWidget *a = AssociationWidget::create(this, pWidget, Uml::AssociationType::Containment, widget);
2419 if (widget == NULL || m_Type != Uml::DiagramType::Class || !m_Options.classState.showAttribAssocs)
2508 if (assocType == Uml::AssociationType::Aggregation || assocType == Uml::AssociationType::UniAssociation)
2578 UMLClassifierListItemList constrList = entity->getFilteredList(UMLObject::ot_ForeignKeyConstraint);
2597 void UMLScene::createAutoConstraintAssociation(UMLEntity* refEntity, UMLForeignKeyConstraint* fkConstraint, UMLWidget* widget)
2613 // for foreign key contstraint, we need to create the association type Uml::AssociationType::Relationship.
2614 // The referenced entity is the "1" part (Role A) and the entity holding the relationship is the "many" part. (Role B)
2657 void UMLScene::findMaxBoundingRectangle(const FloatingTextWidget* ft, qreal& px, qreal& py, qreal& qx, qreal& qy)
4120 qreal distance = int(((biggestY - smallestY) - heightsSum) / (widgetList.count() - 1.0) + 0.5);
Definition: listpopupmenu.h:78
void setText(int column, const QString &text)
Changes the current text.
Definition: umllistviewitem.cpp:432
static AssociationWidget * create(UMLScene *scene)
This constructor is really only for loading from XMI, otherwise it should not be allowed as it create...
Definition: associationwidget.cpp:110
bool m_isOpen
Flag is set to true when diagram is open, i.e. shown to the user.
Definition: umlscene.h:329
Definition: statewidget.h:52
AssociationWidget * associationAt(const QPointF &p)
Tests the given point against all associations and returns the association widget for which the point...
Definition: umlscene.cpp:1040
void sigFillColorChanged(Uml::ID::Type)
void setUsesDiagramFillColor(bool state)
Set state if diagram fill color is used.
Definition: widgetbase.cpp:396
Definition: activitywidget.h:44
void setMenu(const QPoint &pos)
Sets the popup menu to use when clicking on a diagram background (rather than a widget or listView)...
Definition: umlscene.cpp:2776
Definition: umldragdata.h:64
UMLObject * getObject(Uml::RoleType::Enum role) const
Returns the UMLObject assigned to the given role.
Definition: association.cpp:497
void clear()
virtual void setSelected(bool _select)
Sets the state of whether the widget is selected.
Definition: associationwidget.cpp:3698
void setRoleName(const QString &strRole, Uml::RoleType::Enum role)
Sets the text to the FloatingTextWidget that display the Role text of this association.
Definition: associationwidget.cpp:985
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent)
bool addUMLObject(UMLObject *object)
Adds a UMLObject thats already created but doesn't change any ids or signal.
Definition: umldoc.cpp:903
const QMimeData * mimeData() const
void setMultiplicity(const QString &text, Uml::RoleType::Enum role)
Sets the text in the FloatingTextWidget representing the multiplicity at the given side of the associ...
Definition: associationwidget.cpp:1092
UMLWidget * onWidget(const QPointF &p)
Reimplement method from WidgetBase in order to check owned floating texts.
Definition: associationwidget.cpp:3749
Definition: listpopupmenu.h:183
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
Definition: umlobject.h:63
void setAssociationType(Uml::AssociationType::Enum type)
Sets the association's type.
Definition: associationwidget.cpp:1461
bool useFillColor() const
Returns whether to use the fill/background color.
Definition: umlscene.cpp:1258
void calculateEndingPoints()
Calculates and sets the first and last point in the Association's AssociationLine.
Definition: associationwidget.cpp:1658
virtual void slotTextColorChanged(Uml::ID::Type viewID)
Captures a text color change signal.
Definition: umlwidget.cpp:825
This sub-class adds copyInto and clone to the QPtrList base class...
Definition: umlclassifierlistitemlist.h:26
Definition: listpopupmenu.h:212
QSize size() const
void slotShowView()
Called by menu when to show the instance of the view.
Definition: umlscene.cpp:3152
void fileLoaded()
Changes the zoom to the currently set level (now loaded from file) Called from UMLApp::slotUpdateView...
Definition: umlscene.cpp:3488
Uml::SequenceMessage::Enum sequenceMessageType() const
Definition: messagewidget.h:80
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent)
Event handler for context menu events.
Definition: umlscene.cpp:2762
Uml::ID::Type findNewID(Uml::ID::Type OldID)
Returns the new assigned ID of the object that had OldID as its previous id.
Definition: idchangelog.cpp:62
QString sequenceNumber() const
Read property of QString m_SequenceNumber.
Definition: linkwidget.cpp:99
int selectedCount(bool filterText=false) const
Return the amount of widgets selected.
Definition: umlscene.cpp:1822
UMLClassifier * getType() const
Returns the type of the UMLClassifierListItem.
Definition: classifierlistitem.cpp:100
UMLObject * umlObject() const
Return the UMLObject associated with this instance.
Definition: umllistviewitem.cpp:309
void setStartedCut()
Called by the view or any of its children when they start a cut operation.
Definition: umlscene.cpp:3183
A dialog page to display options for class related options.
Definition: classoptionspage.h:38
Definition: activitywidget.h:40
void resizeSceneToItems()
Sets the size of the scene to just fit on all the items.
Definition: umlscene.cpp:3497
void createAutoAttributeAssociations2(UMLWidget *widget)
Definition: umlscene.cpp:2627
int width() const
void removeAssoc(AssociationWidget *pAssoc)
Removes a AssociationWidget from a diagram Physically deletes the AssociationWidget passed in...
Definition: umlscene.cpp:2045
qreal snappedX(qreal x)
Returns the input coordinate with possible grid-snap applied.
Definition: umlscene.cpp:3402
UMLObject * umlObject() const
Returns the UMLObject set to represent.
Definition: widgetbase.cpp:127
Displays a note box to allow multiple lines of text to be displayed.
Definition: notewidget.h:30
bool typeIsDiagram(UMLListViewItem::ListViewType type)
Return true if the listview type is a diagram.
Definition: model_utils.cpp:1121
void updateComponentSizes()
Updates the size of all components in this view.
Definition: umlscene.cpp:3506
void fillRect(const QRectF &rectangle, const QBrush &brush)
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
void render(QPainter *painter, const QRectF &target, const QRectF &source, Qt::AspectRatioMode aspectRatioMode)
const T & next()
void findMaxBoundingRectangle(const FloatingTextWidget *ft, qreal &px, qreal &py, qreal &qx, qreal &qy)
Find the maximum bounding rectangle of FloatingTextWidget widgets.
Definition: umlscene.cpp:2657
void removeAssocInViewAndDoc(AssociationWidget *assoc)
Removes an AssociationWidget from the association list and removes the corresponding UMLAssociation f...
Definition: umlscene.cpp:2062
void setYEntireAssoc(qreal y)
Set all association points to y coordinate.
Definition: associationwidget.cpp:3833
void createAutoAttributeAssociations(UMLWidget *widget)
If the m_Type of the given widget is WidgetBase::wt_Class then iterate through the class' attributes ...
Definition: umlscene.cpp:2417
bool isSavedInSeparateFile()
Returns true if this diagram resides in an externalized folder.
Definition: umlscene.cpp:1512
static QString toString(MenuType menu)
Convert enum MenuType to string.
Definition: listpopupmenu.cpp:2099
QDomNode appendChild(const QDomNode &newChild)
Definition: basictypes.h:215
This is an interface realized by AssociationWidget and MessageWidget.
Definition: linkwidget.h:35
void centerOn(const QPointF &pos)
Definition: umlobject.h:67
Uml::Visibility::Enum visibility() const
Returns the visibility of the object.
Definition: umlobject.cpp:431
bool hasObjectWidget(ObjectWidget *w)
Check to see if the given ObjectWidget is involved in the message.
Definition: messagewidget.cpp:744
qreal getSmallestY(const UMLWidgetList &widgetList)
Looks for the smallest y-value of the given UMLWidgets.
Definition: widgetlist_utils.cpp:52
int right() const
void slotActivate()
makes this view the active view by asking the document to show us
Definition: umlscene.cpp:1762
QRect window() const
QList< QGraphicsItem * > selectedItems() const
Definition: listpopupmenu.h:180
Definition: basictypes.h:76
void addObject(UMLObject *object)
Add an object to the application, and update the view.
Definition: umlscene.cpp:3839
UMLWidget * widgetOnDiagram(Uml::ID::Type id)
Returns whether a widget is already on the diagram.
Definition: umlscene.cpp:1089
ObjectWidget * objectWidget(Uml::RoleType::Enum role)
Returns the related widget on the given side.
Definition: messagewidget.cpp:1264
QString attribute(const QString &name, const QString &defValue) const
UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Reimplementation of getFilteredList to support ot=UMLObject::ot_EntityConstraint. ...
Definition: entity.cpp:642
Definition: umlobject.h:56
void setXEntireAssoc(qreal x)
Set all association points to x coordinate.
Definition: associationwidget.cpp:3821
QList< QGraphicsItem * > items() const
static bool tagEq(const QString &tag, const QString &pattern)
Function for comparing tags in XMI files.
Definition: umldoc.cpp:3081
void showDocumentation(UMLObject *object, bool overwrite=false)
Called when a widget wishes to display its documentation in the doc window.
Definition: docwindow.cpp:88
Uml::TextRole::Enum textRole() const
Return the role of the text widget.
Definition: floatingtextwidget.cpp:379
int m_nCollaborationId
Used for creating unique name of collaboration messages.
Definition: umlscene.h:356
Definition: basictypes.h:41
void setRight(qreal x)
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
MessageWidget * messageAt(const QPointF &p)
Tests the given point against all associations and returns the association widget for which the point...
Definition: umlscene.cpp:1055
void setDiagramLink(Uml::ID::Type viewID)
Set the ID of the diagram hyperlinked to this note.
Definition: notewidget.cpp:164
Definition: umlobject.h:52
This class contains all the ID translations done for each UMLObject pasted.
Definition: idchangelog.h:26
Definition: listpopupmenu.h:90
void selectAssociations(bool bSelect)
Sets each association as selected if the widgets it associates are selected.
Definition: umlscene.cpp:2110
Definition: listpopupmenu.h:181
Definition: basictypes.h:216
void sigShowGridToggled(bool)
void setBackgroundBrush(const QBrush &brush)
Definition: cmd_createWidget.h:22
virtual bool loadFromXMI(QDomElement &qElement)
Loads the "diagram" tag.
Definition: umlscene.cpp:3613
Definition: listpopupmenu.h:171
virtual void drawBackground(QPainter *painter, const QRectF &rect)
Overrides standard method from QGraphicsScene drawing the background.
Definition: umlscene.cpp:3533
virtual void slotLineWidthChanged(Uml::ID::Type viewID)
Captures a linewidth change signal.
Definition: umlwidget.cpp:857
virtual void setSelected(bool _select)
Sets the state of whether the widget is selected.
Definition: umlwidget.cpp:1321
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
Overrides the standard operation.
Definition: umlscene.cpp:867
QDebug & nospace()
This sub-class adds copyInto and clone to the QPtrList base class.
Definition: umlattributelist.h:26
QRectF sceneRect() const
Definition: basictypes.h:115
void sigSnapToGridToggled(bool)
void slotObjectRemoved(UMLObject *o)
Slot called when an object is removed.
Definition: umlscene.cpp:678
void copyAsImage(QPixmap *&pix)
Returns the PNG picture of the paste operation.
Definition: umlscene.cpp:2680
void moveByLocal(qreal dx, qreal dy)
Move the widget by an X and Y offset relative to the current position.
Definition: umlwidget.cpp:1155
This class contains the non-graphical information required for UMLObjects which appear as moveable wi...
Definition: umlcanvasobject.h:33
Definition: basictypes.h:84
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
Override standard method.
Definition: umlscene.cpp:876
void toggleSnapComponentSizeToGrid()
Changes snap to grid for component size boolean.
Definition: umlscene.cpp:3326
qreal top() const
void selectWidgets(qreal px, qreal py, qreal qx, qreal qy)
Selects all the widgets within an internally kept rectangle.
Definition: umlscene.cpp:1589
bool intersects(const QRectF &rectangle) const
void selectionUseFillColor(bool useFC)
Set the useFillColor variable to all selected widgets.
Definition: umlscene.cpp:1327
QPointF scenePos() const
void hide()
void selectionSetVisualProperty(ClassifierWidget::VisualProperty property, bool value)
Set or unset the visual property (show ..) setting of all selected items.
Definition: umlscene.cpp:1412
Definition: basictypes.h:80
Definition: listpopupmenu.h:220
Definition: statewidget.h:48
const Settings::OptionState & optionState() const
Returns the options being used.
Definition: umlscene.cpp:428
bool onWidget(const QPointF &p)
Return whether point is on sequence line.
Definition: seqlinewidget.cpp:57
bool onAssociation(const QPointF &point)
Returns true if the given point is on the association line.
Definition: associationwidget.cpp:3799
Definition: widgetbase.h:47
void drawLine(const QLineF &line)
FloatingTextWidget * roleWidget(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget object.
Definition: associationwidget.cpp:861
void setOptionState(const Settings::OptionState &options)
Sets the options to be used.
Definition: umlscene.cpp:436
qreal height() const
void updateContainment(UMLCanvasObject *self)
Refreshes containment association, i.e.
Definition: umlscene.cpp:2182
virtual void mouseRelease(QGraphicsSceneMouseEvent *ome)
Handler for mouse release events.
Definition: toolbarstate.cpp:110
void selectionSetFillColor(const QColor &color)
Set the fill color for all the currently selected items.
Definition: umlscene.cpp:1397
static QVariant dataFromAction(DataType key, QAction *action)
Returns the data from the given action to the given key.
Definition: listpopupmenu.cpp:1324
void setAutoIncrementSequence(bool state)
Definition: umlscene.cpp:235
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
static bool getClip3TypeAndID(const QMimeData *mimeData, LvTypeAndID_List &typeAndIdList)
Return just the LvTypeAndID of a Clip3.
Definition: umldragdata.cpp:349
void setupNewWidget(UMLWidget *w, bool setPosition=true)
Initialize and announce a newly created widget.
Definition: umlscene.cpp:540
bool isShowDocumentationIndicator() const
Returns whether to show documentation indicator.
Definition: umlscene.cpp:3455
Definition: worktoolbar.h:59
Definition: listpopupmenu.h:107
QString name() const
Gets the name from the corresponding UMLObject if this widget has an underlying UMLObject; if it does...
Definition: widgetbase.cpp:211
bool loadFromXMI(QDomElement &element, OptionState &optstate)
Definition: optionstate.cpp:58
qreal getBiggestY(const UMLWidgetList &widgetList)
Looks for the biggest y-value of the given UMLWidgets.
Definition: widgetlist_utils.cpp:105
Definition: listpopupmenu.h:268
qreal left() const
void adjust(qreal dx1, qreal dy1, qreal dx2, qreal dy2)
void dragMoveEvent(QGraphicsSceneDragDropEvent *moveEvent)
Override standard method.
Definition: umlscene.cpp:805
void signalDiagramRenamed(UMLView *view)
Signal a view/diagram has been renamed.
Definition: umldoc.cpp:2954
void syncToModel()
Synchronize this widget from the UMLAssociation.
Definition: associationwidget.cpp:1813
void slotCutSuccessful()
Connects to the signal that UMLApp emits when a cut operation is successful.
Definition: umlscene.cpp:3141
void setLeft(qreal x)
This class is used to set up information for a foreign key entity constraint.
Definition: foreignkeyconstraint.h:32
qreal getBiggestX(const UMLWidgetList &widgetList)
Looks for the biggest x-value of the given UMLWidgets.
Definition: widgetlist_utils.cpp:78
Definition: listpopupmenu.h:182
void slotObjectCreated(UMLObject *o)
Slot called when an object is created.
Definition: umlscene.cpp:628
Definition: optionstate.h:142
QRect paperRect() const
QDomNode nextSibling() const
This class represents an association inside a diagram.
Definition: associationwidget.h:50
This class contains the non-graphic representation of an association.
Definition: association.h:32
virtual void setName(const QString &strName)
Sets the name in the corresponding UMLObject.
Definition: widgetbase.cpp:224
LinkWidget * link() const
Returns the LinkWidget this floating text is related to.
Definition: floatingtextwidget.cpp:360
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Handler for mouse move events.
Definition: toolbarstate.cpp:180
QDomElement toElement() const
Definition: basictypes.h:156
void removeAssociations(UMLWidget *pWidget)
Removes all the associations related to Widget.
Definition: umlscene.cpp:2096
UMLAssociationList getAssociations()
Return the list of associations for the CanvasObject.
Definition: umlcanvasobject.cpp:337
qreal bottom() const
Definition: activitywidget.h:41
Definition: statewidget.h:49
bool getCreateObject() const
Return whether we are currently creating an object.
Definition: umlscene.cpp:573
Definition: statewidget.h:51
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Creates a UMLObject of the given type.
Definition: object_factory.cpp:192
bool containsAsEndpoint(UMLWidget *widget)
Returns true if the Widget is either at the starting or ending side of the association.
Definition: associationwidget.cpp:1419
Definition: activitywidget.h:42
bool loadFromXMI(QDomElement &qElement, const UMLWidgetList &widgets, const MessageWidgetList *messages)
Uses the supplied widgetList for resolving the role A and role B widgets.
Definition: associationwidget.cpp:4099
void slotToolBarChanged(int c)
Changes the current tool to the selected tool.
Definition: umlscene.cpp:615
void dropEvent(QGraphicsSceneDragDropEvent *dropEvent)
Override standard method.
Definition: umlscene.cpp:813
static QString toString(ObjectType ot)
Helper function for debug output.
Definition: umlobject.cpp:1079
Definition: basictypes.h:79
QString number(int n, int base)
Definition: basictypes.h:82
Definition: listpopupmenu.h:89
bool generate(UMLScene *scene, const QString &variant=QString())
generate layout and apply it to the given diagram.
Definition: layoutgenerator.cpp:129
int count(const T &value) const
ListViewType type() const
Returns the type this instance represents.
Definition: umllistviewitem.cpp:231
virtual UMLWidget * widgetWithID(Uml::ID::Type id)
Returns the widget with the given ID.
Definition: umlwidget.cpp:219
qreal x() const
qreal y() const
void append(const T &value)
void setShowOpSig(bool bShowOpSig)
Sets whether to show operation signatures.
Definition: umlscene.cpp:3479
void sigSnapComponentSizeToGridToggled(bool)
bool isActivated() const
Returns true if the Activate method has been called for this instance.
Definition: umlwidget.cpp:1046
VisualProperty
This enumeration lists the visual properties that can be easily set, reset and toggled and all these ...
Definition: classifierwidget.h:42
bool snapComponentSizeToGrid() const
Return whether to use snap to grid for component size.
Definition: umlscene.cpp:3360
AssociationWidgetList selectedAssocs()
Returns a list with all the selected associations from the diagram.
Definition: umlscene.cpp:1866
bool isAccepted() const
void ignore()
bool loadWidgetsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3726
void setFolder(UMLFolder *folder)
Set the UMLFolder in which this diagram lives.
Definition: umlscene.cpp:198
Definition: statewidget.h:50
QString text() const
void sigResetToolBar()
void setVisualProperty(VisualProperty property, bool enable=true)
A convenient method to set and reset individual VisualProperty.
Definition: classifierwidget.cpp:199
Definition: basictypes.h:83
void forceUpdateFontMetrics(QPainter *painter)
Updates font metrics for widgets current m_font.
Definition: umlwidget.cpp:1747
qreal getSmallestX(const UMLWidgetList &widgetList)
Looks for the smallest x-value of the given UMLWidgets.
Definition: widgetlist_utils.cpp:29
Definition: widgetbase.h:46
UMLAssociation * association() const
Returns the UMLAssociation representation of this object.
Definition: associationwidget.cpp:555
Definition: listpopupmenu.h:86
virtual void setFillColor(const QColor &color)
Sets the background fill color.
Definition: umlwidget.cpp:955
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Adds an association to the view from the given data.
Definition: umlscene.cpp:1912
void setPen(const QColor &color)
void executeCommand(QUndoCommand *cmd)
Execute a command and push it in the stack.
Definition: uml.cpp:3227
void setAttribute(const QString &name, const QString &value)
Widget class for graphical representation of sequence lines.
Definition: seqlinewidget.h:24
bool isSelected() const
Definition: listpopupmenu.h:174
bool editCutCopy(bool bFromView)
Carries out the cut/copy command with different action performed depending on if from view or list vi...
Definition: uml.cpp:2040
int left() const
void setActivated(bool active)
Set the m_activated flag of a widget but does not perform the Activate method.
Definition: associationwidget.cpp:1805
Definition: listpopupmenu.h:104
Uml::ID::Type widgetIDForRole(Uml::RoleType::Enum role) const
Gets the ID of the given role widget.
Definition: associationwidget.cpp:1496
int toInt(bool *ok, int base) const
qreal getWidthsSum(const UMLWidgetList &widgetList)
Returns the sum of the widths of the given UMLWidgets.
Definition: widgetlist_utils.cpp:146
void changeCurrentView(Uml::ID::Type id)
Changes the current view (diagram) to the view with the given ID.
Definition: umldoc.cpp:1446
virtual bool loadFromXMI(QDomElement &qElement)
Loads from the "messagewidget" XMI element.
Definition: messagewidget.cpp:1333
bool isEmpty() const
UMLWidgetList selectedWidgetsExt(bool filterText=true)
Fills the List with all the selected widgets from the diagram The list can be filled with all the sel...
Definition: umlscene.cpp:1847
virtual void cleanBeforeChange()
Called when the current tool is changed to use another tool.
Definition: toolbarstate.cpp:59
bool hasSmallerY(const UMLWidget *widget1, const UMLWidget *widget2)
Returns true if the first widget's Y is smaller than second's.
Definition: widget_utils.cpp:547
virtual bool activate(IDChangeLog *ChangeLog=0)
Activate the object after serializing it from a QDataStream.
Definition: umlwidget.cpp:979
void setDocumentation(const QString &doc)
Set the documentation of the diagram.
Definition: umlscene.cpp:222
bool isEmpty() const
void selectWidgetsOfAssoc(AssociationWidget *a)
Selects all the widgets of the given association widget.
Definition: umlscene.cpp:1569
int removeAll(const T &value)
void moveEntireAssoc(qreal x, qreal y)
Moves the entire association by the given offset.
Definition: associationwidget.cpp:3861
int generateCollaborationId()
Used for creating unique name of collaboration messages.
Definition: umlscene.cpp:468
Uml::AssociationType::Enum getAssocType() const
Returns the AssociationType::Enum of the UMLAssociation.
Definition: association.cpp:103
UMLWidget * widgetAt(const QPointF &p)
Tests the given point against all widgets and returns the widget for which the point is within its bo...
Definition: umlscene.cpp:1007
Definition: listpopupmenu.h:188
void removeAssociation(UMLAssociation *assoc, bool doSetModified=true)
Removes an association.
Definition: umldoc.cpp:1073
AssociationWidgetList & associationList()
Returns a reference to the association list.
Definition: umlscene.cpp:444
Definition: widgetbase.h:56
void checkMessages(ObjectWidget *w)
Sees if a message is relevant to the given widget.
Definition: umlscene.cpp:1069
void drawText(const QPointF &position, const QString &text)
Definition: widgetbase.h:66
Definition: listpopupmenu.h:179
virtual void mouseDoubleClick(QGraphicsSceneMouseEvent *ome)
Handler for mouse double click events.
Definition: toolbarstate.cpp:143
Definition: listpopupmenu.h:99
Qt::MouseButton button() const
virtual void setUMLObject(UMLObject *obj)
Overriding the method from WidgetBase because we need to do something extra in case this AssociationW...
Definition: associationwidget.cpp:226
UMLSceneItemList collisions(const QPointF &p, int delta=3)
Definition: umlscene.cpp:1546
QString displayText() const
Use to get the total text (prepended + main body + appended) currently displayed by the widget...
Definition: floatingtextwidget.cpp:157
void deleteLater()
T & first()
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
Overrides the standard operation.
Definition: umlscene.cpp:935
Definition: listpopupmenu.h:184
ToolBarState * getState(const WorkToolBar::ToolBar_Buttons &toolbarButton, UMLScene *umlScene)
Definition: toolbarstatefactory.cpp:40
virtual bool loadFromXMI(QDomElement &qElement)
A virtual method to load the properties of this widget from a QDomElement into this widget...
Definition: umlwidget.cpp:1833
Definition: statewidget.h:46
UMLWidget * findWidget(Uml::ID::Type id)
Finds a widget with the given ID.
Definition: umlscene.cpp:1114
virtual void setLineWidth(uint width)
Overrides the method from WidgetBase, execute CmdChangeLineWidth.
Definition: umlwidget.cpp:934
UMLListViewItem * findItem(Uml::ID::Type id)
Searches through the tree for the item with the given ID.
Definition: umllistview.cpp:1362
bool autoIncrementSequence() const
Return the state of the auto increment sequence.
Definition: umlscene.cpp:230
Definition: umlobject.h:75
Definition: umlobject.h:68
Definition: listpopupmenu.h:84
QRectF rect() const
return drawing rectangle of widget in local coordinates
Definition: widgetbase.cpp:611
bool loadAssociationsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3802
Definition: basictypes.h:40
QPointF scenePos() const
Definition: listpopupmenu.h:81
void setModified(bool modified=true)
Sets the modified flag for the document after a modifying action on the view connected to the documen...
Definition: umldoc.cpp:2652
void sigTextColorChanged(Uml::ID::Type)
AssociationWidget * findAssocWidget(Uml::ID::Type id)
Finds an association widget with the given ID.
Definition: umlscene.cpp:1141
UMLWidget * makeWidgetFromXMI(const QString &tag, const QString &idStr, UMLScene *scene)
Create a UMLWidget according to the given XMI tag.
Definition: widget_factory.cpp:193
void getDiagram(QPixmap &diagram, const QRectF &rect)
Returns the PNG picture of the paste operation.
Definition: umlscene.cpp:1694
void activate()
Activate all the objects and associations after a load from the clipboard.
Definition: umlscene.cpp:1770
virtual void slotFillColorChanged(Uml::ID::Type viewID)
Captures a color change signal.
Definition: umlwidget.cpp:805
UMLWidgetList selectedWidgets() const
Returns a list of selected widgets.
Definition: umlscene.cpp:1285
bool loadUisDiagramPresentation(QDomElement &qElement)
Definition: umlscene.cpp:3848
void sigAssociationRemoved(AssociationWidget *)
UMLFolder * folder() const
Return the UMLFolder in which this diagram lives.
Definition: umlscene.cpp:190
void clearSelection()
Definition: umlobject.h:73
void deleteSelection()
Delete the selected widgets list and the widgets in it.
Definition: umlscene.cpp:1427
Definition: basictypes.h:81
virtual void cleanup()
Used to cleanup any other widget it may need to delete.
Definition: umlwidget.cpp:1461
qreal middle(qreal a, qreal b)
Return the middle value between a and b.
Definition: widget_utils.cpp:625
Definition: listpopupmenu.h:83
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
Override standard method.
Definition: umlscene.cpp:918
void setUseFillColor(bool ufc)
Sets whether to use the fill/background color.
Definition: umlscene.cpp:1266
virtual UMLWidget * onWidget(const QPointF &p)
Test if point is inside the bounding rectangle of the widget.
Definition: widgetbase.cpp:655
This class is the graphical version of a UML Activity.
Definition: activitywidget.h:33
iterator end()
UMLEntity * getReferencedEntity() const
Get the Referenced Entity.
Definition: foreignkeyconstraint.cpp:349
void accept()
bool blockSignals(bool block)
qreal right() const
void selectionSetFont(const QFont &font)
Set the font for all the currently selected items.
Definition: umlscene.cpp:1345
void selectionSetLineColor(const QColor &color)
Set the line color for all the currently selected items.
Definition: umlscene.cpp:1359
Definition: widgetbase.h:43
void slotMenuSelection(QAction *action)
When a menu selection has been made on the menu that this view created, this method gets called...
Definition: umlscene.cpp:2851
QString stereotype(bool includeAdornments=false) const
Returns the stereotype.
Definition: umlobject.cpp:579
Definition: basictypes.h:78
QDebug & space()
void saveToXMI(QDomElement &element, const OptionState &optstate)
Definition: optionstate.cpp:35
void removeWidget(UMLWidget *o)
Remove a widget from view (undo command)
Definition: umlscene.cpp:1217
UMLListViewItem * moveObject(Uml::ID::Type srcId, UMLListViewItem::ListViewType srcType, UMLListViewItem *newParent)
Moves an object given is unique ID and listview type to an other listview parent item.
Definition: umllistview.cpp:1597
QTreeWidgetItem * parent() const
void setUsesDiagramLineWidth(bool state)
Set state of diagram line width is used.
Definition: widgetbase.cpp:436
Definition: layoutgrid.h:35
bool isNull() const
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves this widget to the "assocwidget" XMI element.
Definition: associationwidget.cpp:4027
Definition: umlobject.h:76
bool loadUISDiagram(QDomElement &qElement)
Loads the "UISDiagram" tag of Unisys.IntegratePlus.2 generated files.
Definition: umlscene.cpp:3946
This class is used to set up information for a entity constraint.
Definition: entityconstraint.h:26
Definition: listpopupmenu.h:112
virtual void setLineColor(const QColor &color)
Overrides the method from WidgetBase.
Definition: umlwidget.cpp:924
Definition: basictypes.h:200
void createAutoConstraintAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2548
Definition: statewidget.h:54
Definition: umlobject.h:54
Definition: umlobject.h:51
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:782
void activateAfterLoad(bool bUseLog=false)
Activate the view after a load a new file.
Definition: umlscene.cpp:2003
void forceUpdateWidgetFontMetrics(QPainter *painter)
Force the widget font metrics to be updated next time the widgets are drawn.
Definition: umlscene.cpp:3523
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Creates the "diagram" tag and fills it with the contents of the diagram.
Definition: umlscene.cpp:3541
Definition: umlobject.h:64
Definition: listpopupmenu.h:87
Definition: umlobject.h:58
Enum fromInt(int item)
Convert an integer item into DiagramType representation.
Definition: basictypes.cpp:253
bool isVisible() const
Definition: listpopupmenu.h:79
UMLAttributeList getAttributeList() const
Returns the attributes for the specified scope.
Definition: classifier.cpp:449
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
A virtual method to save the properties of this widget into a QDomElement i.e xml.
Definition: umlwidget.cpp:1810
void attachToOwner()
Align this widget's position such that it is attached at one of the sides of its owner's widget...
Definition: pinportbase.cpp:155
QDomNode firstChild() const
UMLPackage * umlPackage()
Returns the UMLPackage that this class is located in.
Definition: umlobject.cpp:639
FloatingTextWidget * changeabilityWidget(Uml::RoleType::Enum role) const
Return the given role's changeability FloatingTextWidget widget.
Definition: associationwidget.cpp:869
qreal width() const
Definition: listpopupmenu.h:106
QString toString(Enum item)
Convert ModelType item into QString representation.
Definition: basictypes.cpp:39
void setShowDocumentationIndicator(bool bShow)
sets whether to show documentation indicator.
Definition: umlscene.cpp:3463
UMLWidget * createWidget(UMLScene *scene, UMLObject *o)
Create a UMLWidget in the given view and representing the given document object.
Definition: widget_factory.cpp:68
Definition: listpopupmenu.h:105
Uml::DiagramType::Enum diagramType(QString objType)
Definition: petaltree2uml.cpp:546
Definition: widgetbase.h:53
Definition: basictypes.h:77
void getWidgetAssocs(UMLObject *Obj, AssociationWidgetList &Associations)
Fills Associations with all the associations that includes a widget related to object.
Definition: umlscene.cpp:2128
UMLView * activeView() const
Returns the active view associated with this scene.
Definition: umlscene.cpp:206
void exportView()
Shows a save dialog to the user to get the needed parameters and then exports the view...
Definition: umlviewimageexporter.cpp:64
void setBottom(qreal y)
UMLClassifier * originType() const
Get the origin type (in case of e.g.
Definition: classifier.cpp:1280
Definition: umlobject.h:57
Definition: listpopupmenu.h:170
The ToolBarStateFactory keeps track of all the toolbar states.
Definition: toolbarstatefactory.h:32
void makeSelected(UMLWidget *uw)
Calls setSelected on the given UMLWidget and enters it into the m_selectedList while making sure it i...
Definition: umlscene.cpp:1559
This sub-class adds copyInto and clone to the QList base class.
Definition: umlobjectlist.h:26
void setTop(qreal y)
QFontMetrics fontMetrics() const
ObjectWidget * onWidgetLine(const QPointF &point) const
Determine whether on a sequence diagram we have clicked on a line of an Object.
Definition: umlscene.cpp:947
void setCreateObject(bool bCreate)
Set whether we are currently creating an object.
Definition: umlscene.cpp:581
void removeDiagram(Uml::ID::Type id)
Deletes a diagram from the current file.
Definition: umldoc.cpp:1473
QString roleName(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget widget text.
Definition: associationwidget.cpp:972
void setX(qreal x)
void setY(qreal y)
void setWidget(ClassifierWidget *pWidget)
Set related uml widget.
Definition: classoptionspage.cpp:106
void sigLineWidthChanged(Uml::ID::Type)
WidgetBase::WidgetType getUniqueSelectionType()
Returns the type of the selected widget or widgets.
Definition: umlscene.cpp:3267
Definition: listpopupmenu.h:85
void update(qreal x, qreal y, qreal w, qreal h)
void setSnapComponentSizeToGrid(bool bSnap)
Sets whether to snap to grid for component size.
Definition: umlscene.cpp:3368
QString folderFile() const
Get the folder file name for a separate submodel.
Definition: folder.cpp:255
int height() const
void dragEnterEvent(QGraphicsSceneDragDropEvent *enterEvent)
Override standard method.
Definition: umlscene.cpp:694
void removeAllAssociations()
Removes All the associations of the diagram.
Definition: umlscene.cpp:2144
void adjust(int dx1, int dy1, int dx2, int dy2)
virtual void setFont(const QFont &font)
Sets the font the widget is to use.
Definition: umlwidget.cpp:1720
int bottom() const
A popup menu that depending on what type is set to will display a different menu. ...
Definition: listpopupmenu.h:40
Definition: widgetbase.h:68
void selectionSetLineWidth(uint width)
Set the line width for all the currently selected items.
Definition: umlscene.cpp:1377
Definition: widgetbase.h:55
QString autoIncrementSequenceValue()
Return the next auto increment sequence value.
Definition: umlscene.cpp:243
Uml::ID::Type m_nLocalID
Contains the unique ID to allocate to a widget that needs an ID for the view.
Definition: umlscene.h:315
void clipSize()
clip the size of this widget against the minimal and maximal limits.
Definition: umlwidget.cpp:1572
static bool isTextValid(const QString &text)
For a text to be valid it must be non-empty, i.e.
Definition: floatingtextwidget.cpp:497
bool isSnapGridVisible() const
Returns whether to show snap grid or not.
Definition: umlscene.cpp:3438
QRect pageRect() const
void setVisible(bool visible)
Definition: listpopupmenu.h:98
void sigWidgetRemoved(UMLWidget *)
virtual void setUseFillColor(bool fc)
Set the status of using fill color (undo action)
Definition: umlwidget.cpp:874
qreal snappedY(qreal y)
Returns the input coordinate with possible grid-snap applied.
Definition: umlscene.cpp:3420
qreal height() const
QRectF itemsBoundingRect() const
bool onDestructionBox(const QPointF &p)
Return whether point is on the destruction box.
Definition: seqlinewidget.cpp:78
void setFont(QFont font, bool changeAllWidgets=false)
Sets the font for the view and optionally all the widgets on the view.
Definition: umlscene.cpp:3199
bool contains(const QPointF &point) const
void selectWidget(UMLWidget *widget, QRectF *rect=0)
Select a single widget.
Definition: umlscene.cpp:1637
QDebug operator<<(QDebug dbg, UMLScene *item)
Overloading operator for debugging output.
Definition: umlscene.cpp:4173
QString tagName() const
Definition: listpopupmenu.h:88
Definition: statewidget.h:53
Definition: cmd_removeWidget.h:22
void createAutoAssociations(UMLWidget *widget)
Creates automatically any Associations that the given UMLWidget may have on any diagram.
Definition: umlscene.cpp:2234
Definition: widgetbase.h:52
void cleanup()
CleansUp all the association's data in the related widgets.
Definition: associationwidget.cpp:1288
bool hasSmallerX(const UMLWidget *widget1, const UMLWidget *widget2)
Returns true if the first widget's X is smaller than second's.
Definition: widget_utils.cpp:536
virtual bool activate()
Activates the AssociationWidget after a load.
Definition: associationwidget.cpp:708
static bool allowAssociation(Uml::AssociationType::Enum assocType, UMLWidget *widget)
Returns whether an association is going to be allowed for the given values.
Definition: assocrules.cpp:50
Definition: listpopupmenu.h:110
virtual void adjustAssocs(qreal dx, qreal dy)
Adjusts associations with the given co-ordinates.
Definition: umlwidget.cpp:1089
UMLViewImageExporter * getImageExporter()
Returns the imageExporter used to export the view.
Definition: umlscene.cpp:1754
Definition: umlobject.h:53
QPointF getPastePoint()
Returns the offset point at which to place the paste from clipboard.
Definition: umlscene.cpp:3163
void clearDiagram()
Asks for confirmation and clears everything on the diagram.
Definition: umlscene.cpp:3291
Definition: listpopupmenu.h:111
static MenuType typeFromAction(QAction *action)
Convenience method to extract the ListPopupMenu type from an action.
Definition: listpopupmenu.cpp:1234
QDomElement createElement(const QString &tagName)
void setWidgetForRole(UMLWidget *widget, Uml::RoleType::Enum role)
Set the widget of the given role.
Definition: associationwidget.cpp:826
bool loadMessagesFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3773
void addFloatingTextWidget(FloatingTextWidget *pWidget)
Adds a floating text widget to the view.
Definition: umlscene.cpp:1880
FloatingTextWidget * floatingTextWidget()
Returns the text widget it is related to.
Definition: messagewidget.h:96
UMLWidget * getFirstMultiSelectedWidget() const
Return pointer to the first selected widget (for multi-selection)
Definition: umlscene.cpp:993
void setFontCmd(const QFont &font)
Sets the font the widget is to use.
Definition: umlwidget.cpp:1735
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
The class LayoutGenerator provides calculated layouts of diagrams.
Definition: layoutgenerator.h:38
QObject * parent() const
virtual IDChangeLog * changeLog()
Read property of IDChangeLog* m_pChangeLog.
Definition: umldoc.cpp:2752
UMLWidget * widgetForRole(Uml::RoleType::Enum role) const
Gets the given role widget.
Definition: associationwidget.cpp:1254
Definition: listpopupmenu.h:109
void setClassWidgetOptions(ClassOptionsPage *page)
Sets some options for all the ClassifierWidget on the view.
Definition: umlscene.cpp:3212
virtual void mousePress(QGraphicsSceneMouseEvent *ome)
Handler for mouse press events.
Definition: toolbarstate.cpp:78
QRect rect() const
QString toString() const
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:32
MessageWidgetList & messageList()
Returns a reference to the message list.
Definition: umlscene.cpp:460
UMLListViewItem::ListViewType convert_OT_LVT(UMLObject *o)
Convert an object's type to the equivalent list view type.
Definition: model_utils.cpp:1290
void showChangeTextDialog()
Displays a dialog box to change the text.
Definition: floatingtextwidget.cpp:202
UMLWidget * loadWidgetFromXMI(QDomElement &widgetElement)
Loads a "widget" element from XMI, used by loadFromXMI() and the clipboard.
Definition: umlscene.cpp:3752
iterator begin()
void print(QPrinter *pPrinter, QPainter &pPainter)
Contains the implementation for printing functionality.
Definition: umlscene.cpp:494
Definition: basictypes.h:42
UMLWidget * onWidget(const QPointF &p)
Overrides operation from UMLWidget.
Definition: messagewidget.cpp:598
bool m_bUseSnapComponentSizeToGrid
Flag to use snap to grid for component size. The default is off.
Definition: umlscene.h:328
Definition: umlobject.h:55
FloatingTextWidget * nameWidget() const
Read property of FloatingTextWidget* m_nameWidget.
Definition: associationwidget.cpp:851
int lineSpacing() const
void sigLineColorChanged(Uml::ID::Type)
UMLObjectList containedObjects()
Returns the list of objects contained in this package.
Definition: package.cpp:230
Uml::AssociationType::Enum associationType() const
Gets the association's type.
Definition: associationwidget.cpp:1448
ObjectWidget * onWidgetDestructionBox(const QPointF &point) const
Determine whether on a sequence diagram we have clicked on the destruction box of an Object...
Definition: umlscene.cpp:972
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Sets the visibility on the given role of the association.
Definition: associationwidget.cpp:1119
Definition: listpopupmenu.h:260
This class contains the non-graphical information required for a UML Entity.
Definition: entity.h:34
AssociationWidgetList m_AssociationList
All the AssociationWidgets on the diagram.
Definition: umlscene.h:325
Definition: widgetbase.h:72
Definition: umlobject.h:65
qreal width() const
void moveSelectedBy(qreal dX, qreal dY)
Move all the selected widgets by a relative X and Y offset.
Definition: umlscene.cpp:1314
void signalUMLObjectCreated(UMLObject *o)
Signal that a UMLObject has been created.
Definition: umldoc.cpp:1649
bool typeIsFolder(UMLListViewItem::ListViewType type)
Return true if the listview type is a logical, usecase or component folder.
Definition: model_utils.cpp:974
qreal getHeightsSum(const UMLWidgetList &widgetList)
Returns the sum of the heights of the given UMLWidgets.
Definition: widgetlist_utils.cpp:131
FloatingTextWidget * multiplicityWidget(Uml::RoleType::Enum role) const
Return the multiplicity FloatingTextWidget widget of the given role.
Definition: associationwidget.cpp:841
bool hasNext() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.