umbrello 26.03.70-1a62d36 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

toolbarstate.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 TOOLBARSTATE_H
7#define TOOLBARSTATE_H
8
9#include <QEvent>
10#include <QObject>
11#include <QPointF>
12
13 class AssociationWidget;
14 class FloatingDashLineWidget;
15 class MessageWidget;
16 class QGraphicsSceneMouseEvent;
17 class UMLScene;
18 class UMLWidget;
19
64 class ToolBarState : public QObject
65{
66 Q_OBJECT
67 public:
68 virtual ~ToolBarState();
69
70 virtual void init();
71
72 virtual void cleanBeforeChange();
73
74 virtual void mousePress(QGraphicsSceneMouseEvent* ome);
75 virtual void mouseRelease(QGraphicsSceneMouseEvent* ome);
76 virtual void mouseDoubleClick(QGraphicsSceneMouseEvent* ome);
77 virtual void mouseMove(QGraphicsSceneMouseEvent* ome);
78
79 public Q_SLOTS:
80 virtual void slotAssociationRemoved(AssociationWidget* association);
81 virtual void slotWidgetRemoved(UMLWidget* widget);
82
83Q_SIGNALS:
84 // signals finish of operation
85 void finished();
86
87 protected:
88 ToolBarState(UMLScene* umlScene);
89
90 virtual void setCurrentElement();
91
92 virtual void mousePressAssociation();
93 virtual void mousePressWidget();
94 virtual void mousePressEmpty();
95 virtual void mouseReleaseAssociation();
96 virtual void mouseReleaseWidget();
97 virtual void mouseReleaseEmpty();
98 virtual void mouseDoubleClickAssociation();
99 virtual void mouseDoubleClickWidget();
100 virtual void mouseDoubleClickEmpty();
101 virtual void mouseMoveAssociation();
102 virtual void mouseMoveWidget();
103 virtual void mouseMoveEmpty();
104
105 virtual void changeTool();
106
107 virtual UMLWidget* currentWidget() const;
108 virtual void setCurrentWidget(UMLWidget* widget);
109
110 virtual AssociationWidget* currentAssociation() const;
111 virtual void setCurrentAssociation(AssociationWidget* association);
112
113 void setMouseEvent(QGraphicsSceneMouseEvent* ome, const QEvent::Type &type);
114
115 AssociationWidget* associationAt(const QPointF& pos);
116 MessageWidget* messageAt(const QPointF& pos);
117 FloatingDashLineWidget* floatingLineAt(const QPointF& pos);
118
119 UMLScene* m_pUMLScene;
120 QGraphicsSceneMouseEvent* m_pMouseEvent;
121 // This event is the equivalent of the received event after transforming it
122 // using the inverse world matrix in the UMLScene.
123
124 private:
125 UMLWidget* m_currentWidget;
126 AssociationWidget* m_currentAssociation;
127
128};
129
130#endif //TOOLBARSTATE_H
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:47
FloatingDashLineWidget
A dash line for UML combined fragments.
Definition: floatingdashlinewidget.h:29
MessageWidget
Displays a message.
Definition: messagewidget.h:36
ToolBarState
Definition: toolbarstate.h:65
ToolBarState::slotAssociationRemoved
virtual void slotAssociationRemoved(AssociationWidget *association)
Definition: toolbarstate.cpp:232
ToolBarState::mousePressEmpty
virtual void mousePressEmpty()
Definition: toolbarstate.cpp:340
ToolBarState::setCurrentElement
virtual void setCurrentElement()
Definition: toolbarstate.cpp:276
ToolBarState::setCurrentWidget
virtual void setCurrentWidget(UMLWidget *widget)
Definition: toolbarstate.cpp:459
ToolBarState::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Definition: toolbarstate.cpp:367
ToolBarState::mouseDoubleClickAssociation
virtual void mouseDoubleClickAssociation()
Definition: toolbarstate.cpp:379
ToolBarState::init
virtual void init()
Definition: toolbarstate.cpp:38
ToolBarState::messageAt
MessageWidget * messageAt(const QPointF &pos)
Definition: toolbarstate.cpp:523
ToolBarState::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:181
ToolBarState::mouseMoveEmpty
virtual void mouseMoveEmpty()
Definition: toolbarstate.cpp:425
ToolBarState::~ToolBarState
virtual ~ToolBarState()
Definition: toolbarstate.cpp:29
ToolBarState::currentAssociation
virtual AssociationWidget * currentAssociation() const
Definition: toolbarstate.cpp:469
ToolBarState::currentWidget
virtual UMLWidget * currentWidget() const
Definition: toolbarstate.cpp:445
ToolBarState::cleanBeforeChange
virtual void cleanBeforeChange()
Definition: toolbarstate.cpp:57
ToolBarState::mouseMoveAssociation
virtual void mouseMoveAssociation()
Definition: toolbarstate.cpp:407
ToolBarState::finished
void finished()
ToolBarState::mouseMoveWidget
virtual void mouseMoveWidget()
Definition: toolbarstate.cpp:416
ToolBarState::mousePress
virtual void mousePress(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:76
ToolBarState::m_currentAssociation
AssociationWidget * m_currentAssociation
The association currently in use, if any.
Definition: toolbarstate.h:126
ToolBarState::setMouseEvent
void setMouseEvent(QGraphicsSceneMouseEvent *ome, const QEvent::Type &type)
Definition: toolbarstate.cpp:496
ToolBarState::m_pUMLScene
UMLScene * m_pUMLScene
The UMLScene.
Definition: toolbarstate.h:119
ToolBarState::mouseDoubleClickEmpty
virtual void mouseDoubleClickEmpty()
Definition: toolbarstate.cpp:395
ToolBarState::setCurrentAssociation
virtual void setCurrentAssociation(AssociationWidget *association)
Definition: toolbarstate.cpp:483
ToolBarState::m_currentWidget
UMLWidget * m_currentWidget
The widget currently in use, if any.
Definition: toolbarstate.h:125
ToolBarState::mouseReleaseWidget
virtual void mouseReleaseWidget()
Definition: toolbarstate.cpp:359
ToolBarState::mousePressAssociation
virtual void mousePressAssociation()
Definition: toolbarstate.cpp:324
ToolBarState::changeTool
virtual void changeTool()
Definition: toolbarstate.cpp:433
ToolBarState::mouseReleaseAssociation
virtual void mouseReleaseAssociation()
Definition: toolbarstate.cpp:351
ToolBarState::mousePressWidget
virtual void mousePressWidget()
Definition: toolbarstate.cpp:332
ToolBarState::mouseDoubleClickWidget
virtual void mouseDoubleClickWidget()
Definition: toolbarstate.cpp:387
ToolBarState::mouseDoubleClick
virtual void mouseDoubleClick(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:144
ToolBarState::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition: toolbarstate.cpp:245
ToolBarState::associationAt
AssociationWidget * associationAt(const QPointF &pos)
Definition: toolbarstate.cpp:541
ToolBarState::m_pMouseEvent
QGraphicsSceneMouseEvent * m_pMouseEvent
The mouse event currently in use.
Definition: toolbarstate.h:120
ToolBarState::mouseRelease
virtual void mouseRelease(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:108
ToolBarState::floatingLineAt
FloatingDashLineWidget * floatingLineAt(const QPointF &pos)
Definition: toolbarstate.cpp:558
UMLScene
Definition: umlscene.h:66
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36