umbrello/umbrello
model_utils.cpp
Go to the documentation of this file.
bool isClassifierListitem(UMLObject::ObjectType type)
Return true if the given object type is a classifier list item type.
Definition: model_utils.cpp:572
Uml::ModelType::Enum rootFolderType(UMLObject *obj)
Return the corresponding Model_Type if the given object is one of the root folders.
Definition: umldoc.cpp:2736
bool typeIsClassifierList(UMLListViewItem::ListViewType type)
Return true if the listview type is an attribute, operation, or template.
Definition: model_utils.cpp:1007
UMLObject * getObject(Uml::RoleType::Enum role) const
Returns the UMLObject assigned to the given role.
Definition: association.cpp:497
Definition: umlobject.h:61
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
Definition: umlobject.h:63
QString cap(int nth) const
bool typeIsClassifier(UMLListViewItem::ListViewType type)
Return true if the listview type is a classifier (Class, Entity, Enum)
Definition: model_utils.cpp:1027
Definition: widgetbase.h:51
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
Definition: umllistviewitem.h:63
UMLObject * umlObject() const
Return the UMLObject associated with this instance.
Definition: umllistviewitem.cpp:309
bool typeIsAllowedInType(UMLListViewItem::ListViewType childType, UMLListViewItem::ListViewType parentType)
Check if a listviewitem of type childType is allowed as child of type parentType. ...
Definition: model_utils.cpp:1042
Definition: icon_utils.h:114
bool typeIsDiagram(UMLListViewItem::ListViewType type)
Return true if the listview type is a diagram.
Definition: model_utils.cpp:1121
QString treeViewBuildDiagramName(Uml::ID::Type id)
Build the diagram name from the tree view.
Definition: model_utils.cpp:424
Definition: widgetbase.h:48
Definition: basictypes.h:215
Definition: widgetbase.h:44
Definition: icon_utils.h:53
Definition: basictypes.h:76
Definition: icon_utils.h:49
QString attribute(const QString &name, const QString &defValue) const
Definition: umlobject.h:56
Definition: model_utils.h:115
static bool tagEq(const QString &tag, const QString &pattern)
Function for comparing tags in XMI files.
Definition: umldoc.cpp:3081
Definition: basictypes.h:41
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
Uml::ModelType::Enum convert_DT_MT(Uml::DiagramType::Enum dt)
Return the Model_Type which corresponds to the given DiagramType.
Definition: model_utils.cpp:1141
Definition: umllistviewitem.h:73
Definition: icon_utils.h:88
Definition: umlobject.h:52
Parse_Status parseConstraint(QString m, QString &name, UMLEntity *owningScope)
Parses a constraint.
Definition: model_utils.cpp:886
UpdateDeleteAction
Update/Delete Action: Action to be taken on Update or Delete of a referenced attribute is either...
Definition: foreignkeyconstraint.h:42
Definition: basictypes.h:216
Definition: umllistviewitem.h:91
QString simplified() const
Definition: icon_utils.h:86
Definition: basictypes.h:84
Definition: umllistviewitem.h:57
Definition: umlobject.h:72
Definition: basictypes.h:80
QString updateDeleteActionToString(UMLForeignKeyConstraint::UpdateDeleteAction uda)
Converts from the UpdateDeleteAction enum to a QString.
Definition: model_utils.cpp:1758
Definition: icon_utils.h:119
Definition: umlobject.h:60
QString join(const QString &separator) const
bool isCloneable(WidgetBase::WidgetType type)
Determines whether the given widget type is cloneable.
Definition: model_utils.cpp:52
Definition: umlobject.h:62
QString & remove(int position, int n)
Definition: widgetbase.h:47
Definition: umllistviewitem.h:56
UMLObject * findUMLObject(const UMLObjectList &inList, const QString &inName, UMLObject::ObjectType type, UMLObject *currentObj)
Find the UML object of the given type and name in the passed-in list.
Definition: model_utils.cpp:140
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
Definition: umllistviewitem.h:76
Definition: icon_utils.h:40
Uml::ModelType::Enum convert_OT_MT(UMLObject::ObjectType ot)
Return the Model_Type which corresponds to the given ObjectType.
Definition: model_utils.cpp:1723
Definition: widgetbase.h:59
Definition: icon_utils.h:92
UMLListViewItem::ListViewType convert_MT_LVT(Uml::ModelType::Enum mt)
Return the ListViewType which corresponds to the given Model_Type.
Definition: model_utils.cpp:1175
int size() const
Definition: basictypes.h:58
UMLObject * treeViewGetCurrentObject()
Return the current UMLObject from the tree view.
Definition: model_utils.cpp:386
This class contains the non-graphic representation of an association.
Definition: association.h:32
int indexOf(const T &value, int from) const
int indexIn(const QString &str, int offset, CaretMode caretMode) const
QString getXmiId(QDomElement element)
Return the xmi.id (XMI-1) or xmi:id (XMI-2) of a QDomElement.
Definition: model_utils.cpp:511
Definition: icon_utils.h:113
void treeViewAddViews(const UMLViewList &viewList)
Add the given list of views to the tree view.
Definition: model_utils.cpp:335
Definition: basictypes.h:79
static QString toString(ObjectType ot)
Helper function for debug output.
Definition: umlobject.cpp:1079
QString number(int n, int base)
Definition: basictypes.h:82
bool typeIsRootView(UMLListViewItem::ListViewType type)
Return true if the listview type is one of the predefined root views (root, logical, usecase, component, deployment, datatype, or entity- relationship view.)
Definition: model_utils.cpp:921
int count(const T &value) const
ListViewType type() const
Returns the type this instance represents.
Definition: umllistviewitem.cpp:231
Definition: umllistviewitem.h:90
void append(const T &value)
Definition: umllistviewitem.h:77
Definition: icon_utils.h:45
QString & insert(int position, QChar ch)
void pop_front()
QString uniqObjectName(UMLObject::ObjectType type, UMLPackage *parentPkg, QString prefix)
Returns a name for the new object, appended with a number if the default name is taken e...
Definition: model_utils.cpp:461
Definition: widgetbase.h:49
Definition: basictypes.h:83
Definition: icon_utils.h:223
Definition: widgetbase.h:46
Definition: icon_utils.h:120
bool typeIsCanvasWidget(UMLListViewItem::ListViewType type)
Return true if the listview type also has a widget representation in diagrams.
Definition: model_utils.cpp:941
QStringList capturedTexts() const
bool isCommonDataType(QString type)
Return true if the given type is common among the majority of programming languages, such as "bool" or "boolean".
Definition: model_utils.cpp:550
bool isUnique(const QString &name)
Returns true if the given name is unique within its scope.
Definition: umldoc.cpp:974
Definition: icon_utils.h:84
Definition: icon_utils.h:76
bool typeIsContainer(UMLListViewItem::ListViewType type)
Return true if the listview type may act as a container for other objects, i.e.
Definition: model_utils.cpp:993
Definition: umlobject.h:70
bool isEmpty() const
Definition: icon_utils.h:207
QString trimmed() const
Definition: icon_utils.h:106
Definition: basictypes.h:60
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
virtual QStringList defaultDatatypes()
Return the default datatypes for your language (bool, int etc).
Definition: codegenerator.cpp:878
Definition: icon_utils.h:83
UMLListViewItem * rootView(UMLListViewItem::ListViewType type)
Returns the corresponding view if the listview type is one of the root views, Root/Logical/UseCase/Co...
Definition: umllistview.cpp:2613
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
Definition: umlobject.h:74
Definition: icon_utils.h:85
T & front()
T & first()
Definition: icon_utils.h:89
QTreeWidgetItem * currentItem() const
Definition: widgetbase.h:60
UMLObject * findUMLObjectRaw(const UMLObjectList &inList, const QString &name, UMLObject::ObjectType type, UMLObject *currentObj)
Find the UML object of the given type and name in the passed-in list.
Definition: model_utils.cpp:299
UMLListViewItem * findItem(Uml::ID::Type id)
Searches through the tree for the item with the given ID.
Definition: umllistview.cpp:1362
Definition: umlobject.h:75
Definition: umlobject.h:68
Definition: basictypes.h:40
Definition: basictypes.h:235
Definition: icon_utils.h:91
Definition: umlobject.h:73
Definition: model_utils.h:99
Definition: basictypes.h:81
UMLRole * getUMLRole(Uml::RoleType::Enum role) const
Get the underlying UMLRole object for the given role.
Definition: association.cpp:586
iterator end()
QString toLower() const
int stringToDirection(QString input, Uml::ParameterDirection::Enum &result)
Parse a direction string into the Uml::ParameterDirection::Enum.
Definition: model_utils.cpp:672
Definition: icon_utils.h:105
bool contains(QChar ch, Qt::CaseSensitivity cs) const
QString stereotype(bool includeAdornments=false) const
Returns the stereotype.
Definition: umlobject.cpp:579
Definition: basictypes.h:78
bool isCommonXMIAttribute(const QString &tag)
Return true if the given tag is one of the common XMI attributes, such as: "name" | "visibility" | "i...
Definition: model_utils.cpp:525
Definition: basictypes.h:57
UMLObject::ObjectType convert_LVT_OT(UMLListViewItem::ListViewType lvt)
Converts a list view type enum to the equivalent object type.
Definition: model_utils.cpp:1435
QString psText(Parse_Status value)
Returns the Parse_Status as a text.
Definition: model_utils.cpp:906
Uml::ModelType::Enum convert_LVT_MT(UMLListViewItem::ListViewType lvt)
Return the Model_Type which corresponds to the given ListViewType.
Definition: model_utils.cpp:1205
Parse_Status parseOperation(QString m, OpDescriptor &desc, UMLClassifier *owningScope)
Parses an operation given in UML syntax.
Definition: model_utils.cpp:816
UMLListViewItem * moveObject(Uml::ID::Type srcId, UMLListViewItem::ListViewType srcType, UMLListViewItem *newParent)
Moves an object given is unique ID and listview type to an other listview parent item.
Definition: umllistview.cpp:1597
QTreeWidgetItem * parent() const
Definition: umlobject.h:59
Definition: icon_utils.h:90
Definition: umlobject.h:76
Definition: umllistviewitem.h:45
void treeViewChangeIcon(UMLObject *object, Icon_Utils::IconType to)
Change an icon of an object in the tree view.
Definition: model_utils.cpp:351
Definition: umlobject.h:54
void setCurrentItem(QTreeWidgetItem *item)
Definition: umlobject.h:51
Definition: umlobject.h:64
Definition: umlobject.h:58
Definition: icon_utils.h:116
Parse_Status parseAttribute(QString a, NameAndType &nmTp, UMLClassifier *owningScope, Uml::Visibility::Enum *vis)
Parses an attribute given in UML syntax.
Definition: model_utils.cpp:741
UMLObject * findObjectInList(Uml::ID::Type id, const UMLObjectList &inList)
Seek the given id in the given list of objects.
Definition: model_utils.cpp:81
UMLPackage * umlPackage()
Returns the UMLPackage that this class is located in.
Definition: umlobject.cpp:639
QString mid(int position, int n) const
Parse_Status parseTemplate(QString t, NameAndType &nmTp, UMLClassifier *owningScope)
Parses a template parameter given in UML syntax.
Definition: model_utils.cpp:701
Definition: icon_utils.h:78
This class is used to set up information for a unique entity constraint.
Definition: uniqueconstraint.h:28
Definition: basictypes.h:77
Definition: basictypes.h:44
void treeViewSetCurrentItem(UMLObject *object)
Set the given object to the current item in the tree view.
Definition: model_utils.cpp:361
Definition: umlobject.h:57
This class contains the non-graphic representation of an association role.
Definition: umlrole.h:24
This sub-class adds copyInto and clone to the QList base class.
Definition: umlobjectlist.h:26
bool activeLanguageIsCaseSensitive()
Return true if the active language is case sensitive.
Definition: uml.cpp:2447
UMLPackage * treeViewGetPackageFromCurrent()
Return the UMLPackage if the current item in the tree view is a package.
Definition: model_utils.cpp:400
Definition: umlobject.h:50
typedef ConstIterator
void treeViewMoveObjectTo(UMLObject *container, UMLObject *object)
Move an object to a new container in the tree view.
Definition: model_utils.cpp:373
This class collects together all of the code documents which form this project, and generates code fo...
Definition: codegenerator.h:67
bool isPrimaryKey(UMLUniqueConstraint *uConstr) const
Checks if a given Unique Constraint is primary key of this entity.
Definition: entity.cpp:676
Definition: basictypes.h:39
UMLListViewItem * findUMLObject(const UMLObject *p) const
Find an UMLObject in the listview.
Definition: umllistview.cpp:1270
void changeIconOf(UMLObject *o, Icon_Utils::IconType to)
Changes the icon for the given UMLObject to the given icon.
Definition: umllistview.cpp:1284
int length() const
Definition: umllistviewitem.h:58
Definition: basictypes.h:233
QString left(int n) const
Definition: widgetbase.h:45
UMLListViewItem::ListViewType convert_DT_LVT(Uml::DiagramType::Enum dt)
Convert a diagram type enum to the equivalent list view type.
Definition: model_utils.cpp:1233
UMLPackage * rootPackage(UMLObject *obj)
Get the root folder of the given UMLObject.
Definition: model_utils.cpp:316
Uml::DiagramType::Enum convert_LVT_DT(UMLListViewItem::ListViewType lvt)
Return the DiagramType which corresponds to the given listview type.
Definition: model_utils.cpp:1683
Definition: umlobject.h:53
Definition: icon_utils.h:112
Definition: icon_utils.h:121
UMLTemplate * findTemplate(const QString &name)
Seeks the template parameter of the given name.
Definition: classifier.cpp:1145
Definition: widgetbase.h:61
Definition: icon_utils.h:51
QObject * parent() const
Uml::ModelType::Enum guessContainer(UMLObject *o)
Try to guess the correct container folder type of an UMLObject.
Definition: model_utils.cpp:594
Definition: basictypes.h:234
Definition: icon_utils.h:43
Definition: icon_utils.h:109
Definition: icon_utils.h:101
Definition: icon_utils.h:82
Definition: model_utils.h:95
Definition: icon_utils.h:87
Definition: icon_utils.h:47
QString text(int column) const
UMLListViewItem::ListViewType convert_OT_LVT(UMLObject *o)
Convert an object's type to the equivalent list view type.
Definition: model_utils.cpp:1290
UMLObject * findUMLObject(const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
Used to find a UMLObject by its type and name.
Definition: umldoc.cpp:825
iterator begin()
Definition: basictypes.h:42
Definition: basictypes.h:59
Definition: model_utils.h:95
Definition: umlobject.h:55
UMLObjectList containedObjects()
Returns the list of objects contained in this package.
Definition: package.cpp:230
Definition: umlobject.h:69
void append(const T &value)
This class contains the non-graphical information required for a UML Entity.
Definition: entity.h:34
Definition: icon_utils.h:81
Definition: widgetbase.h:72
Definition: umlobject.h:65
void clear()
Icon_Utils::IconType convert_LVT_IT(UMLListViewItem::ListViewType lvt, UMLObject *o)
Return the IconType which corresponds to the given listview type.
Definition: model_utils.cpp:1543
UMLListViewItem * createDiagramItem(UMLView *view)
Create a listview item for an existing diagram.
Definition: umllistview.cpp:1942
bool typeIsFolder(UMLListViewItem::ListViewType type)
Return true if the listview type is a logical, usecase or component folder.
Definition: model_utils.cpp:974
Enum fromInt(int item)
Convert a integer item into RoleType representation.
Definition: basictypes.cpp:745
bool hasNext() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.