umbrello: umbrello/umlwidgets/linkwidget.h Source File

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

linkwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2004-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef LINKWIDGET_H
12 #define LINKWIDGET_H
13
14 #include "basictypes.h"
15 #include "umlscene.h"
16
17 #include <QFont>
18
19 // forward declarations
20 class UMLClassifier;
21 class UMLOperation;
22 class FloatingTextWidget;
23 class QXmlStreamWriter;
24
36 class LinkWidget
37 {
38 public:
39 LinkWidget();
40 virtual ~LinkWidget();
41
49 virtual void lwSetFont(QFont font) = 0;
50
51 virtual UMLClassifier *operationOwner();
52
56 virtual UMLOperation *operation() = 0;
57
61 virtual void setOperation(UMLOperation *op) = 0;
62
66 virtual QString customOpText() = 0;
67
71 virtual void setCustomOpText(const QString &opText) = 0;
72
73 QString operationText(UMLScene *scene = 0);
74
75 virtual void resetTextPositions();
76
80 virtual void setMessageText(FloatingTextWidget *ft) = 0;
81
85 virtual void setText(FloatingTextWidget *ft, const QString &newText) = 0;
86
87 virtual bool showPropertiesDialog();
88
92 virtual QString lwOperationText() = 0;
93
97 virtual UMLClassifier *lwClassifier() = 0;
98
102 virtual void setOperationText(const QString &op) = 0;
103
108 virtual void constrainTextPos(qreal &textX, qreal &textY,
109 qreal textWidth, qreal textHeight,
110 Uml::TextRole::Enum tr) = 0;
111
112 virtual void calculateNameTextSegment();
113
114 void setSequenceNumber(const QString &sequenceNumber);
115 QString sequenceNumber() const;
116
117 virtual bool loadFromXMI1(QDomElement &qElement);
118 virtual void saveToXMI1(QXmlStreamWriter& writer);
119
120 protected:
121 QString m_SequenceNumber;
122 };
123
124 #endif
basictypes.h
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:37
LinkWidget
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:37
LinkWidget::operationOwner
virtual UMLClassifier * operationOwner()
Definition: linkwidget.cpp:38
LinkWidget::operation
virtual UMLOperation * operation()=0
LinkWidget::~LinkWidget
virtual ~LinkWidget()
Definition: linkwidget.cpp:31
LinkWidget::setMessageText
virtual void setMessageText(FloatingTextWidget *ft)=0
LinkWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: linkwidget.cpp:123
LinkWidget::constrainTextPos
virtual void constrainTextPos(qreal &textX, qreal &textY, qreal textWidth, qreal textHeight, Uml::TextRole::Enum tr)=0
LinkWidget::m_SequenceNumber
QString m_SequenceNumber
Definition: linkwidget.h:121
LinkWidget::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: linkwidget.cpp:114
LinkWidget::sequenceNumber
QString sequenceNumber() const
Definition: linkwidget.cpp:106
LinkWidget::setCustomOpText
virtual void setCustomOpText(const QString &opText)=0
LinkWidget::setSequenceNumber
void setSequenceNumber(const QString &sequenceNumber)
Definition: linkwidget.cpp:98
LinkWidget::setOperationText
virtual void setOperationText(const QString &op)=0
LinkWidget::resetTextPositions
virtual void resetTextPositions()
Definition: linkwidget.cpp:73
LinkWidget::lwSetFont
virtual void lwSetFont(QFont font)=0
LinkWidget::lwOperationText
virtual QString lwOperationText()=0
LinkWidget::lwClassifier
virtual UMLClassifier * lwClassifier()=0
LinkWidget::LinkWidget
LinkWidget()
Definition: linkwidget.cpp:27
LinkWidget::showPropertiesDialog
virtual bool showPropertiesDialog()
Definition: linkwidget.cpp:81
LinkWidget::setOperation
virtual void setOperation(UMLOperation *op)=0
LinkWidget::operationText
QString operationText(UMLScene *scene=0)
Definition: linkwidget.cpp:53
LinkWidget::setText
virtual void setText(FloatingTextWidget *ft, const QString &newText)=0
LinkWidget::calculateNameTextSegment
virtual void calculateNameTextSegment()
Definition: linkwidget.cpp:90
LinkWidget::customOpText
virtual QString customOpText()=0
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLOperation
Definition: operation.h:25
UMLScene
Definition: umlscene.h:70
Model_Utils::newText
QString newText(UMLObject::ObjectType type)
Definition: model_utils.cpp:625
Uml::TextRole::Enum
Enum
Definition: basictypes.h:190
umlscene.h