umbrello: umbrello/toolbarstatemessages.h Source File

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 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef TOOLBARSTATEMESSAGES_H
7#define TOOLBARSTATEMESSAGES_H
8
9#include "basictypes.h"
10#include "toolbarstatepool.h"
11
12class MessageWidget;
13class ObjectWidget;
14class QGraphicsLineItem;
15
45 class ToolBarStateMessages : public ToolBarStatePool
46{
47 Q_OBJECT
48public:
49
50 explicit ToolBarStateMessages(UMLScene *umlScene);
51 virtual ~ToolBarStateMessages();
52
53 virtual void init();
54
55 virtual void cleanBeforeChange();
56
57 virtual void mouseMove(QGraphicsSceneMouseEvent* ome);
58
59public slots:
60
61 virtual void slotWidgetRemoved(UMLWidget* widget);
62
63protected:
64
65 virtual void setCurrentElement();
66
67 virtual void mouseReleaseWidget();
68 virtual void mouseReleaseEmpty();
69
70protected:
71
75 enum MessageType {
76 NormalMessage,
77 CreationMessage,
78 FoundMessage,
79 LostMessage
80 };
81
82 void setFirstWidget(ObjectWidget* firstObject);
83 void setSecondWidget(ObjectWidget* secondObject, MessageType messageType);
84
85 Uml::SequenceMessage::Enum getMessageType();
86
87 void cleanMessage();
88
92 ObjectWidget* m_firstObject;
93
98 QGraphicsLineItem* m_messageLine;
99
104 bool m_isObjectWidgetLine;
105
106private:
107 void setupMessageWidget(MessageWidget *msg, bool showOperationDialog = true);
108
112 qreal xclick;
113 qreal yclick;
114
115};
116
117#endif //TOOLBARSTATEMESSAGES_H
basictypes.h
MessageWidget
Displays a message.
Definition: messagewidget.h:36
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:28
ToolBarStateMessages
Definition: toolbarstatemessages.h:46
ToolBarStateMessages::init
virtual void init()
Definition: toolbarstatemessages.cpp:52
ToolBarStateMessages::setSecondWidget
void setSecondWidget(ObjectWidget *secondObject, MessageType messageType)
Definition: toolbarstatemessages.cpp:268
ToolBarStateMessages::mouseReleaseWidget
virtual void mouseReleaseWidget()
Definition: toolbarstatemessages.cpp:141
ToolBarStateMessages::xclick
qreal xclick
Definition: toolbarstatemessages.h:112
ToolBarStateMessages::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition: toolbarstatemessages.cpp:91
ToolBarStateMessages::setCurrentElement
virtual void setCurrentElement()
Definition: toolbarstatemessages.cpp:107
ToolBarStateMessages::setFirstWidget
void setFirstWidget(ObjectWidget *firstObject)
Definition: toolbarstatemessages.cpp:231
ToolBarStateMessages::MessageType
MessageType
Definition: toolbarstatemessages.h:75
ToolBarStateMessages::NormalMessage
@ NormalMessage
Definition: toolbarstatemessages.h:76
ToolBarStateMessages::CreationMessage
@ CreationMessage
Definition: toolbarstatemessages.h:77
ToolBarStateMessages::LostMessage
@ LostMessage
Definition: toolbarstatemessages.h:79
ToolBarStateMessages::FoundMessage
@ FoundMessage
Definition: toolbarstatemessages.h:78
ToolBarStateMessages::ToolBarStateMessages
ToolBarStateMessages(UMLScene *umlScene)
Definition: toolbarstatemessages.cpp:31
ToolBarStateMessages::~ToolBarStateMessages
virtual ~ToolBarStateMessages()
Definition: toolbarstatemessages.cpp:44
ToolBarStateMessages::m_isObjectWidgetLine
bool m_isObjectWidgetLine
Definition: toolbarstatemessages.h:104
ToolBarStateMessages::cleanBeforeChange
virtual void cleanBeforeChange()
Definition: toolbarstatemessages.cpp:63
ToolBarStateMessages::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstatemessages.cpp:75
ToolBarStateMessages::m_firstObject
ObjectWidget * m_firstObject
Definition: toolbarstatemessages.h:92
ToolBarStateMessages::setupMessageWidget
void setupMessageWidget(MessageWidget *msg, bool showOperationDialog=true)
Definition: toolbarstatemessages.cpp:327
ToolBarStateMessages::cleanMessage
void cleanMessage()
Definition: toolbarstatemessages.cpp:319
ToolBarStateMessages::m_messageLine
QGraphicsLineItem * m_messageLine
Definition: toolbarstatemessages.h:98
ToolBarStateMessages::yclick
qreal yclick
Definition: toolbarstatemessages.h:113
ToolBarStateMessages::getMessageType
Uml::SequenceMessage::Enum getMessageType()
Definition: toolbarstatemessages.cpp:295
ToolBarStateMessages::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Definition: toolbarstatemessages.cpp:172
ToolBarStatePool
Definition: toolbarstatepool.h:18
UMLScene
Definition: umlscene.h:65
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
Uml::SequenceMessage::Enum
Enum
Definition: basictypes.h:217
toolbarstatepool.h