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

toolbarstate.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 TOOLBARSTATE_H
12 #define TOOLBARSTATE_H
13
14 #include <QEvent>
15 #include <QObject>
16 #include <QPointF>
17
18 class AssociationWidget;
19 class FloatingDashLineWidget;
20 class MessageWidget;
21 class QGraphicsSceneMouseEvent;
22 class UMLScene;
23 class UMLWidget;
24
69 class ToolBarState: public QObject
70 {
71 Q_OBJECT
72 public:
73 virtual ~ToolBarState();
74
75 virtual void init();
76
77 virtual void cleanBeforeChange();
78
79 virtual void mousePress(QGraphicsSceneMouseEvent* ome);
80 virtual void mouseRelease(QGraphicsSceneMouseEvent* ome);
81 virtual void mouseDoubleClick(QGraphicsSceneMouseEvent* ome);
82 virtual void mouseMove(QGraphicsSceneMouseEvent* ome);
83
84 public slots:
85 virtual void slotAssociationRemoved(AssociationWidget* association);
86 virtual void slotWidgetRemoved(UMLWidget* widget);
87
88 signals:
89 // signals finish of operation
90 void finished();
91
92 protected:
93 ToolBarState(UMLScene* umlScene);
94
95 virtual void setCurrentElement();
96
97 virtual void mousePressAssociation();
98 virtual void mousePressWidget();
99 virtual void mousePressEmpty();
100 virtual void mouseReleaseAssociation();
101 virtual void mouseReleaseWidget();
102 virtual void mouseReleaseEmpty();
103 virtual void mouseDoubleClickAssociation();
104 virtual void mouseDoubleClickWidget();
105 virtual void mouseDoubleClickEmpty();
106 virtual void mouseMoveAssociation();
107 virtual void mouseMoveWidget();
108 virtual void mouseMoveEmpty();
109
110 virtual void changeTool();
111
112 virtual UMLWidget* currentWidget() const;
113 virtual void setCurrentWidget(UMLWidget* widget);
114
115 virtual AssociationWidget* currentAssociation() const;
116 virtual void setCurrentAssociation(AssociationWidget* association);
117
118 void setMouseEvent(QGraphicsSceneMouseEvent* ome, const QEvent::Type &type);
119
120 AssociationWidget* associationAt(const QPointF& pos);
121 MessageWidget* messageAt(const QPointF& pos);
122 FloatingDashLineWidget* floatingLineAt(const QPointF& pos);
123
124 UMLScene* m_pUMLScene;
125 QGraphicsSceneMouseEvent* m_pMouseEvent;
126 // This event is the equivalent of the received event after transforming it
127 // using the inverse world matrix in the UMLScene.
128
129 private:
130 UMLWidget* m_currentWidget;
131 AssociationWidget* m_currentAssociation;
132
133 };
134
135 #endif //TOOLBARSTATE_H
ToolBarState::mouseDoubleClickAssociation
virtual void mouseDoubleClickAssociation()
Definition: toolbarstate.cpp:372
ToolBarState::setCurrentElement
virtual void setCurrentElement()
Definition: toolbarstate.cpp:273
ToolBarState::cleanBeforeChange
virtual void cleanBeforeChange()
Definition: toolbarstate.cpp:60
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
ToolBarState::mouseDoubleClick
virtual void mouseDoubleClick(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:144
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
UMLScene::associationList
const AssociationWidgetList associationList() const
Definition: umlscene.cpp:589
MessageWidget::onWidget
UMLWidget * onWidget(const QPointF &p)
Definition: messagewidget.cpp:617
AssociationWidget::onAssociation
bool onAssociation(const QPointF &point)
Definition: associationwidget.cpp:3774
ToolBarState::mousePress
virtual void mousePress(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:79
UMLScene::activeView
UMLView * activeView() const
Definition: umlscene.cpp:348
ToolBarState::mouseReleaseWidget
virtual void mouseReleaseWidget()
Definition: toolbarstate.cpp:356
ToolBarState::changeTool
virtual void changeTool()
Definition: toolbarstate.cpp:426
UMLScene::onWidgetDestructionBox
ObjectWidget * onWidgetDestructionBox(const QPointF &point) const
Definition: umlscene.cpp:1039
ToolBarState::finished
void finished()
Definition: moc_toolbarstate.cpp:146
ToolBarState::m_pUMLScene
UMLScene * m_pUMLScene
The UMLScene.
Definition: toolbarstate.h:124
ToolBarState::mousePressEmpty
virtual void mousePressEmpty()
Definition: toolbarstate.cpp:337
ToolBarState::messageAt
MessageWidget * messageAt(const QPointF &pos)
Definition: toolbarstate.cpp:516
floatingdashlinewidget.h
UMLScene::setPaste
void setPaste(bool paste)
Definition: umlscene.cpp:2979
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
ToolBarState::mouseMoveWidget
virtual void mouseMoveWidget()
Definition: toolbarstate.cpp:409
UMLScene::clearSelected
void clearSelected()
Definition: umlscene.cpp:1456
ToolBarState::floatingLineAt
FloatingDashLineWidget * floatingLineAt(const QPointF &pos)
Definition: toolbarstate.cpp:551
WidgetBase::asFloatingDashLineWidget
FloatingDashLineWidget * asFloatingDashLineWidget()
Definition: widgetbase.cpp:1477
UMLScene::widgetAt
UMLWidget * widgetAt(const QPointF &p)
Definition: umlscene.cpp:1074
ToolBarState::mousePressWidget
virtual void mousePressWidget()
Definition: toolbarstate.cpp:329
ToolBarState::currentAssociation
virtual AssociationWidget * currentAssociation() const
Definition: toolbarstate.cpp:462
ToolBarState::setCurrentAssociation
virtual void setCurrentAssociation(AssociationWidget *association)
Definition: toolbarstate.cpp:476
toolbarstate.h
UMLScene::onWidgetLine
ObjectWidget * onWidgetLine(const QPointF &point) const
Definition: umlscene.cpp:1014
UMLView
Definition: umlview.h:35
ToolBarState::setCurrentWidget
virtual void setCurrentWidget(UMLWidget *widget)
Definition: toolbarstate.cpp:452
ToolBarState::mouseMoveEmpty
virtual void mouseMoveEmpty()
Definition: toolbarstate.cpp:418
ToolBarState::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
Definition: toolbarstate.cpp:242
objectwidget.h
umlwidget.h
messagewidget.h
ToolBarState::mousePressAssociation
virtual void mousePressAssociation()
Definition: toolbarstate.cpp:321
ToolBarState::init
virtual void init()
Definition: toolbarstate.cpp:41
uDebug
#define uDebug()
Definition: debug_utils.h:122
UMLApp::workToolBar
WorkToolBar * workToolBar() const
Definition: uml.cpp:1885
UMLScene::widgetList
const UMLWidgetList widgetList() const
Definition: umlscene.cpp:603
ToolBarState::mouseDoubleClickWidget
virtual void mouseDoubleClickWidget()
Definition: toolbarstate.cpp:380
ToolBarState::m_pMouseEvent
QGraphicsSceneMouseEvent * m_pMouseEvent
The mouse event currently in use.
Definition: toolbarstate.h:125
FloatingDashLineWidget
A dash line for UML combined fragments.
Definition: floatingdashlinewidget.h:34
ToolBarState::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Definition: toolbarstate.cpp:364
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
UMLScene::messageList
const MessageWidgetList messageList() const
Definition: umlscene.cpp:629
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
FloatingDashLineWidget::onLine
bool onLine(const QPointF &point)
Definition: floatingdashlinewidget.cpp:89
ToolBarState::~ToolBarState
virtual ~ToolBarState()
Definition: toolbarstate.cpp:32
ToolBarState::mouseReleaseAssociation
virtual void mouseReleaseAssociation()
Definition: toolbarstate.cpp:348
ToolBarState::mouseDoubleClickEmpty
virtual void mouseDoubleClickEmpty()
Definition: toolbarstate.cpp:388
associationwidget.h
ToolBarState::ToolBarState
ToolBarState(UMLScene *umlScene)
Definition: toolbarstate.cpp:257
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:33
uml.h
ToolBarState::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:181
WidgetBase::isFloatingDashLineWidget
bool isFloatingDashLineWidget()
Definition: widgetbase.h:253
debug_utils.h
ToolBarState::setMouseEvent
void setMouseEvent(QGraphicsSceneMouseEvent *ome, const QEvent::Type &type)
Definition: toolbarstate.cpp:489
UMLScene
Definition: umlscene.h:69
ToolBarState::mouseRelease
virtual void mouseRelease(QGraphicsSceneMouseEvent *ome)
Definition: toolbarstate.cpp:111
UMLScene::setPos
void setPos(const QPointF &pos)
Definition: umlscene.cpp:466
uIgnoreZeroPointer
#define uIgnoreZeroPointer(a)
Definition: debug_utils.h:134
ToolBarState::slotAssociationRemoved
virtual void slotAssociationRemoved(AssociationWidget *association)
Definition: toolbarstate.cpp:229
ToolBarState::associationAt
AssociationWidget * associationAt(const QPointF &pos)
Definition: toolbarstate.cpp:534
ToolBarState::mouseMoveAssociation
virtual void mouseMoveAssociation()
Definition: toolbarstate.cpp:400
ToolBarState::m_currentWidget
UMLWidget * m_currentWidget
The widget currently in use, if any.
Definition: toolbarstate.h:130
MessageWidget
Displays a message.
Definition: messagewidget.h:41
ToolBarState::currentWidget
virtual UMLWidget * currentWidget() const
Definition: toolbarstate.cpp:438
WorkToolBar::setDefaultTool
void setDefaultTool()
Definition: worktoolbar.cpp:312
ToolBarState::m_currentAssociation
AssociationWidget * m_currentAssociation
The association currently in use, if any.
Definition: toolbarstate.h:131
ToolBarState
Definition: toolbarstate.h:70