umbrello/umbrello
messagewidget.cpp
Go to the documentation of this file.
288 void MessageWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
404 paintArrow(painter, offsetX, offsetY + h - arrowWidth + 1, w - wr + 1, Qt::LeftArrow, true); // return arrow
415 painter->drawLine(offsetX + wr + 1, offsetY + arrowWidth, offsetX + w, offsetY + arrowWidth); //arrow line
418 paintArrow(painter, offsetX + wr + 1, offsetY + h - arrowWidth + 1, w - wr - 1, Qt::RightArrow, true); // return arrow
674 void MessageWidget::constrainTextPos(qreal &textX, qreal &textY, qreal textWidth, qreal textHeight,
719 DEBUG(DBG_SRC) << "id=" << Uml::ID::toString(id) << ": ignoring for idA=" << Uml::ID::toString(idA)
839 connect(m_pOw[Uml::RoleType::A], SIGNAL(sigWidgetMoved(Uml::ID::Type)), this, SLOT(slotWidgetMoved(Uml::ID::Type)));
840 connect(m_pOw[Uml::RoleType::B], SIGNAL(sigWidgetMoved(Uml::ID::Type)), this, SLOT(slotWidgetMoved(Uml::ID::Type)));
1165 disconnect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::RoleType::A], SLOT(slotMessageMoved()));
1169 disconnect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::RoleType::B], SLOT(slotMessageMoved()));
1300 messageElement.setAttribute("widgetaid", Uml::ID::toString(m_pOw[Uml::RoleType::A]->localID()));
1301 messageElement.setAttribute("widgetbid", Uml::ID::toString(m_pOw[Uml::RoleType::B]->localID()));
1309 if (m_sequenceMessageType == Uml::SequenceMessage::Lost || m_sequenceMessageType == Uml::SequenceMessage::Found) {
1338 if (m_sequenceMessageType == Uml::SequenceMessage::Lost || m_sequenceMessageType == Uml::SequenceMessage::Found) {
void paintSynchronous(QPainter *painter)
Draws the calling arrow with filled in arrowhead, the timeline box and the returning arrow with a das...
Definition: messagewidget.cpp:363
int getMaxY()
Returns the maximum height this widget should be set at on a sequence diagrams.
Definition: messagewidget.cpp:1226
void calculateDimensionsFound()
Calculates and sets the size of the widget for a found message.
Definition: messagewidget.cpp:1138
void calculateDimensionsSynchronous()
Calculates and sets the size of the widget for a synchronous message.
Definition: messagewidget.cpp:1019
Uml::SequenceMessage::Enum sequenceMessageType() const
Definition: messagewidget.h:83
bool isSelf() const
This method determines whether the message is for "Self" for an ObjectWidget.
Definition: messagewidget.cpp:758
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
virtual void setOperation(UMLOperation *op)
Implements operation from LinkWidget.
Definition: messagewidget.cpp:946
int selectedCount(bool filterText=false) const
Return the amount of widgets selected.
Definition: umlscene.cpp:1831
virtual UMLOperation * operation()
Implements operation from LinkWidget.
Definition: messagewidget.cpp:937
UMLObject * umlObject() const
Returns the UMLObject set to represent.
Definition: widgetbase.cpp:113
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Draws the UMLWidget on the given paint device.
Definition: umlwidget.cpp:1565
static void paintSolidArrowhead(QPainter *p, int x, int y, Qt::ArrowType direction)
Draw a solid (triangular) arrowhead pointing in the given direction.
Definition: messagewidget.cpp:316
void updateResizability()
Update the UMLWidget::m_resizable flag according to the charactersitics of this message.
Definition: messagewidget.cpp:170
Definition: basictypes.h:209
bool hasObjectWidget(ObjectWidget *w)
Check to see if the given ObjectWidget is involved in the message.
Definition: messagewidget.cpp:743
virtual UMLClassifier * operationOwner()
Overrides operation from LinkWidget.
Definition: messagewidget.cpp:924
ObjectWidget * objectWidget(Uml::RoleType::Enum role)
Returns the related widget on the given side.
Definition: messagewidget.cpp:1257
virtual void lwSetFont(QFont font)
Implements operation from LinkWidget.
Definition: messagewidget.cpp:914
Definition: basictypes.h:196
Uml::TextRole::Enum textRole() const
Return the role of the text widget.
Definition: floatingtextwidget.cpp:364
This class contains all the ID translations done for each UMLObject pasted.
Definition: idchangelog.h:26
Definition: basictypes.h:210
Definition: basictypes.h:195
virtual void setSelected(bool _select)
Sets the state of whether the widget is selected.
Definition: umlwidget.cpp:1253
void setSequenceNumber(const QString &sequenceNumber)
Write property of QString m_SequenceNumber.
Definition: messagewidget.cpp:897
virtual void setSeqNumAndOp(const QString &seqNum, const QString &op)
Overrides operation from LinkWidget.
Definition: messagewidget.cpp:888
bool m_ignoreSnapComponentSizeToGrid
Definition: umlwidget.h:314
void setLink(LinkWidget *l)
Set the LinkWidget that this FloatingTextWidget is related to.
Definition: floatingtextwidget.cpp:335
bool isSelected() const
Returns the state of whether the widget is selected.
Definition: umlwidget.h:87
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Reimplemented from UMLWidget::saveToXMI to save the widget data into XMI 'floatingtext' element...
Definition: floatingtextwidget.cpp:635
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:872
bool messageOverlap(qreal y, MessageWidget *messageWidget)
Returns whether a message is overlapping with another message.
Definition: objectwidget.cpp:642
int getMinY()
Returns the minimum height this widget should be set at on a sequence diagrams.
Definition: messagewidget.cpp:1204
void setLinkAndTextPos()
Shortcut for calling m_pFText->setLink() followed by this->setTextPosition().
Definition: messagewidget.cpp:692
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig)
Returns a string representation of the operation.
Definition: operation.cpp:198
virtual void slotMenuSelection(QAction *action)
This is usually called synchronously after menu.exec() and trigger's parent is always the ListPopupMe...
Definition: umlwidget.cpp:707
virtual void setCustomOpText(const QString &opText)
Overrides operation from LinkWidget.
Definition: messagewidget.cpp:970
Definition: basictypes.h:155
void paintAsynchronous(QPainter *painter)
Draws a solid arrow line and a stick arrow head.
Definition: messagewidget.cpp:427
Definition: basictypes.h:137
Uml::ID::Type localID() const
Returns the local ID for this object.
Definition: objectwidget.cpp:100
int constrainX(int textX, int textWidth, Uml::TextRole::Enum tr)
Returns the textX arg with constraints applied.
Definition: messagewidget.cpp:642
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
void calculateDimensionsAsynchronous()
Calculates and sets the size of the widget for an asynchronous message.
Definition: messagewidget.cpp:1052
void setMessageText()
Sets the text for this label if it is acting as a sequence diagram message or a collaboration diagram...
Definition: floatingtextwidget.cpp:730
virtual void constrainMovementForAllWidgets(qreal &diffX, qreal &diffY)
Overridden from UMLWidget.
Definition: messagewidget.cpp:278
Definition: listpopupmenu.h:158
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Event handler for mouse double click events.
Definition: messagewidget.cpp:1282
Uml::SequenceMessage::Enum m_sequenceMessageType
Whether the message is synchronous or asynchronous.
Definition: messagewidget.h:181
void setSelected(bool _select)
Sets the state of whether the widget is selected.
Definition: messagewidget.cpp:1185
virtual bool loadFromXMI(QDomElement &qElement)
Loads from the "messagewidget" XMI element.
Definition: messagewidget.cpp:1326
QString sequenceNumber() const
Read property of QString m_SequenceNumber.
Definition: messagewidget.cpp:905
void setActivated(bool active=true)
Set the m_activated flag of a widget but does not perform the Activate method.
Definition: umlwidget.cpp:967
virtual QString customOpText()
Overrides operation from LinkWidget.
Definition: messagewidget.cpp:961
QString displayText() const
Use to get the total text (prepended + main body + appended) currently displayed by the widget...
Definition: floatingtextwidget.cpp:155
void messageRemoved(MessageWidget *message)
Remove a message widget from the list.
Definition: objectwidget.cpp:608
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
UMLWidget * findWidget(Uml::ID::Type id)
Finds a widget with the given ID.
Definition: umlscene.cpp:1069
void sigMessageMoved()
emitted when the message widget is moved up or down slots into ObjectWidget::slotMessageMoved() ...
void sigWidgetMoved(Uml::ID::Type id)
Emit when the widget moves its' position.
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:2607
virtual void setText(FloatingTextWidget *ft, const QString &newText)
Overrides operation from LinkWidget.
Definition: messagewidget.cpp:875
void messageAdded(MessageWidget *message)
Add a message widget to the list.
Definition: objectwidget.cpp:594
virtual bool activate(IDChangeLog *Log=0)
Activates a MessageWidget.
Definition: messagewidget.cpp:780
virtual void cleanup()
Used to cleanup any other widget it may need to delete.
Definition: umlwidget.cpp:1391
virtual UMLObject * findChildObjectById(Uml::ID::Type id, bool considerAncestors=false)
Find the child object by the given id.
Definition: classifier.cpp:553
virtual void constrainTextPos(qreal &textX, qreal &textY, qreal textWidth, qreal textHeight, Uml::TextRole::Enum tr)
Constrains the FloatingTextWidget X and Y values supplied.
Definition: messagewidget.cpp:674
void slotWidgetMoved(Uml::ID::Type id)
Definition: messagewidget.cpp:714
virtual bool loadFromXMI(QDomElement &qElement)
Loads the "floatingtext" XMI element.
Definition: floatingtextwidget.cpp:608
Definition: basictypes.h:194
MessageWidget(UMLScene *scene, ObjectWidget *a, ObjectWidget *b, int y, Uml::SequenceMessage::Enum sequenceMessageType, Uml::ID::Type id=Uml::ID::None)
Constructs a MessageWidget.
Definition: messagewidget.cpp:52
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
Enum fromInt(int item)
Convert a integer item into SequenceMessage representation.
Definition: basictypes.cpp:695
void cleanup()
Used to cleanup any other widget it may need to delete.
Definition: messagewidget.cpp:1162
void slotMenuSelection(QAction *action)
Definition: messagewidget.cpp:764
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
void calculateDimensionsLost()
Calculates and sets the size of the widget for a lost message.
Definition: messagewidget.cpp:1115
void setObjectWidget(ObjectWidget *ow, Uml::RoleType::Enum role)
Sets the related widget on the given side.
Definition: messagewidget.cpp:1246
virtual void setFont(const QFont &font)
Sets the font the widget is to use.
Definition: umlwidget.cpp:1641
void paintLost(QPainter *painter)
Draws a solid arrow line and a stick arrow head and a circle.
Definition: messagewidget.cpp:513
void paintFound(QPainter *painter)
Draws a circle and a solid arrow line and a stick arrow head.
Definition: messagewidget.cpp:551
virtual void adjustAssocs(qreal dx, qreal dy)
Adjusts associations with the given co-ordinates.
Definition: umlwidget.cpp:1000
void calculateDimensions()
Calculates the size of the widget by calling calculateDimensionsSynchronous(), calculateDimensionsAsy...
Definition: messagewidget.cpp:996
Definition: basictypes.h:156
static MenuType typeFromAction(QAction *action)
Convenience method to extract the ListPopupMenu type from an action.
Definition: listpopupmenu.cpp:1122
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Saves to the "messagewidget" XMI element.
Definition: messagewidget.cpp:1296
void calculateDimensionsCreation()
Calculates and sets the size of the widget for a creation message.
Definition: messagewidget.cpp:1085
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Reimplemented from UMLWidget and calls other paint...() methods depending on the message type...
Definition: messagewidget.cpp:288
static void paintArrow(QPainter *p, int x, int y, int w, Qt::ArrowType direction, bool useDottedLine=false)
Draw an arrow pointing in the given direction.
Definition: messagewidget.cpp:334
virtual QFont font() const
Returns the font used for diaplaying any text.
Definition: widgetbase.cpp:431
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Overridden from UMLWidget.
Definition: messagewidget.cpp:262
qreal onWidget(const QPointF &p)
Overrides operation from UMLWidget.
Definition: messagewidget.cpp:597
virtual void resizeWidget(qreal newW, qreal newH)
Overridden from UMLWidget.
Definition: messagewidget.cpp:198
void setText(const QString &t)
Set the main body of text to display.
Definition: floatingtextwidget.cpp:103
virtual UMLClassifier * seqNumAndOp(QString &seqNum, QString &op)
Motivated by FloatingTextWidget::showOpDlg()
Definition: messagewidget.cpp:976
void setTextPosition()
Sets the text position relative to the sequence message.
Definition: messagewidget.cpp:622
virtual void setMessageText(FloatingTextWidget *ft)
Overrides operation from LinkWidget.
Definition: messagewidget.cpp:859
void paintCreation(QPainter *painter)
Draws a solid arrow line and a stick arrow head to the edge of the target object widget instead of to...
Definition: messagewidget.cpp:477
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:00 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:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.