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

cmdbasewidgetcommand.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) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef CMDBASEWIDGETCOMMAND_H
12 #define CMDBASEWIDGETCOMMAND_H
13
14 #include "basictypes.h"
15
16 #include <QPointer>
17 #include <QUndoCommand>
18
19 class AssociationWidget;
20 class UMLScene;
21 class UMLWidget;
22
23 namespace Uml
24 {
25 class CmdBaseWidgetCommand : public QUndoCommand
26 {
27 public:
28 explicit CmdBaseWidgetCommand(UMLWidget* widget);
29 CmdBaseWidgetCommand(AssociationWidget* widget);
30 virtual ~CmdBaseWidgetCommand();
31
32 protected:
33 Uml::ID::Type m_sceneId;
34 Uml::ID::Type m_widgetId;
35 QPointer<UMLScene> m_scene;
36 QPointer<UMLWidget> m_widget;
37 QPointer<AssociationWidget> m_assocWidget;
38 bool m_isAssoc;
39
40 void setWidget(UMLWidget* widget);
41 void setWidget(AssociationWidget* widget);
42 void addWidgetToScene(UMLWidget* widget);
43 void addWidgetToScene(AssociationWidget* widget);
44 void removeWidgetFromScene(UMLWidget *widget);
45 void removeWidgetFromScene(AssociationWidget *widget);
46 UMLWidget* widget();
47 AssociationWidget* assocWidget();
48 UMLScene* scene();
49 };
50 }
51
52 #endif // CMDBASEWIDGETCOMMAND_H
Uml::ModelType::Enum
Enum
Definition: basictypes.h:41
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
Uml::CmdBaseWidgetCommand::m_sceneId
Uml::ID::Type m_sceneId
Definition: cmdbasewidgetcommand.h:33
Model_Utils::convert_DT_MT
Uml::ModelType::Enum convert_DT_MT(Uml::DiagramType::Enum dt)
Definition: model_utils.cpp:1414
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
Uml::AssociationType::Containment
@ Containment
Definition: basictypes.h:116
Uml::CmdBaseWidgetCommand::CmdBaseWidgetCommand
CmdBaseWidgetCommand(UMLWidget *widget)
Definition: cmdbasewidgetcommand.cpp:27
WidgetBase::umlScene
UMLScene * umlScene() const
Definition: widgetbase.cpp:162
WidgetBase::localID
Uml::ID::Type localID() const
Definition: widgetbase.cpp:238
Uml::RoleType::A
@ A
Definition: basictypes.h:239
UMLDoc::rootFolder
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Definition: umldoc.cpp:3205
association.h
Uml::CmdBaseWidgetCommand::scene
UMLScene * scene()
Definition: cmdbasewidgetcommand.cpp:65
cmdbasewidgetcommand.h
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
Uml::CmdBaseWidgetCommand::assocWidget
AssociationWidget * assocWidget()
Definition: cmdbasewidgetcommand.cpp:86
model_utils.h
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
WidgetBase::umlObject
UMLObject * umlObject() const
Definition: widgetbase.cpp:182
Uml::CmdBaseWidgetCommand::m_scene
QPointer< UMLScene > m_scene
Definition: cmdbasewidgetcommand.h:35
UMLView
Definition: umlview.h:35
Uml::CmdBaseWidgetCommand::~CmdBaseWidgetCommand
virtual ~CmdBaseWidgetCommand()
Definition: cmdbasewidgetcommand.cpp:39
umlwidget.h
Uml::CmdBaseWidgetCommand
Definition: cmdbasewidgetcommand.h:26
UMLDoc::addAssociation
void addAssociation(UMLAssociation *assoc)
Definition: umldoc.cpp:1481
UMLWidget::clipSize
void clipSize()
Definition: umlwidget.cpp:1805
folder.h
messagewidget.h
Uml::CmdBaseWidgetCommand::m_assocWidget
QPointer< AssociationWidget > m_assocWidget
Definition: cmdbasewidgetcommand.h:37
basictypes.h
Uml::CmdBaseWidgetCommand::widget
UMLWidget * widget()
Definition: cmdbasewidgetcommand.cpp:76
Uml::CmdBaseWidgetCommand::m_widget
QPointer< UMLWidget > m_widget
Definition: cmdbasewidgetcommand.h:36
Uml::RoleType::B
@ B
Definition: basictypes.h:240
Uml::CmdBaseWidgetCommand::m_isAssoc
bool m_isAssoc
Definition: cmdbasewidgetcommand.h:38
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLDoc
Definition: umldoc.h:75
UMLScene::findWidget
UMLWidget * findWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1184
Uml
Definition: basictypes.cpp:37
Model_Utils::treeViewMoveObjectTo
void treeViewMoveObjectTo(UMLObject *container, UMLObject *object)
Definition: model_utils.cpp:437
associationwidget.h
UMLScene::removeWidgetCmd
void removeWidgetCmd(UMLWidget *o)
Definition: umlscene.cpp:1309
umlscene.h
uml.h
UMLObject::setUMLPackage
bool setUMLPackage(UMLPackage *pPkg)
Definition: umlobject.cpp:616
UMLAssociation
Sets up association information.
Definition: association.h:33
UMLScene
Definition: umlscene.h:69
Uml::CmdBaseWidgetCommand::addWidgetToScene
void addWidgetToScene(UMLWidget *widget)
Definition: cmdbasewidgetcommand.cpp:101
UMLAssociation::getAssocType
Uml::AssociationType::Enum getAssocType() const
Definition: association.cpp:105
UMLView::umlScene
UMLScene * umlScene() const
Definition: umlview.cpp:56
UMLScene::addWidgetCmd
void addWidgetCmd(UMLWidget *widget)
Definition: umlscene.cpp:614
UMLScene::ID
Uml::ID::Type ID() const
Definition: umlscene.cpp:442
Uml::CmdBaseWidgetCommand::m_widgetId
Uml::ID::Type m_widgetId
Definition: cmdbasewidgetcommand.h:34
UMLDoc::findView
UMLView * findView(Uml::ID::Type id)
Definition: umldoc.cpp:1005
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
Uml::CmdBaseWidgetCommand::setWidget
void setWidget(UMLWidget *widget)
Definition: cmdbasewidgetcommand.cpp:43
UMLScene::findAssocWidget
AssociationWidget * findAssocWidget(Uml::ID::Type id)
Definition: umlscene.cpp:1213
WidgetBase::id
Uml::ID::Type id() const
Definition: widgetbase.cpp:214
UMLWidget::activate
virtual bool activate(IDChangeLog *changeLog=0)
Definition: umlwidget.cpp:1192
Uml::CmdBaseWidgetCommand::removeWidgetFromScene
void removeWidgetFromScene(UMLWidget *widget)
Definition: cmdbasewidgetcommand.cpp:136