umbrello/umbrello
umlscene.cpp
Go to the documentation of this file.
501 pPainter.drawText(page.left(), page.bottom() + 3, page.right(), 2*fontHeight, Qt::AlignLeft, string);
563 disconnect(m_doc, SIGNAL(sigObjectCreated(UMLObject*)), this, SLOT(slotObjectCreated(UMLObject*)));
860 DEBUG(DBG_SRC) << "association widget = " << association->name() << " / type = " << association->baseTypeStr();
1189 disconnect(this, SIGNAL(sigFillColorChanged(Uml::ID::Type)), o, SLOT(slotFillColorChanged(Uml::ID::Type)));
1190 disconnect(this, SIGNAL(sigLineColorChanged(Uml::ID::Type)), o, SLOT(slotLineColorChanged(Uml::ID::Type)));
1191 disconnect(this, SIGNAL(sigTextColorChanged(Uml::ID::Type)), o, SLOT(slotTextColorChanged(Uml::ID::Type)));
1241 DEBUG(DBG_SRC) << "association = " << association->name() << " / type = " << association->baseTypeStr();
1499 selectWidgets(sceneRect().left(), sceneRect().top(), sceneRect().right(), sceneRect().bottom());
1692 DEBUG(DBG_SRC) << "painter=" << painter.window() << ", source=" << source << ", target=" << target;
2613 AssociationWidget *a = AssociationWidget::create(this, pWidget, Uml::AssociationType::Containment, widget);
2626 if (widget == NULL || m_Type != Uml::DiagramType::Class || !m_Options.classState.showAttribAssocs)
2715 if (assocType == Uml::AssociationType::Aggregation || assocType == Uml::AssociationType::UniAssociation)
2785 UMLClassifierListItemList constrList = entity->getFilteredList(UMLObject::ot_ForeignKeyConstraint);
2804 void UMLScene::createAutoConstraintAssociation(UMLEntity* refEntity, UMLForeignKeyConstraint* fkConstraint, UMLWidget* widget)
2820 // for foreign key contstraint, we need to create the association type Uml::AssociationType::Relationship.
2821 // The referenced entity is the "1" part (Role A) and the entity holding the relationship is the "many" part. (Role B)
2852 void UMLScene::findMaxBoundingRectangle(const FloatingTextWidget* ft, qreal& px, qreal& py, qreal& qx, qreal& qy)
4313 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:435
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:111
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:990
void setUsesDiagramFillColor(bool state)
Set state if diagram fill color is used.
Definition: widgetbase.cpp:382
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:2975
Definition: umldragdata.h:67
UMLObject * getObject(Uml::RoleType::Enum role) const
Returns the UMLObject assigned to the given role.
Definition: association.cpp:476
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:966
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:1073
Definition: listpopupmenu.h:165
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
Definition: umlobject.h:62
void setAssociationType(Uml::AssociationType::Enum type)
Sets the association's type.
Definition: associationwidget.cpp:1440
bool useFillColor() const
Returns whether to use the fill/background color.
Definition: umlscene.cpp:1203
void calculateEndingPoints()
Calculates and sets the first and last point in the Association's AssociationLine.
Definition: associationwidget.cpp:1618
Definition: widgetbase.h:64
virtual void slotTextColorChanged(Uml::ID::Type viewID)
Captures a text color change signal.
Definition: umlwidget.cpp:764
bool widgetOnDiagram(Uml::ID::Type id)
Returns whether a widget is already on the diagram.
Definition: umlscene.cpp:1047
This sub-class adds copyInto and clone to the QPtrList base class...
Definition: umlclassifierlistitemlist.h:26
Definition: listpopupmenu.h:195
Definition: widgetbase.h:51
void setAutoIncrementSequenceValue(const QString &value)
Definition: umlscene.cpp:232
void slotShowView()
Called by menu when to show the instance of the view.
Definition: umlscene.cpp:3351
void fileLoaded()
Changes the zoom to the currently set level (now loaded from file) Called from UMLApp::slotUpdateView...
Definition: umlscene.cpp:3691
Uml::SequenceMessage::Enum sequenceMessageType() const
Definition: messagewidget.h:83
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:2957
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
int selectedCount(bool filterText=false) const
Return the amount of widgets selected.
Definition: umlscene.cpp:1831
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:3382
A dialog page to display options for class related options.
Definition: classoptionspage.h:37
Definition: activitywidget.h:40
void resizeSceneToItems()
Sets the size of the scene to just fit on all the items.
Definition: umlscene.cpp:3700
QString autoIncrementSequenceValue(int increment=0) const
Definition: umlscene.cpp:227
void toggleVisualProperty(VisualProperty property)
A convenient method to toggle individual VisualProperty of this widget.
Definition: classifierwidget.cpp:219
void removeAssoc(AssociationWidget *pAssoc)
Removes a AssociationWidget from a diagram Physically deletes the AssociationWidget passed in...
Definition: umlscene.cpp:2252
qreal snappedX(qreal x)
Returns the input coordinate with possible grid-snap applied.
Definition: umlscene.cpp:3605
UMLObject * umlObject() const
Returns the UMLObject set to represent.
Definition: widgetbase.cpp:113
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:1017
void updateComponentSizes()
Updates the size of all components in this view.
Definition: umlscene.cpp:3709
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
void findMaxBoundingRectangle(const FloatingTextWidget *ft, qreal &px, qreal &py, qreal &qx, qreal &qy)
Find the maximum bounding rectangle of FloatingTextWidget widgets.
Definition: umlscene.cpp:2852
void removeAssocInViewAndDoc(AssociationWidget *assoc)
Removes an AssociationWidget from the association list and removes the corresponding UMLAssociation f...
Definition: umlscene.cpp:2269
Definition: widgetbase.h:48
void setYEntireAssoc(qreal y)
Set all association points to y coordinate.
Definition: associationwidget.cpp:3791
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:2624
bool isSavedInSeparateFile()
Returns true if this diagram resides in an externalized folder.
Definition: umlscene.cpp:1517
static QString toString(MenuType menu)
Convert enum MenuType to string.
Definition: listpopupmenu.cpp:1986
QString toString(Enum item)
Convert DiagramType item into QString representation.
Definition: basictypes.cpp:158
Definition: basictypes.h:209
Definition: widgetbase.h:44
This is an interface realized by AssociationWidget and MessageWidget.
Definition: linkwidget.h:35
Definition: umlobject.h:66
Uml::Visibility::Enum visibility() const
Returns the visibility of the object.
Definition: umlobject.cpp:435
bool hasObjectWidget(ObjectWidget *w)
Check to see if the given ObjectWidget is involved in the message.
Definition: messagewidget.cpp:743
qreal getSmallestY(const UMLWidgetList &widgetList)
Looks for the smallest y-value of the given UMLWidgets.
Definition: widgetlist_utils.cpp:52
void slotActivate()
makes this view the active view by asking the document to show us
Definition: umlscene.cpp:1744
Definition: listpopupmenu.h:162
Definition: basictypes.h:76
void addObject(UMLObject *object)
Add an object to the application, and update the view.
Definition: umlscene.cpp:4032
ObjectWidget * objectWidget(Uml::RoleType::Enum role)
Returns the related widget on the given side.
Definition: messagewidget.cpp:1257
UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Reimplementation of getFilteredList to support ot=UMLObject::ot_EntityConstraint. ...
Definition: entity.cpp:642
Definition: umlobject.h:55
void setXEntireAssoc(qreal x)
Set all association points to x coordinate.
Definition: associationwidget.cpp:3778
static bool tagEq(const QString &tag, const QString &pattern)
Function for comparing tags in XMI files.
Definition: umldoc.cpp:3030
void showDocumentation(UMLObject *object, bool overwrite=false)
Called when a widget wishes to display its documentation in the doc window.
Definition: docwindow.cpp:87
Uml::TextRole::Enum textRole() const
Return the role of the text widget.
Definition: floatingtextwidget.cpp:364
MessageWidget * messageAt(const QPointF &p)
Tests the given point against all associations and returns the association widget for which the point...
Definition: umlscene.cpp:1005
void setDiagramLink(Uml::ID::Type viewID)
Set the ID of the diagram hyperlinked to this note.
Definition: notewidget.cpp:163
Definition: umlobject.h:51
This class contains all the ID translations done for each UMLObject pasted.
Definition: idchangelog.h:26
void setSelected(bool _select=true)
Sets the state of whether the widget is selected.
Definition: associationwidget.cpp:3675
Definition: listpopupmenu.h:89
void selectAssociations(bool bSelect)
Sets each association as selected if the widgets it associates are selected.
Definition: umlscene.cpp:2317
Definition: listpopupmenu.h:163
Definition: basictypes.h:210
virtual void setUMLObject(UMLObject *obj)
Sets the UMLObject to represent.
Definition: widgetbase.cpp:123
Definition: cmd_createWidget.h:20
virtual bool loadFromXMI(QDomElement &qElement)
Loads the "diagram" tag.
Definition: umlscene.cpp:3813
Definition: listpopupmenu.h:157
virtual void drawBackground(QPainter *painter, const QRectF &rect)
Overrides standard method from QGraphicsScene drawing the background.
Definition: umlscene.cpp:3736
virtual void slotLineWidthChanged(Uml::ID::Type viewID)
Captures a linewidth change signal.
Definition: umlwidget.cpp:796
virtual void setSelected(bool _select)
Sets the state of whether the widget is selected.
Definition: umlwidget.cpp:1253
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
Overrides the standard operation.
Definition: umlscene.cpp:828
Definition: widgetbase.h:71
This sub-class adds copyInto and clone to the QPtrList base class.
Definition: umlattributelist.h:26
Definition: basictypes.h:113
void updateDocumentation(bool clear=false, bool startup=false)
Call when you wish move changes in the doc window back into the members documentation.
Definition: docwindow.cpp:205
void slotObjectRemoved(UMLObject *o)
Slot called when an object is removed.
Definition: umlscene.cpp:652
void copyAsImage(QPixmap *&pix)
Returns the PNG picture of the paste operation.
Definition: umlscene.cpp:2875
void moveByLocal(qreal dx, qreal dy)
Move the widget by an X and Y offset relative to the current position.
Definition: umlwidget.cpp:1089
This class contains the non-graphical information required for UMLObjects which appear as moveable wi...
Definition: umlcanvasobject.h:33
Definition: widgetbase.h:57
Definition: basictypes.h:84
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
Override standard method.
Definition: umlscene.cpp:837
void toggleSnapComponentSizeToGrid()
Changes snap to grid for component size boolean.
Definition: umlscene.cpp:3529
void selectWidgets(qreal px, qreal py, qreal qx, qreal qy)
Selects all the widgets within an internally kept rectangle.
Definition: umlscene.cpp:1596
void selectionUseFillColor(bool useFC)
Set the useFillColor variable to all selected widgets.
Definition: umlscene.cpp:1318
Definition: basictypes.h:80
Definition: listpopupmenu.h:203
Definition: statewidget.h:48
const Settings::OptionState & optionState() const
Returns the options being used.
Definition: umlscene.cpp:400
UMLObjectList umlObjects()
Returns a List of all the UMLObjects(Use Cases, Concepts and Actors) in the View. ...
Definition: umlscene.cpp:1752
bool isSelected() const
Returns the state of whether the widget is selected.
Definition: umlwidget.h:87
bool onAssociation(const QPointF &point)
Returns true if the given point is on the association line.
Definition: associationwidget.cpp:3748
Definition: widgetbase.h:47
FloatingTextWidget * roleWidget(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget object.
Definition: associationwidget.cpp:854
void setOptionState(const Settings::OptionState &options)
Sets the options to be used.
Definition: umlscene.cpp:408
void updateContainment(UMLCanvasObject *self)
Refreshes containment association, i.e.
Definition: umlscene.cpp:2389
void selectionSetFillColor(const QColor &color)
Set the fill color for all the currently selected items.
Definition: umlscene.cpp:1372
static QVariant dataFromAction(DataType key, QAction *action)
Returns the data from the given action to the given key.
Definition: listpopupmenu.cpp:1234
void setAutoIncrementSequence(bool state)
Definition: umlscene.cpp:222
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:872
static bool getClip3TypeAndID(const QMimeData *mimeData, LvTypeAndID_List &typeAndIdList)
Return just the LvTypeAndID of a Clip3.
Definition: umldragdata.cpp:474
bool isShowDocumentationIndicator() const
Returns whether to show documentation indicator.
Definition: umlscene.cpp:3658
Definition: worktoolbar.h:57
Definition: listpopupmenu.h:106
QString name() const
Gets the name from the corresponding UMLObject if this widget has an underlying UMLObject; if it does...
Definition: widgetbase.cpp:197
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:244
Definition: widgetbase.h:59
Definition: widgetbase.h:65
void dragMoveEvent(QGraphicsSceneDragDropEvent *moveEvent)
Override standard method.
Definition: umlscene.cpp:772
void syncToModel()
Synchronize this widget from the UMLAssociation.
Definition: associationwidget.cpp:1762
void slotCutSuccessful()
Connects to the signal that UMLApp emits when a cut operation is successful.
Definition: umlscene.cpp:3340
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:164
void slotObjectCreated(UMLObject *o)
Slot called when an object is created.
Definition: umlscene.cpp:587
Definition: optionstate.h:141
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
void setName(const QString &strName)
Sets the name in the corresponding UMLObject.
Definition: widgetbase.cpp:210
LinkWidget * link() const
Returns the LinkWidget this floating text is related to.
Definition: floatingtextwidget.cpp:345
Definition: basictypes.h:151
void removeAssociations(UMLWidget *pWidget)
Removes all the associations related to Widget.
Definition: umlscene.cpp:2303
UMLAssociationList getAssociations()
Return the list of associations for the CanvasObject.
Definition: umlcanvasobject.cpp:337
Definition: activitywidget.h:41
Definition: statewidget.h:49
bool getCreateObject() const
Return whether we are currently creating an object.
Definition: umlscene.cpp:532
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:162
bool containsAsEndpoint(UMLWidget *widget)
Returns true if the Widget is either at the starting or ending side of the association.
Definition: associationwidget.cpp:1400
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:4059
void slotToolBarChanged(int c)
Changes the current tool to the selected tool.
Definition: umlscene.cpp:574
void dropEvent(QGraphicsSceneDragDropEvent *dropEvent)
Override standard method.
Definition: umlscene.cpp:780
Uml::ID::Type localID() const
Returns the local ID for this object.
Definition: objectwidget.cpp:100
static QString toString(ObjectType ot)
Helper function for debug output.
Definition: umlobject.cpp:1094
Definition: basictypes.h:79
Definition: basictypes.h:82
Definition: listpopupmenu.h:88
bool generate(UMLScene *scene, const QString &variant=QString())
generate layout and apply it to the given diagram.
Definition: layoutgenerator.h:156
ListViewType type() const
Returns the type this instance represents.
Definition: umllistviewitem.cpp:231
void setShowOpSig(bool bShowOpSig)
Sets whether to show operation signatures.
Definition: umlscene.cpp:3682
bool isActivated() const
Returns true if the Activate method has been called for this instance.
Definition: umlwidget.cpp:957
bool snapComponentSizeToGrid() const
Return whether to use snap to grid for component size.
Definition: umlscene.cpp:3563
AssociationWidgetList selectedAssocs()
Returns a list with all the selected associations from the diagram.
Definition: umlscene.cpp:1875
bool loadWidgetsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3919
void setFolder(UMLFolder *folder)
Set the UMLFolder in which this diagram lives.
Definition: umlscene.cpp:185
Definition: statewidget.h:50
void setSelected(UMLWidget *w, QGraphicsSceneMouseEvent *me)
Sets a widget to a selected state and adds it to a list of selected widgets.
Definition: umlscene.cpp:1262
Definition: widgetbase.h:49
Definition: basictypes.h:83
void forceUpdateFontMetrics(QPainter *painter)
Definition: umlwidget.cpp:1657
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:548
Definition: listpopupmenu.h:85
virtual void setFillColor(const QColor &color)
Sets the background fill color.
Definition: umlwidget.cpp:868
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Adds an association to the view from the given data.
Definition: umlscene.cpp:2119
void executeCommand(QUndoCommand *cmd)
Execute a command and pushit in the stack.
Definition: uml.cpp:3077
Widget class for graphical representation of sequence lines.
Definition: seqlinewidget.h:24
Definition: listpopupmenu.h:158
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:1955
void setActivated(bool active)
Set the m_activated flag of a widget but does not perform the Activate method.
Definition: associationwidget.cpp:1754
Definition: listpopupmenu.h:103
Uml::ID::Type widgetIDForRole(Uml::RoleType::Enum role) const
Gets the ID of the given role widget.
Definition: associationwidget.cpp:1475
qreal getWidthsSum(const UMLWidgetList &widgetList)
Returns the sum of the widths of the given UMLWidgets.
Definition: widgetlist_utils.cpp:146
virtual bool loadFromXMI(QDomElement &qElement)
Loads from the "messagewidget" XMI element.
Definition: messagewidget.cpp:1326
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:1856
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:890
void setDocumentation(const QString &doc)
Set the documentation of the diagram.
Definition: umlscene.cpp:209
void selectWidgetsOfAssoc(AssociationWidget *a)
Selects all the widgets of the given association widget.
Definition: umlscene.cpp:1576
void moveEntireAssoc(qreal x, qreal y)
Moves the entire association by the given offset.
Definition: associationwidget.cpp:3822
int generateCollaborationId()
Used for creating unique name of collaboration messages.
Definition: umlscene.cpp:440
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:968
Definition: listpopupmenu.h:174
void setActivated(bool active=true)
Set the m_activated flag of a widget but does not perform the Activate method.
Definition: umlwidget.cpp:967
AssociationWidgetList & associationList()
Returns a reference to the association list.
Definition: umlscene.cpp:416
Definition: widgetbase.h:56
void checkMessages(ObjectWidget *w)
Sees if a message is relevant to the given widget.
Definition: umlscene.cpp:1019
Definition: widgetbase.h:66
Definition: listpopupmenu.h:161
Definition: listpopupmenu.h:98
virtual void setUMLObject(UMLObject *obj)
Overriding the method from WidgetBase because we need to do something extra in case this AssociationW...
Definition: associationwidget.cpp:227
UMLSceneItemList collisions(const QPointF &p, int delta=3)
Definition: umlscene.cpp:1551
QString displayText() const
Use to get the total text (prepended + main body + appended) currently displayed by the widget...
Definition: floatingtextwidget.cpp:155
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
Overrides the standard operation.
Definition: umlscene.cpp:896
Definition: listpopupmenu.h:166
Definition: widgetbase.h:60
virtual bool loadFromXMI(QDomElement &qElement)
A virtual method to load the properties of this widget from a QDomElement into this widget...
Definition: umlwidget.cpp:1726
Definition: statewidget.h:46
UMLWidget * findWidget(Uml::ID::Type id)
Finds a widget with the given ID.
Definition: umlscene.cpp:1069
virtual void setLineWidth(uint width)
Overrides the method from WidgetBase.
Definition: umlwidget.cpp:857
UMLListViewItem * findItem(Uml::ID::Type id)
Searches through the tree for the item with the given ID.
Definition: umllistview.cpp:1232
bool autoIncrementSequence() const
Return the state of the auto increment sequence.
Definition: umlscene.cpp:217
Definition: umlobject.h:74
Definition: umlobject.h:67
Definition: listpopupmenu.h:83
QRectF rect() const
return drawing rectangle of widget in local coordinates
Definition: widgetbase.cpp:600
bool loadAssociationsFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3995
Definition: listpopupmenu.h:81
AssociationWidget * findAssocWidget(Uml::ID::Type id)
Finds an association widget with the given ID.
Definition: umlscene.cpp:1096
UMLWidget * makeWidgetFromXMI(const QString &tag, const QString &idStr, UMLScene *scene)
Create a UMLWidget according to the given XMI tag.
Definition: widget_factory.cpp:184
void getDiagram(QPixmap &diagram, const QRectF &rect)
Returns the PNG picture of the paste operation.
Definition: umlscene.cpp:1677
void activate()
Activate all the objects and associations after a load from the clipboard.
Definition: umlscene.cpp:1779
virtual void slotFillColorChanged(Uml::ID::Type viewID)
Captures a color change signal.
Definition: umlwidget.cpp:744
QListIterator< LvTypeAndID * > LvTypeAndID_It
Definition: umldragdata.h:72
UMLWidgetList selectedWidgets() const
Returns a list of selected widgets.
Definition: umlscene.cpp:1283
bool loadUisDiagramPresentation(QDomElement &qElement)
Definition: umlscene.cpp:4041
UMLFolder * folder() const
Return the UMLFolder in which this diagram lives.
Definition: umlscene.cpp:177
Definition: umlobject.h:72
void deleteSelection()
Delete the selected widgets list and the widgets in it.
Definition: umlscene.cpp:1442
Definition: basictypes.h:81
virtual void cleanup()
Used to cleanup any other widget it may need to delete.
Definition: umlwidget.cpp:1391
Definition: listpopupmenu.h:82
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
Override standard method.
Definition: umlscene.cpp:879
void setUseFillColor(bool ufc)
Sets whether to use the fill/background color.
Definition: umlscene.cpp:1211
This class is the graphical version of a UML Activity.
Definition: activitywidget.h:33
UMLEntity * getReferencedEntity() const
Get the Referenced Entity.
Definition: foreignkeyconstraint.cpp:349
void selectionSetFont(const QFont &font)
Set the font for all the currently selected items.
Definition: umlscene.cpp:1328
void selectionSetLineColor(const QColor &color)
Set the line color for all the currently selected items.
Definition: umlscene.cpp:1338
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:3050
QString stereotype(bool includeAdornments=false) const
Returns the stereotype.
Definition: umlobject.cpp:581
Definition: basictypes.h:78
void saveToXMI(QDomElement &element, const OptionState &optstate)
Definition: optionstate.cpp:35
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:1543
void setUsesDiagramLineWidth(bool state)
Set state of diagram line width is used.
Definition: widgetbase.cpp:422
Definition: layoutgrid.h:35
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves this widget to the "assocwidget" XMI element.
Definition: associationwidget.cpp:3988
bool loadUISDiagram(QDomElement &qElement)
Loads the "UISDiagram" tag of Unisys.IntegratePlus.2 generated files.
Definition: umlscene.cpp:4139
This class is used to set up information for a entity constraint.
Definition: entityconstraint.h:26
Definition: listpopupmenu.h:111
virtual void setLineColor(const QColor &color)
Overrides the method from WidgetBase.
Definition: umlwidget.cpp:849
Definition: basictypes.h:194
void createAutoConstraintAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2755
Definition: statewidget.h:54
Definition: umlobject.h:53
void selectionToggleShow(int sel)
Toggles the show setting sel of all selected items.
Definition: umlscene.cpp:1386
Definition: umlobject.h:50
void activateAfterLoad(bool bUseLog=false)
Activate the view after a load a new file.
Definition: umlscene.cpp:2210
void forceUpdateWidgetFontMetrics(QPainter *painter)
Force the widget font metrics to be updated next time the widgets are drawn.
Definition: umlscene.cpp:3726
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Creates the "diagram" tag and fills it with the contents of the diagram.
Definition: umlscene.cpp:3744
Definition: umlobject.h:63
Definition: listpopupmenu.h:86
Definition: widgetbase.h:58
Definition: umlobject.h:57
Enum fromInt(int item)
Convert an integer item into DiagramType representation.
Definition: basictypes.cpp:253
Definition: listpopupmenu.h:79
UMLAttributeList getAttributeList() const
Returns the attributes for the specified scope.
Definition: classifier.cpp:441
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:1707
bool checkUniqueSelection()
This function checks if the currently selected items have all the same type (class, interface, ...).
Definition: umlscene.cpp:3470
UMLPackage * umlPackage()
Returns the UMLPackage that this class is located in.
Definition: umlobject.cpp:641
FloatingTextWidget * changeabilityWidget(Uml::RoleType::Enum role) const
Return the given role's changeability FloatingTextWidget widget.
Definition: associationwidget.cpp:862
Definition: listpopupmenu.h:105
void setShowDocumentationIndicator(bool bShow)
sets whether to show documentation indicator.
Definition: umlscene.cpp:3666
UMLWidget * createWidget(UMLScene *scene, UMLObject *o)
Create a UMLWidget in the given view and representing the given document object.
Definition: widget_factory.cpp:67
Definition: listpopupmenu.h:104
Definition: widgetbase.h:67
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:2335
Definition: widgetbase.h:50
UMLView * activeView() const
Returns the active view associated with this scene.
Definition: umlscene.cpp:193
void cleanup()
Used to cleanup any other widget it may need to delete.
Definition: messagewidget.cpp:1162
UMLClassifier * originType() const
Get the origin type (in case of e.g.
Definition: classifier.cpp:1272
Definition: umlobject.h:56
Definition: listpopupmenu.h:156
The ToolBarStateFactory keeps track of all the toolbar states.
Definition: toolbarstatefactory.h:33
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:1564
This sub-class adds copyInto and clone to the QList base class.
Definition: umlobjectlist.h:26
virtual qreal onWidget(const QPointF &p)
Returns 0 if the given point is not in the boundaries of the widget, else returns a number which is p...
Definition: umlwidget.cpp:1071
ObjectWidget * onWidgetLine(const QPointF &point) const
Determine whether on a sequence diagram we have clicked on a line of an Object.
Definition: umlscene.cpp:908
void setCreateObject(bool bCreate)
Set whether we are currently creating an object.
Definition: umlscene.cpp:540
QString roleName(Uml::RoleType::Enum role) const
Return the given role's FloatingTextWidget widget text.
Definition: associationwidget.cpp:953
int onDestructionBox(const QPointF &p)
Return whether on the destruction box.
Definition: seqlinewidget.cpp:78
void setWidget(ClassifierWidget *pWidget)
Set related uml widget.
Definition: classoptionspage.cpp:93
QList< AssociationWidget * > AssociationWidgetList
Definition: associationwidgetlist.h:18
Definition: listpopupmenu.h:84
void setSnapComponentSizeToGrid(bool bSnap)
Sets whether to snap to grid for component size.
Definition: umlscene.cpp:3571
QString folderFile() const
Get the folder file name for a separate submodel.
Definition: folder.cpp:253
void dragEnterEvent(QGraphicsSceneDragDropEvent *enterEvent)
Override standard method.
Definition: umlscene.cpp:668
UMLWidget * findWidget(Uml::ID::Type id, const UMLWidgetList &widgets, const MessageWidgetList *messages)
Find the widget identified by the given ID in the given widget or message list.
Definition: widget_utils.cpp:41
void removeAllAssociations()
Removes All the associations of the diagram.
Definition: umlscene.cpp:2351
virtual void setFont(const QFont &font)
Sets the font the widget is to use.
Definition: umlwidget.cpp:1641
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:1356
bool addWidget(UMLWidget *pWidget, bool isPasteOperation=false)
Adds a widget to the view from the given data.
Definition: umlscene.cpp:1890
Definition: widgetbase.h:55
bool isSelected() const
Returns the state of whether the widget is selected.
Definition: associationwidget.cpp:3665
void clipSize()
clip the size of this widget against the minimal and maximal limits.
Definition: umlwidget.cpp:1501
void setUsesDiagramLineColor(bool state)
Set state of diagram line color is used.
Definition: widgetbase.cpp:362
static bool isTextValid(const QString &text)
For a text to be valid it must be non-empty, i.e.
Definition: floatingtextwidget.cpp:465
bool isSnapGridVisible() const
Returns whether to show snap grid or not.
Definition: umlscene.cpp:3641
Definition: widgetbase.h:45
Definition: listpopupmenu.h:97
Definition: widgetbase.h:54
qreal snappedY(qreal y)
Returns the input coordinate with possible grid-snap applied.
Definition: umlscene.cpp:3623
void setFont(QFont font, bool changeAllWidgets=false)
Sets the font for the view and optionally all the widgets on the view.
Definition: umlscene.cpp:3398
QDebug operator<<(QDebug dbg, UMLScene *item)
Overloading operator for debugging output.
Definition: umlscene.cpp:4366
Definition: listpopupmenu.h:87
Definition: statewidget.h:53
void createAutoAssociations(UMLWidget *widget)
Creates automatically any Associations that the given UMLWidget may have on any diagram.
Definition: umlscene.cpp:2441
Definition: widgetbase.h:52
void cleanup()
CleansUp all the association's data in the related widgets.
Definition: associationwidget.cpp:1269
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:701
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:109
virtual void adjustAssocs(qreal dx, qreal dy)
Adjusts associations with the given co-ordinates.
Definition: umlwidget.cpp:1000
UMLViewImageExporter * getImageExporter()
Returns the imageExporter used to export the view.
Definition: umlscene.cpp:1736
Definition: umlobject.h:52
QPointF getPastePoint()
Returns the offset point at which to place the paste from clipboard.
Definition: umlscene.cpp:3362
void clearDiagram()
Asks for confirmation and clears everything on the diagram.
Definition: umlscene.cpp:3494
Definition: listpopupmenu.h:110
QListIterator< MessageWidget * > MessageWidgetListIt
Definition: messagewidgetlist.h:20
static MenuType typeFromAction(QAction *action)
Convenience method to extract the ListPopupMenu type from an action.
Definition: listpopupmenu.cpp:1122
void setWidgetForRole(UMLWidget *widget, Uml::RoleType::Enum role)
Set the widget of the given role.
Definition: associationwidget.cpp:819
Definition: widgetbase.h:61
bool loadMessagesFromXMI(QDomElement &qElement)
Definition: umlscene.cpp:3966
FloatingTextWidget * floatingTextWidget()
Returns the text widget it is related to.
Definition: messagewidget.h:99
UMLWidget * getFirstMultiSelectedWidget() const
Return pointer to the first selected widget (for multi-selection)
Definition: umlscene.cpp:954
The class LayoutGenerator provides calculated layouts of diagrams.
Definition: layoutgenerator.h:89
UMLWidget * widgetForRole(Uml::RoleType::Enum role) const
Gets the given role widget.
Definition: associationwidget.cpp:1235
Definition: listpopupmenu.h:108
void setClassWidgetOptions(ClassOptionsPage *page)
Sets some options for all the ClassifierWidget on the view.
Definition: umlscene.cpp:3411
Definition: widgetbase.h:69
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:31
MessageWidgetList & messageList()
Returns a reference to the message list.
Definition: umlscene.cpp:432
UMLListViewItem::ListViewType convert_OT_LVT(UMLObject *o)
Convert an object's type to the equivalent list view type.
Definition: model_utils.cpp:1186
void showChangeTextDialog()
Displays a dialog box to change the text.
Definition: floatingtextwidget.cpp:187
UMLWidget * loadWidgetFromXMI(QDomElement &widgetElement)
Loads a "widget" element from XMI, used by loadFromXMI() and the clipboard.
Definition: umlscene.cpp:3945
void print(QPrinter *pPrinter, QPainter &pPainter)
Contains the implementation for printing functionality.
Definition: umlscene.cpp:466
Definition: umlobject.h:54
FloatingTextWidget * nameWidget() const
Read property of FloatingTextWidget* m_nameWidget.
Definition: associationwidget.cpp:844
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:1427
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:933
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Sets the visibility on the given role of the association.
Definition: associationwidget.cpp:1100
qreal onWidget(const QPointF &p)
Overrides operation from UMLWidget.
Definition: messagewidget.cpp:597
Definition: listpopupmenu.h:236
This class contains the non-graphical information required for a UML Entity.
Definition: entity.h:34
Definition: umlobject.h:64
void moveSelectedBy(qreal dX, qreal dY)
Move all the selected widgets by a relative X and Y offset.
Definition: umlscene.cpp:1305
bool typeIsFolder(UMLListViewItem::ListViewType type)
Return true if the listview type is a logical, usecase or component folder.
Definition: model_utils.cpp:950
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:834
void setupNewWidget(UMLWidget *w)
Initialize and announce a newly created widget.
Definition: umlscene.cpp:512
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.