umbrello: umbrello/diagram_utils.h Source File

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

diagram_utils.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) 2017-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef DIAGRAM_UTILS_H
12 #define DIAGRAM_UTILS_H
13
14 #include "basictypes.h"
15
16 #include <QString>
17
18 class UMLScene;
19 class QMimeData;
20 class QStringList;
21
27 namespace Diagram_Utils {
28 typedef enum { Invalid, GDB, QtCreatorGDB, Simple} SequenceLineFormat;
29 SequenceLineFormat detectSequenceLineFormat(const QStringList &lines);
30 bool importSequences(const QStringList &lines, UMLScene *scene, const QString &fileName=QString());
31 bool importGraph(const QStringList &lines, UMLScene *scene, const QString &fileName=QString());
32 bool importGraph(const QString &fileName, UMLScene *scene);
33 bool importGraph(const QMimeData *mimeData, UMLScene *scene);
34 bool isUniqueDiagramName(Uml::DiagramType::Enum type, QString &name);
35 } // end namespace Diagram_Utils
36
37 #endif
UMLScene::createAutoAttributeAssociations2
void createAutoAttributeAssociations2(UMLWidget *widget)
Definition: umlscene.cpp:2796
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1308
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
Import_Utils::insertAttribute
UMLAttribute * insertAttribute(UMLClassifier *owner, Uml::Visibility::Enum scope, const QString &name, UMLClassifier *attrType, const QString &comment, bool isStatic)
Definition: import_utils.cpp:426
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
CodeGenFactory::createObject
CodeGenerator * createObject(Uml::ProgrammingLanguage::Enum pl)
Definition: codegenfactory.cpp:107
ObjectWidget::slotMessageMoved
void slotMessageMoved()
Definition: objectwidget.cpp:590
Import_Utils::createUMLObjectHierarchy
UMLObject * createUMLObjectHierarchy(UMLObject::ObjectType type, const QString &name, UMLPackage *topLevelParent)
Definition: import_utils.cpp:376
UMLDoc::findAssociation
UMLAssociation * findAssociation(Uml::AssociationType::Enum assocType, const UMLObject *roleAObj, const UMLObject *roleBObj, bool *swap=0)
Definition: umldoc.cpp:1427
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
UMLApp::logWindow
QListWidget * logWindow() const
Definition: uml.cpp:1896
Object_Factory::createUMLObject
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Definition: object_factory.cpp:211
AssociationWidget::create
static AssociationWidget * create(UMLScene *scene)
Definition: associationwidget.cpp:102
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:89
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
Uml::RoleType::A
@ A
Definition: basictypes.h:256
Uml::ModelType::Logical
@ Logical
Definition: basictypes.h:93
UMLDoc::rootFolder
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Definition: umldoc.cpp:3194
Diagram_Utils::detectSequenceLineFormat
SequenceLineFormat detectSequenceLineFormat(const QStringList &lines)
Definition: diagram_utils.cpp:46
Uml::DiagramType::Enum
Enum
Definition: basictypes.h:94
object_factory.h
MessageWidget::setCustomOpText
virtual void setCustomOpText(const QString &opText)
Definition: messagewidget.cpp:989
association.h
Diagram_Utils::importGraph
bool importGraph(const QStringList &lines, UMLScene *scene, const QString &fileName)
Definition: diagram_utils.cpp:317
LinkWidget::setSequenceNumber
void setSequenceNumber(const QString &sequenceNumber)
Definition: linkwidget.cpp:95
Uml::SequenceMessage::Synchronous
@ Synchronous
Definition: basictypes.h:238
Import_Utils::insertMethod
void insertMethod(UMLClassifier *klass, UMLOperation *&op, Uml::Visibility::Enum scope, const QString &type, bool isStatic, bool isAbstract, bool isFriend, bool isConstructor, bool isDestructor, const QString &comment)
Definition: import_utils.cpp:498
MessageWidget::setY
virtual void setY(qreal y)
Definition: messagewidget.cpp:157
Uml::AssociationType::UniAssociation
@ UniAssociation
Definition: basictypes.h:136
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
diagram_utils.h
import_utils.h
Uml::AssociationType::Unknown
@ Unknown
Definition: basictypes.h:147
Diagram_Utils::importSequences
bool importSequences(const QStringList &lines, UMLScene *scene, const QString &fileName)
Definition: diagram_utils.cpp:202
UMLScene::setupNewWidget
void setupNewWidget(UMLWidget *w, bool setPosition=true)
Definition: umlscene.cpp:715
Uml::SequenceMessage::Creation
@ Creation
Definition: basictypes.h:240
Uml::AssociationType::Aggregation
@ Aggregation
Definition: basictypes.h:125
UMLDoc::endPaste
void endPaste()
Definition: umldoc.cpp:3246
Uml::Visibility::Public
@ Public
Definition: basictypes.h:77
Diagram_Utils
Definition: diagram_utils.cpp:39
UMLWidget::setX
virtual void setX(qreal x)
Definition: umlwidget.cpp:1685
UMLView
Definition: umlview.h:35
MessageWidgetList
QList< QPointer< MessageWidget > > MessageWidgetList
Definition: messagewidgetlist.h:18
UMLScene::addAssociation
bool addAssociation(AssociationWidget *pAssoc, bool isPasteOperation=false)
Definition: umlscene.cpp:2080
objectwidget.h
ObjectWidget::setX
virtual void setX(qreal x)
Definition: objectwidget.cpp:264
UMLScene::type
Uml::DiagramType::Enum type() const
Definition: umlscene.cpp:426
UMLDoc::addAssociation
void addAssociation(UMLAssociation *assoc)
Definition: umldoc.cpp:1479
Uml::AssociationType::Association
@ Association
Definition: basictypes.h:127
messagewidget.h
Widget_Factory::createWidget
UMLWidget * createWidget(UMLScene *scene, UMLObject *o)
Definition: widget_factory.cpp:78
widget_factory.h
basictypes.h
Uml::Visibility::Unknown
@ Unknown
Definition: basictypes.h:82
v
std::vector< std::string > v
Definition: cxx11-initializer-lists.h:19
Uml::RoleType::B
@ B
Definition: basictypes.h:257
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:123
Uml::AssociationType::Generalization
@ Generalization
Definition: basictypes.h:124
MessageWidget::objectWidget
ObjectWidget * objectWidget(Uml::RoleType::Enum role)
Definition: messagewidget.cpp:1326
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
visibility
Definition: visibility.py:1
Import_Utils::makeOperation
UMLOperation * makeOperation(UMLClassifier *parent, const QString &name)
Definition: import_utils.cpp:416
UMLDoc
Definition: umldoc.h:75
UMLObject::setBaseType
virtual void setBaseType(ObjectType ot)
Definition: umlobject.cpp:415
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:35
ObjectWidget::activate
bool activate(IDChangeLog *ChangeLog=0)
Definition: objectwidget.cpp:248
Diagram_Utils::GDB
@ GDB
Definition: diagram_utils.h:28
Diagram_Utils::parseSequenceLine
bool parseSequenceLine(const QString &s, QString &sequence, QString &package, QString &method, QString &error)
Definition: diagram_utils.cpp:88
associationwidget.h
Uml::Visibility::Enum
Enum
Definition: basictypes.h:76
Uml::DiagramType::Class
@ Class
Definition: basictypes.h:98
UMLDoc::findUMLObject
UMLObject * findUMLObject(const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
Definition: umldoc.cpp:1065
ObjectWidget
Displays an instance of a Concept.
Definition: objectwidget.h:33
UMLOperation
Definition: operation.h:25
Diagram_Utils::isUniqueDiagramName
bool isUniqueDiagramName(Uml::DiagramType::Enum type, QString &name)
Definition: diagram_utils.cpp:522
umlscene.h
uml.h
UMLWidget::setSize
void setSize(qreal width, qreal height)
Definition: umlwidget.cpp:1745
UMLObject::setUMLPackage
bool setUMLPackage(UMLPackage *pPkg)
Definition: umlobject.cpp:615
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:33
UMLScene::name
QString name() const
Definition: umlscene.cpp:410
UMLScene
Definition: umlscene.h:69
UMLScene::createAutoAssociations
void createAutoAssociations(UMLWidget *widget)
Definition: umlscene.cpp:2397
umlobject.h
MessageWidget::activate
virtual bool activate(IDChangeLog *Log=0)
Definition: messagewidget.cpp:802
Uml::AssociationType::Composition
@ Composition
Definition: basictypes.h:134
UMLView::umlScene
UMLScene * umlScene() const
Definition: umlview.cpp:56
Uml::DiagramType::Undefined
@ Undefined
Definition: basictypes.h:97
UMLScene::addWidgetCmd
void addWidgetCmd(UMLWidget *widget)
Definition: umlscene.cpp:614
Diagram_Utils::Invalid
@ Invalid
Definition: diagram_utils.h:28
b
bool b
Definition: cxx11-null-pointer-constant.h:6
UMLScene::isSequenceDiagram
bool isSequenceDiagram()
Definition: umlscene.h:318
MessageWidget::calculateWidget
void calculateWidget()
Definition: messagewidget.cpp:727
Diagram_Utils::QtCreatorGDB
@ QtCreatorGDB
Definition: diagram_utils.h:28
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
Diagram_Utils::Simple
@ Simple
Definition: diagram_utils.h:28
MessageWidget
Displays a message.
Definition: messagewidget.h:41
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1055
Uml::Visibility::fromString
Enum fromString(const QString &item, bool checkUnkown)
Definition: basictypes.cpp:144
umldoc.h
Diagram_Utils::SequenceLineFormat
SequenceLineFormat
Definition: diagram_utils.h:28
UMLDoc::beginPaste
void beginPaste()
Definition: umldoc.cpp:3234