umbrello: umbrello/toolbarstatemessages.h Source File

umbrello 2.32.0 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
basictypes.h
MessageWidget
Displays a message.
Definition: messagewidget.h:41
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:33
ToolBarStateMessages
Definition: toolbarstatemessages.h:51
ToolBarStateMessages::init
virtual void init()
Definition: toolbarstatemessages.cpp:57
ToolBarStateMessages::setSecondWidget
void setSecondWidget(ObjectWidget *secondObject, MessageType messageType)
Definition: toolbarstatemessages.cpp:273
ToolBarStateMessages::mouseReleaseWidget
virtual void mouseReleaseWidget()
Definition: toolbarstatemessages.cpp:146
ToolBarStateMessages::xclick
qreal xclick
Definition: toolbarstatemessages.h:117
ToolBarStateMessages::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition: toolbarstatemessages.cpp:96
ToolBarStateMessages::setCurrentElement
virtual void setCurrentElement()
Definition: toolbarstatemessages.cpp:112
ToolBarStateMessages::setFirstWidget
void setFirstWidget(ObjectWidget *firstObject)
Definition: toolbarstatemessages.cpp:236
ToolBarStateMessages::MessageType
MessageType
Definition: toolbarstatemessages.h:80
ToolBarStateMessages::NormalMessage
@ NormalMessage
Definition: toolbarstatemessages.h:81
ToolBarStateMessages::CreationMessage
@ CreationMessage
Definition: toolbarstatemessages.h:82
ToolBarStateMessages::LostMessage
@ LostMessage
Definition: toolbarstatemessages.h:84
ToolBarStateMessages::FoundMessage
@ FoundMessage
Definition: toolbarstatemessages.h:83
ToolBarStateMessages::ToolBarStateMessages
ToolBarStateMessages(UMLScene *umlScene)
Definition: toolbarstatemessages.cpp:36
ToolBarStateMessages::~ToolBarStateMessages
virtual ~ToolBarStateMessages()
Definition: toolbarstatemessages.cpp:49
ToolBarStateMessages::m_isObjectWidgetLine
bool m_isObjectWidgetLine
Definition: toolbarstatemessages.h:109
ToolBarStateMessages::cleanBeforeChange
virtual void cleanBeforeChange()
Definition: toolbarstatemessages.cpp:68
ToolBarStateMessages::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstatemessages.cpp:80
ToolBarStateMessages::m_firstObject
ObjectWidget * m_firstObject
Definition: toolbarstatemessages.h:97
ToolBarStateMessages::setupMessageWidget
void setupMessageWidget(MessageWidget *msg, bool showOperationDialog=true)
Definition: toolbarstatemessages.cpp:332
ToolBarStateMessages::cleanMessage
void cleanMessage()
Definition: toolbarstatemessages.cpp:324
ToolBarStateMessages::m_messageLine
QGraphicsLineItem * m_messageLine
Definition: toolbarstatemessages.h:103
ToolBarStateMessages::yclick
qreal yclick
Definition: toolbarstatemessages.h:118
ToolBarStateMessages::getMessageType
Uml::SequenceMessage::Enum getMessageType()
Definition: toolbarstatemessages.cpp:300
ToolBarStateMessages::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Definition: toolbarstatemessages.cpp:177
ToolBarStatePool
Definition: toolbarstatepool.h:23
UMLScene
Definition: umlscene.h:70
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
Uml::SequenceMessage::Enum
Enum
Definition: basictypes.h:231
toolbarstatepool.h