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

- Main Page
- Related Pages
- Topics
- 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 slots:
80 virtual void slotAssociationRemoved(AssociationWidget* association);
81 virtual void slotWidgetRemoved(UMLWidget* widget);
82
83signals:
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:233
ToolBarState::mousePressEmpty
virtual void mousePressEmpty()
Definition toolbarstate.cpp:341
ToolBarState::setCurrentElement
virtual void setCurrentElement()
Definition toolbarstate.cpp:277
ToolBarState::setCurrentWidget
virtual void setCurrentWidget(UMLWidget *widget)
Definition toolbarstate.cpp:460
ToolBarState::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Definition toolbarstate.cpp:368
ToolBarState::mouseDoubleClickAssociation
virtual void mouseDoubleClickAssociation()
Definition toolbarstate.cpp:380
ToolBarState::init
virtual void init()
Definition toolbarstate.cpp:39
ToolBarState::messageAt
MessageWidget * messageAt(const QPointF &pos)
Definition toolbarstate.cpp:524
ToolBarState::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition toolbarstate.cpp:182
ToolBarState::mouseMoveEmpty
virtual void mouseMoveEmpty()
Definition toolbarstate.cpp:426
ToolBarState::ToolBarState
ToolBarState(UMLScene *umlScene)
Definition toolbarstate.cpp:261
ToolBarState::~ToolBarState
virtual ~ToolBarState()
Definition toolbarstate.cpp:30
ToolBarState::currentAssociation
virtual AssociationWidget * currentAssociation() const
Definition toolbarstate.cpp:470
ToolBarState::currentWidget
virtual UMLWidget * currentWidget() const
Definition toolbarstate.cpp:446
ToolBarState::cleanBeforeChange
virtual void cleanBeforeChange()
Definition toolbarstate.cpp:58
ToolBarState::mouseMoveAssociation
virtual void mouseMoveAssociation()
Definition toolbarstate.cpp:408
ToolBarState::finished
void finished()
ToolBarState::mouseMoveWidget
virtual void mouseMoveWidget()
Definition toolbarstate.cpp:417
ToolBarState::mousePress
virtual void mousePress(QGraphicsSceneMouseEvent *ome)
Definition toolbarstate.cpp:77
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:497
ToolBarState::m_pUMLScene
UMLScene * m_pUMLScene
The UMLScene.
Definition toolbarstate.h:119
ToolBarState::mouseDoubleClickEmpty
virtual void mouseDoubleClickEmpty()
Definition toolbarstate.cpp:396
ToolBarState::setCurrentAssociation
virtual void setCurrentAssociation(AssociationWidget *association)
Definition toolbarstate.cpp:484
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:360
ToolBarState::mousePressAssociation
virtual void mousePressAssociation()
Definition toolbarstate.cpp:325
ToolBarState::changeTool
virtual void changeTool()
Definition toolbarstate.cpp:434
ToolBarState::mouseReleaseAssociation
virtual void mouseReleaseAssociation()
Definition toolbarstate.cpp:352
ToolBarState::mousePressWidget
virtual void mousePressWidget()
Definition toolbarstate.cpp:333
ToolBarState::mouseDoubleClickWidget
virtual void mouseDoubleClickWidget()
Definition toolbarstate.cpp:388
ToolBarState::mouseDoubleClick
virtual void mouseDoubleClick(QGraphicsSceneMouseEvent *ome)
Definition toolbarstate.cpp:145
ToolBarState::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition toolbarstate.cpp:246
ToolBarState::associationAt
AssociationWidget * associationAt(const QPointF &pos)
Definition toolbarstate.cpp:542
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:109
ToolBarState::floatingLineAt
FloatingDashLineWidget * floatingLineAt(const QPointF &pos)
Definition toolbarstate.cpp:559
UMLScene
Definition umlscene.h:65
UMLWidget
The base class for graphical UML objects.
Definition umlwidget.h:36