umbrello 2.39.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
LinkWidget Class Referenceabstract

Interface to FloatingTextWidget for AssociationWidget and MessageWidget. More...

#include <linkwidget.h>

Inheritance diagram for LinkWidget:
Collaboration diagram for LinkWidget:

Public Member Functions

 LinkWidget ()
 
virtual ~LinkWidget ()
 
virtual void lwSetFont (QFont font)=0
 
virtual UMLClassifieroperationOwner ()
 
virtual UMLOperationoperation ()=0
 
virtual void setOperation (UMLOperation *op)=0
 
virtual QString customOpText ()=0
 
virtual void setCustomOpText (const QString &opText)=0
 
QString operationText (UMLScene *scene=nullptr)
 
virtual void resetTextPositions ()
 
virtual void setMessageText (FloatingTextWidget *ft)=0
 
virtual void setText (FloatingTextWidget *ft, const QString &newText)=0
 
virtual bool showPropertiesDialog ()
 
virtual QString lwOperationText ()=0
 
virtual UMLClassifierlwClassifier ()=0
 
virtual void setOperationText (const QString &op)=0
 
virtual void constrainTextPos (qreal &textX, qreal &textY, qreal textWidth, qreal textHeight, Uml::TextRole::Enum tr)=0
 
virtual void calculateNameTextSegment ()
 
void setSequenceNumber (const QString &sequenceNumber)
 
QString sequenceNumber () const
 
virtual bool loadFromXMI (QDomElement &qElement)
 
virtual void saveToXMI (QXmlStreamWriter &writer)
 

Protected Attributes

QString m_SequenceNumber
 

Detailed Description

Interface to FloatingTextWidget for AssociationWidget and MessageWidget.

This is an interface realized by AssociationWidget and MessageWidget. The design of this interface was driven by the requirements of class FloatingTextWidget. As the architecture of Umbrello evolves (for example, if the class FloatingTextWidget is redesigned), it can be cleaned up.

Author
Oliver Kellogg okell.nosp@m.ogg@.nosp@m.users.nosp@m..sou.nosp@m.rcefo.nosp@m.rge..nosp@m.net Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

Constructor & Destructor Documentation

◆ LinkWidget()

LinkWidget::LinkWidget ( )

◆ ~LinkWidget()

LinkWidget::~LinkWidget ( )
virtual

Member Function Documentation

◆ calculateNameTextSegment()

void LinkWidget::calculateNameTextSegment ( )
virtual

Motivated by FloatingTextWidget::setLink(). Only applies to AssociationWidget.

Reimplemented in AssociationWidget.

◆ constrainTextPos()

virtual void LinkWidget::constrainTextPos ( qreal & textX,
qreal & textY,
qreal textWidth,
qreal textHeight,
Uml::TextRole::Enum tr )
pure virtual

Abstract operation implemented by inheriting classes. Motivated by FloatingTextWidget::mouseMoveEvent()

Implemented in AssociationWidget, and MessageWidget.

◆ customOpText()

virtual QString LinkWidget::customOpText ( )
pure virtual

Motivated by getOperationText()

Implemented in AssociationWidget, and MessageWidget.

◆ loadFromXMI()

bool LinkWidget::loadFromXMI ( QDomElement & qElement)
virtual

Load data from XMI.

Reimplemented in AssociationWidget, and MessageWidget.

◆ lwClassifier()

virtual UMLClassifier * LinkWidget::lwClassifier ( )
pure virtual

Motivated by FloatingTextWidget::showOpDialog()

Implemented in AssociationWidget, and MessageWidget.

◆ lwOperationText()

virtual QString LinkWidget::lwOperationText ( )
pure virtual

Motivated by FloatingTextWidget::showOpDialog()

Implemented in AssociationWidget, and MessageWidget.

◆ lwSetFont()

virtual void LinkWidget::lwSetFont ( QFont font)
pure virtual

Sets the font the widget is to use. Abstract operation implemented by inheriting classes. Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)

Parameters
fontFont to be set.

Implemented in AssociationWidget, and MessageWidget.

◆ operation()

virtual UMLOperation * LinkWidget::operation ( )
pure virtual

Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)

Implemented in AssociationWidget, and MessageWidget.

◆ operationOwner()

UMLClassifier * LinkWidget::operationOwner ( )
virtual

Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)

Reimplemented in AssociationWidget, and MessageWidget.

Here is the call graph for this function:

◆ operationText()

QString LinkWidget::operationText ( UMLScene * scene = nullptr)

Return the operation text. When no scene parameter is given, the scene of the current view is taken instead.

Parameters
scenethe given scene
Returns
the operation text
Here is the call graph for this function:

◆ resetTextPositions()

void LinkWidget::resetTextPositions ( )
virtual

Motivated by FloatingTextWidget::slotMenuSelection(mt_Reset_Label_Positions) Only applies to AssociationWidget.

Reimplemented in AssociationWidget.

◆ saveToXMI()

void LinkWidget::saveToXMI ( QXmlStreamWriter & writer)
virtual

Save data to XMI.

Reimplemented in AssociationWidget, and MessageWidget.

◆ sequenceNumber()

QString LinkWidget::sequenceNumber ( ) const

Read property of QString m_SequenceNumber.

◆ setCustomOpText()

virtual void LinkWidget::setCustomOpText ( const QString & opText)
pure virtual

Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)

Implemented in AssociationWidget, and MessageWidget.

◆ setMessageText()

virtual void LinkWidget::setMessageText ( FloatingTextWidget * ft)
pure virtual

◆ setOperation()

virtual void LinkWidget::setOperation ( UMLOperation * op)
pure virtual

Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)

Implemented in AssociationWidget, and MessageWidget.

◆ setOperationText()

virtual void LinkWidget::setOperationText ( const QString & op)
pure virtual

Motivated by FloatingTextWidget::showOpDialog()

Implemented in AssociationWidget, and MessageWidget.

◆ setSequenceNumber()

void LinkWidget::setSequenceNumber ( const QString & sequenceNumber)

Write property of QString m_SequenceNumber.

Here is the call graph for this function:

◆ setText()

virtual void LinkWidget::setText ( FloatingTextWidget * ft,
const QString & newText )
pure virtual

◆ showPropertiesDialog()

bool LinkWidget::showPropertiesDialog ( )
virtual

Member Data Documentation

◆ m_SequenceNumber

QString LinkWidget::m_SequenceNumber
protected

The documentation for this class was generated from the following files: