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

toolbarstateassociation.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 TOOLBARSTATEASSOCIATION_H
12 #define TOOLBARSTATEASSOCIATION_H
13
14 #include "basictypes.h"
15 #include "toolbarstatepool.h"
16
17 class QGraphicsLineItem;
18
38 class ToolBarStateAssociation : public ToolBarStatePool
39 {
40 Q_OBJECT
41 public:
42
43 explicit ToolBarStateAssociation(UMLScene *umlScene);
44 virtual ~ToolBarStateAssociation();
45
46 virtual void init();
47
48 virtual void cleanBeforeChange();
49
50 virtual void mouseMove(QGraphicsSceneMouseEvent* ome);
51
52 public slots:
53
54 virtual void slotWidgetRemoved(UMLWidget* widget);
55
56 protected:
57
58 virtual void mouseReleaseAssociation();
59 virtual void mouseReleaseWidget();
60 virtual void mouseReleaseEmpty();
61
62 private:
63
64 void setFirstWidget();
65 void setSecondWidget();
66
67 Uml::AssociationType::Enum getAssociationType();
68
69 bool addAssociationInViewAndDoc(AssociationWidget* assoc);
70
71 void cleanAssociation();
72
76 UMLWidget* m_firstWidget;
77
82 QGraphicsLineItem* m_associationLine;
83
84 };
85
86 #endif //TOOLBARSTATEASSOCIATION_H
WorkToolBar::tbb_Child2Category
@ tbb_Child2Category
Definition: worktoolbar.h:125
ToolBarStateAssociation::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Definition: toolbarstateassociation.cpp:161
WorkToolBar::tbb_Coll_Message_Synchronous
@ tbb_Coll_Message_Synchronous
Definition: worktoolbar.h:65
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1309
Uml::ModelType::Enum
Enum
Definition: basictypes.h:41
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
ToolBarState::cleanBeforeChange
virtual void cleanBeforeChange()
Definition: toolbarstate.cpp:60
ToolBarStateAssociation::cleanAssociation
void cleanAssociation()
Definition: toolbarstateassociation.cpp:352
associationline.h
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
ToolBarStateAssociation::m_firstWidget
UMLWidget * m_firstWidget
Definition: toolbarstateassociation.h:76
ToolBarStateAssociation::setFirstWidget
void setFirstWidget()
Definition: toolbarstateassociation.cpp:173
WorkToolBar::tbb_Category2Parent
@ tbb_Category2Parent
Definition: worktoolbar.h:124
WorkToolBar::tbb_Association
@ tbb_Association
Definition: worktoolbar.h:63
ToolBarStateAssociation::mouseReleaseAssociation
virtual void mouseReleaseAssociation()
Definition: toolbarstateassociation.cpp:114
Model_Utils::convert_DT_MT
Uml::ModelType::Enum convert_DT_MT(Uml::DiagramType::Enum dt)
Definition: model_utils.cpp:1414
WorkToolBar::tbb_Relationship
@ tbb_Relationship
Definition: worktoolbar.h:76
Uml::CmdCreateWidget
Definition: cmdcreatewidget.h:24
cmdcreatewidget.h
umlview.h
ToolBarStateAssociation::setSecondWidget
void setSecondWidget()
Definition: toolbarstateassociation.cpp:216
ToolBarStateAssociation::init
virtual void init()
Definition: toolbarstateassociation.cpp:61
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
Uml::AssociationType::Containment
@ Containment
Definition: basictypes.h:116
UMLCanvasObject::uniqChildName
virtual QString uniqChildName(const UMLObject::ObjectType type, const QString &prefix=QString())
Definition: umlcanvasobject.cpp:180
Uml::AssociationType::Activity
@ Activity
Definition: basictypes.h:122
AssocRules::allowAssociation
static bool allowAssociation(Uml::AssociationType::Enum assocType, UMLWidget *widget)
Definition: assocrules.cpp:51
UMLScene::activeView
UMLView * activeView() const
Definition: umlscene.cpp:348
AssociationWidget::create
static AssociationWidget * create(UMLScene *scene)
Definition: associationwidget.cpp:102
WorkToolBar::tbb_Containment
@ tbb_Containment
Definition: worktoolbar.h:64
classifierwidget.h
WorkToolBar::tbb_State_Transition
@ tbb_State_Transition
Definition: worktoolbar.h:78
toolbarstateassociation.h
Uml::AssociationType::State
@ State
Definition: basictypes.h:121
ToolBarState::finished
void finished()
Definition: moc_toolbarstate.cpp:146
ToolBarStateAssociation::getAssociationType
Uml::AssociationType::Enum getAssociationType()
Definition: toolbarstateassociation.cpp:285
ToolBarStatePool
Definition: toolbarstatepool.h:23
ToolBarState::m_pUMLScene
UMLScene * m_pUMLScene
The UMLScene.
Definition: toolbarstate.h:124
WorkToolBar::tbb_Seq_Message_Creation
@ tbb_Seq_Message_Creation
Definition: worktoolbar.h:67
UMLObject::ot_Attribute
@ ot_Attribute
Definition: umlobject.h:92
UMLDoc::rootFolder
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Definition: umldoc.cpp:3205
WorkToolBar::tbb_Dependency
@ tbb_Dependency
Definition: worktoolbar.h:62
Uml::AssociationType::Coll_Message_Synchronous
@ Coll_Message_Synchronous
Definition: basictypes.h:127
WorkToolBar::tbb_Composition
@ tbb_Composition
Definition: worktoolbar.h:75
association.h
WorkToolBar::tbb_UniAssociation
@ tbb_UniAssociation
Definition: worktoolbar.h:77
ToolBarStateAssociation::ToolBarStateAssociation
ToolBarStateAssociation(UMLScene *umlScene)
Definition: toolbarstateassociation.cpp:42
Uml::AssociationType::Category2Parent
@ Category2Parent
Definition: basictypes.h:124
WorkToolBar::tbb_Seq_Message_Destroy
@ tbb_Seq_Message_Destroy
Definition: worktoolbar.h:68
WorkToolBar::tbb_Anchor
@ tbb_Anchor
Definition: worktoolbar.h:83
Uml::AssociationType::UniAssociation
@ UniAssociation
Definition: basictypes.h:119
Uml::AssociationType::Relationship
@ Relationship
Definition: basictypes.h:126
model_utils.h
Uml::AssociationType::Association_Self
@ Association_Self
Definition: basictypes.h:111
WorkToolBar::tbb_Aggregation
@ tbb_Aggregation
Definition: worktoolbar.h:61
Uml::AssociationType::Unknown
@ Unknown
Definition: basictypes.h:130
ToolBarStateAssociation::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstateassociation.cpp:82
Uml::AssociationType::Anchor
@ Anchor
Definition: basictypes.h:120
floatingtextwidget.h
Uml::AssociationType::Child2Category
@ Child2Category
Definition: basictypes.h:125
Uml::AssociationType::Aggregation
@ Aggregation
Definition: basictypes.h:108
ToolBarState::currentAssociation
virtual AssociationWidget * currentAssociation() const
Definition: toolbarstate.cpp:462
WidgetBase::umlObject
UMLObject * umlObject() const
Definition: widgetbase.cpp:182
WorkToolBar::tbb_Seq_Message_Synchronous
@ tbb_Seq_Message_Synchronous
Definition: worktoolbar.h:69
WorkToolBar::tbb_Activity_Transition
@ tbb_Activity_Transition
Definition: worktoolbar.h:79
AssociationWidget::textWidgetByRole
FloatingTextWidget * textWidgetByRole(Uml::TextRole::Enum tr) const
Definition: associationwidget.cpp:841
UMLScene::addAssociation
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Definition: umlscene.cpp:2095
WorkToolBar::tbb_Seq_Precondition
@ tbb_Seq_Precondition
Definition: worktoolbar.h:74
ToolBarState::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition: toolbarstate.cpp:242
umlwidget.h
UMLWidget::addAssoc
virtual void addAssoc(AssociationWidget *pAssoc)
Definition: umlwidget.cpp:1274
ToolBarStateAssociation::~ToolBarStateAssociation
virtual ~ToolBarStateAssociation()
Definition: toolbarstateassociation.cpp:53
UMLScene::type
Uml::DiagramType::Enum type() const
Definition: umlscene.cpp:426
UMLDoc::addAssociation
void addAssociation(UMLAssociation *assoc)
Definition: umldoc.cpp:1481
ToolBarStateAssociation::m_associationLine
QGraphicsLineItem * m_associationLine
Definition: toolbarstateassociation.h:82
folder.h
i18n
#define i18n
Definition: main.cpp:39
Uml::AssociationType::Association
@ Association
Definition: basictypes.h:110
ToolBarStateAssociation
Definition: toolbarstateassociation.h:39
UMLScene::lineColor
const QColor & lineColor() const
Definition: umlscene.cpp:493
ToolBarState::init
virtual void init()
Definition: toolbarstate.cpp:41
WidgetBase::changesShape
bool changesShape()
Definition: widgetbase.cpp:578
UMLClassifierListItem::setType
virtual void setType(UMLObject *type)
Definition: classifierlistitem.cpp:127
ToolBarStatePool::getButton
WorkToolBar::ToolBar_Buttons getButton() const
Definition: toolbarstatepool.cpp:42
WidgetBase::isClassWidget
bool isClassWidget()
Definition: widgetbase.h:247
ClassifierWidget
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:33
ToolBarStateAssociation::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition: toolbarstateassociation.cpp:98
basictypes.h
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:37
ToolBarState::m_pMouseEvent
QGraphicsSceneMouseEvent * m_pMouseEvent
The mouse event currently in use.
Definition: toolbarstate.h:125
Uml::TextRole::Coll_Message
@ Coll_Message
Definition: basictypes.h:185
toolbarstatepool.h
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:106
Uml::AssociationType::Generalization
@ Generalization
Definition: basictypes.h:107
FloatingTextWidget::showOperationDialog
bool showOperationDialog(bool enableAutoIncrement=true)
Definition: floatingtextwidget.cpp:228
ToolBarStateAssociation::cleanBeforeChange
virtual void cleanBeforeChange()
Definition: toolbarstateassociation.cpp:71
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLDoc
Definition: umldoc.h:75
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
AssociationWidget::association
UMLAssociation * association() const
Definition: associationwidget.cpp:520
WorkToolBar::tbb_Coll_Message_Asynchronous
@ tbb_Coll_Message_Asynchronous
Definition: worktoolbar.h:66
UMLScene::lineWidth
uint lineWidth() const
Definition: umlscene.cpp:512
associationwidget.h
Uml::AssociationType::Coll_Message_Asynchronous
@ Coll_Message_Asynchronous
Definition: basictypes.h:112
AssociationWidget::createAssocClassLine
void createAssocClassLine()
Definition: associationwidget.cpp:2791
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
WorkToolBar::tbb_Seq_Combined_Fragment
@ tbb_Seq_Combined_Fragment
Definition: worktoolbar.h:73
umlscene.h
Uml::AssociationType::Seq_Message
@ Seq_Message
Definition: basictypes.h:113
uml.h
ToolBarState::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:181
UMLObject::setUMLPackage
bool setUMLPackage(UMLPackage *pPkg)
Definition: umlobject.cpp:616
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:33
AssocRules::allowSelf
static bool allowSelf(Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType)
Definition: assocrules.cpp:361
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:111
UMLScene
Definition: umlscene.h:69
assocrules.h
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition: umlwidget.cpp:1781
umlobject.h
WorkToolBar::tbb_Exception
@ tbb_Exception
Definition: worktoolbar.h:120
Uml::AssociationType::Composition
@ Composition
Definition: basictypes.h:117
WorkToolBar::tbb_Generalization
@ tbb_Generalization
Definition: worktoolbar.h:60
UMLScene::setPos
void setPos(const QPointF &pos)
Definition: umlscene.cpp:466
ToolBarStateAssociation::addAssociationInViewAndDoc
bool addAssociationInViewAndDoc(AssociationWidget *assoc)
Definition: toolbarstateassociation.cpp:327
Uml::AssociationType::Dependency
@ Dependency
Definition: basictypes.h:109
AssocRules::isGeneralisationOrRealisation
static Uml::AssociationType::Enum isGeneralisationOrRealisation(UMLWidget *widgetA, UMLWidget *widgetB)
Definition: assocrules.cpp:379
UMLApp::executeCommand
void executeCommand(QUndoCommand *cmd)
Definition: uml.cpp:3438
ToolBarStateAssociation::mouseReleaseWidget
virtual void mouseReleaseWidget()
Definition: toolbarstateassociation.cpp:135
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
WidgetBase::baseType
WidgetType baseType() const
Definition: widgetbase.cpp:115
ToolBarState::currentWidget
virtual UMLWidget * currentWidget() const
Definition: toolbarstate.cpp:438
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
WorkToolBar::tbb_Seq_Message_Asynchronous
@ tbb_Seq_Message_Asynchronous
Definition: worktoolbar.h:70
Uml::AssociationType::Exception
@ Exception
Definition: basictypes.h:123
UMLClassifier::addAttribute
UMLAttribute * addAttribute(const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: classifier.cpp:810