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

toolbarstatemessages.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 TOOLBARSTATEMESSAGES_H
12 #define TOOLBARSTATEMESSAGES_H
13
14 #include "basictypes.h"
15 #include "toolbarstatepool.h"
16
17 class MessageWidget;
18 class ObjectWidget;
19 class QGraphicsLineItem;
20
50 class ToolBarStateMessages : public ToolBarStatePool
51 {
52 Q_OBJECT
53 public:
54
55 explicit ToolBarStateMessages(UMLScene *umlScene);
56 virtual ~ToolBarStateMessages();
57
58 virtual void init();
59
60 virtual void cleanBeforeChange();
61
62 virtual void mouseMove(QGraphicsSceneMouseEvent* ome);
63
64 public slots:
65
66 virtual void slotWidgetRemoved(UMLWidget* widget);
67
68 protected:
69
70 virtual void setCurrentElement();
71
72 virtual void mouseReleaseWidget();
73 virtual void mouseReleaseEmpty();
74
75 protected:
76
80 enum MessageType {
81 NormalMessage,
82 CreationMessage,
83 FoundMessage,
84 LostMessage
85 };
86
87 void setFirstWidget(ObjectWidget* firstObject);
88 void setSecondWidget(ObjectWidget* secondObject, MessageType messageType);
89
90 Uml::SequenceMessage::Enum getMessageType();
91
92 void cleanMessage();
93
97 ObjectWidget* m_firstObject;
98
103 QGraphicsLineItem* m_messageLine;
104
109 bool m_isObjectWidgetLine;
110
111 private:
112 void setupMessageWidget(MessageWidget *msg, bool showOperationDialog = true);
113
117 qreal xclick;
118 qreal yclick;
119
120 };
121
122 #endif //TOOLBARSTATEMESSAGES_H
toolbarstatemessages.h
ToolBarStateMessages::FoundMessage
@ FoundMessage
Definition: toolbarstatemessages.h:83
ToolBarState::cleanBeforeChange
virtual void cleanBeforeChange()
Definition: toolbarstate.cpp:60
MessageWidget::floatingTextWidget
FloatingTextWidget * floatingTextWidget()
Definition: messagewidget.h:96
x
int x
Definition: cxx11-lambda-functions-and-expressions.h:4
ToolBarStateMessages::getMessageType
Uml::SequenceMessage::Enum getMessageType()
Definition: toolbarstatemessages.cpp:300
Uml::CmdCreateWidget
Definition: cmdcreatewidget.h:24
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
UMLScene::activeView
UMLView * activeView() const
Definition: umlscene.cpp:348
Object_Factory::createUMLObject
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Definition: object_factory.cpp:203
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:89
ToolBarStateMessages::MessageType
MessageType
Definition: toolbarstatemessages.h:80
ToolBarState::finished
void finished()
Definition: moc_toolbarstate.cpp:146
ToolBarStatePool
Definition: toolbarstatepool.h:23
Uml::SequenceMessage::Lost
@ Lost
Definition: basictypes.h:224
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
object_factory.h
ToolBarStateMessages::ToolBarStateMessages
ToolBarStateMessages(UMLScene *umlScene)
Definition: toolbarstatemessages.cpp:36
cmds.h
WorkToolBar::tbb_Seq_Message_Destroy
@ tbb_Seq_Message_Destroy
Definition: worktoolbar.h:68
ToolBarStateMessages::m_firstObject
ObjectWidget * m_firstObject
Definition: toolbarstatemessages.h:97
Uml::SequenceMessage::Synchronous
@ Synchronous
Definition: basictypes.h:221
ToolBarStateMessages
Definition: toolbarstatemessages.h:51
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLScene::widgetAt
UMLWidget * widgetAt(const QPointF &p)
Definition: umlscene.cpp:1074
floatingtextwidget.h
Uml::SequenceMessage::Creation
@ Creation
Definition: basictypes.h:223
ToolBarStateMessages::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Definition: toolbarstatemessages.cpp:177
WorkToolBar::tbb_Seq_Message_Synchronous
@ tbb_Seq_Message_Synchronous
Definition: worktoolbar.h:69
ToolBarStateMessages::cleanBeforeChange
virtual void cleanBeforeChange()
Definition: toolbarstatemessages.cpp:68
ToolBarStateMessages::yclick
qreal yclick
Definition: toolbarstatemessages.h:118
UMLScene::onWidgetLine
ObjectWidget * onWidgetLine(const QPointF &point) const
Definition: umlscene.cpp:1014
ToolBarState::setCurrentWidget
virtual void setCurrentWidget(UMLWidget *widget)
Definition: toolbarstate.cpp:452
ToolBarState::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition: toolbarstate.cpp:242
objectwidget.h
ObjectWidget::setX
virtual void setX(qreal x)
Definition: objectwidget.cpp:264
Uml::SequenceMessage::Destroy
@ Destroy
Definition: basictypes.h:226
i18n
#define i18n
Definition: main.cpp:39
ToolBarStateMessages::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition: toolbarstatemessages.cpp:96
messagewidget.h
UMLScene::lineColor
const QColor & lineColor() const
Definition: umlscene.cpp:493
ToolBarState::init
virtual void init()
Definition: toolbarstate.cpp:41
ToolBarStatePool::getButton
WorkToolBar::ToolBar_Buttons getButton() const
Definition: toolbarstatepool.cpp:42
Widget_Factory::createWidget
UMLWidget * createWidget(UMLScene *scene, UMLObject *o)
Definition: widget_factory.cpp:70
widget_factory.h
basictypes.h
uDebug
#define uDebug()
Definition: debug_utils.h:122
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
toolbarstatepool.h
ToolBarStateMessages::cleanMessage
void cleanMessage()
Definition: toolbarstatemessages.cpp:324
FloatingTextWidget::showOperationDialog
bool showOperationDialog(bool enableAutoIncrement=true)
Definition: floatingtextwidget.cpp:228
ToolBarStateMessages::setupMessageWidget
void setupMessageWidget(MessageWidget *msg, bool showOperationDialog=true)
Definition: toolbarstatemessages.cpp:332
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLScene::getCreateObject
bool getCreateObject() const
Definition: umlscene.cpp:745
ToolBarStateMessages::m_messageLine
QGraphicsLineItem * m_messageLine
Definition: toolbarstatemessages.h:103
ToolBarStateMessages::setCurrentElement
virtual void setCurrentElement()
Definition: toolbarstatemessages.cpp:112
ToolBarStateMessages::m_isObjectWidgetLine
bool m_isObjectWidgetLine
Definition: toolbarstatemessages.h:109
ObjectWidget::activate
bool activate(IDChangeLog *ChangeLog=0)
Definition: objectwidget.cpp:248
UMLScene::lineWidth
uint lineWidth() const
Definition: umlscene.cpp:512
Uml::SequenceMessage::Asynchronous
@ Asynchronous
Definition: basictypes.h:222
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:33
ToolBarStateMessages::init
virtual void init()
Definition: toolbarstatemessages.cpp:57
WorkToolBar::tbb_Seq_Message_Lost
@ tbb_Seq_Message_Lost
Definition: worktoolbar.h:72
umlscene.h
uml.h
ToolBarState::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:181
debug_utils.h
UMLScene
Definition: umlscene.h:69
MessageWidget::setTextPosition
void setTextPosition()
Definition: messagewidget.cpp:642
ToolBarStateMessages::~ToolBarStateMessages
virtual ~ToolBarStateMessages()
Definition: toolbarstatemessages.cpp:49
ToolBarStateMessages::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstatemessages.cpp:80
UMLScene::addWidgetCmd
void addWidgetCmd(UMLWidget *widget)
Definition: umlscene.cpp:614
ToolBarStateMessages::setSecondWidget
void setSecondWidget(ObjectWidget *secondObject, MessageType messageType)
Definition: toolbarstatemessages.cpp:273
Uml::SequenceMessage::Enum
Enum
Definition: basictypes.h:219
MessageWidget::setOperationText
virtual void setOperationText(const QString &op)
Definition: messagewidget.cpp:924
WorkToolBar::tbb_Seq_Message_Found
@ tbb_Seq_Message_Found
Definition: worktoolbar.h:71
ToolBarStateMessages::setFirstWidget
void setFirstWidget(ObjectWidget *firstObject)
Definition: toolbarstatemessages.cpp:236
ToolBarStateMessages::xclick
qreal xclick
Definition: toolbarstatemessages.h:117
ToolBarStateMessages::mouseReleaseWidget
virtual void mouseReleaseWidget()
Definition: toolbarstatemessages.cpp:146
UMLScene::setCreateObject
void setCreateObject(bool bCreate)
Definition: umlscene.cpp:753
MessageWidget::sequenceMessageType
Uml::SequenceMessage::Enum sequenceMessageType() const
Definition: messagewidget.h:80
ToolBarStateMessages::LostMessage
@ LostMessage
Definition: toolbarstatemessages.h:84
UMLApp::executeCommand
void executeCommand(QUndoCommand *cmd)
Definition: uml.cpp:3438
MessageWidget
Displays a message.
Definition: messagewidget.h:41
ToolBarState::currentWidget
virtual UMLWidget * currentWidget() const
Definition: toolbarstate.cpp:438
ToolBarStateMessages::CreationMessage
@ CreationMessage
Definition: toolbarstatemessages.h:82
umldoc.h
Uml::SequenceMessage::Found
@ Found
Definition: basictypes.h:225
ToolBarStateMessages::NormalMessage
@ NormalMessage
Definition: toolbarstatemessages.h:81