umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
Classes | |
struct | NameAndType |
struct | OpDescriptor |
Typedefs | |
typedef QLinkedList< NameAndType > | NameAndType_List |
Auxiliary type for OpDescriptor. More... | |
typedef QLinkedList< NameAndType >::iterator | NameAndType_ListIt |
Auxiliary type for OpDescriptor. More... | |
Enumerations | |
enum | Parse_Status { PS_OK , PS_Empty , PS_Malformed_Arg , PS_Unknown_ArgType , PS_Illegal_MethodName , PS_Unknown_ReturnType , PS_Unspecified_Error } |
General purpose model utilities.
typedef QLinkedList<NameAndType> Model_Utils::NameAndType_List |
Auxiliary type for OpDescriptor.
typedef QLinkedList<NameAndType>::iterator Model_Utils::NameAndType_ListIt |
Auxiliary type for OpDescriptor.
Enumerator | |
---|---|
PS_OK | Return type of parseOperation(). |
PS_Empty | |
PS_Malformed_Arg | |
PS_Unknown_ArgType | |
PS_Illegal_MethodName | |
PS_Unknown_ReturnType | |
PS_Unspecified_Error |
UMLListViewItem::ListViewType Model_Utils::convert_DT_LVT | ( | Uml::DiagramType::Enum | dt | ) |
Convert a diagram type enum to the equivalent list view type.
Uml::ModelType::Enum Model_Utils::convert_DT_MT | ( | Uml::DiagramType::Enum | dt | ) |
Return the Model_Type which corresponds to the given DiagramType.
Uml::DiagramType::Enum Model_Utils::convert_LVT_DT | ( | UMLListViewItem::ListViewType | lvt | ) |
Return the DiagramType which corresponds to the given listview type.
lvt | ListViewType to convert. |
Icon_Utils::IconType Model_Utils::convert_LVT_IT | ( | UMLListViewItem::ListViewType | lvt, |
UMLObject * | o | ||
) |
Return the IconType which corresponds to the given listview type.
lvt | ListViewType to convert. |
o | Optional UMLObject pointer is only used if lvt is lvt_Class: If the stereotype <<class-or-package>> is applied on the object then Icon_Utils::it_ClassOrPackage is returned. |
Uml::ModelType::Enum Model_Utils::convert_LVT_MT | ( | UMLListViewItem::ListViewType | lvt | ) |
Return the Model_Type which corresponds to the given ListViewType. Returns Uml::N_MODELTYPES if the list view type given does not map to a Model_Type.
UMLObject::ObjectType Model_Utils::convert_LVT_OT | ( | UMLListViewItem::ListViewType | lvt | ) |
Converts a list view type enum to the equivalent object type.
lvt | The ListViewType to convert. |
MultiPageDialogBase::PageType Model_Utils::convert_LVT_PT | ( | UMLListViewItem::ListViewType | type | ) |
Converts a list view type enum to the equivalent settings dialog type.
type | The ListViewType to convert. |
UMLListViewItem::ListViewType Model_Utils::convert_MT_LVT | ( | Uml::ModelType::Enum | mt | ) |
Return the ListViewType which corresponds to the given Model_Type.
UMLListViewItem::ListViewType Model_Utils::convert_OT_LVT | ( | UMLObject * | o | ) |
Convert an object's type to the equivalent list view type
o | Pointer to the UMLObject whose type shall be converted to the equivalent ListViewType. We cannot just pass in a UMLObject::ObjectType because a UMLFolder is mapped to different ListViewType values, depending on its location in one of the predefined modelviews (Logical/ UseCase/etc.) |
Uml::ModelType::Enum Model_Utils::convert_OT_MT | ( | UMLObject::ObjectType | ot | ) |
Return the Model_Type which corresponds to the given ObjectType.
UMLObject * Model_Utils::findObjectInList | ( | Uml::ID::Type | id, |
const UMLObjectList & | inList | ||
) |
Seek the given id in the given list of objects. Each list element may itself contain other objects and the search is done recursively.
id | The unique ID to seek. |
inList | The UMLObjectList in which to search. |
UMLObject * Model_Utils::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.
inList | List in which to seek the object. |
inName | Name of the object to find. |
type | ObjectType of the object to find (optional.) When the given type is ot_UMLObject the type is disregarded, i.e. the given name is the only search criterion. |
currentObj | Object relative to which to search (optional.) If given then the enclosing scope(s) of this object are searched before the global scope. |
UMLObject * Model_Utils::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. This method searches for the raw name.
inList | List in which to seek the object. |
name | Name of the object to find. |
type | ObjectType of the object to find (optional.) When the given type is ot_UMLObject the type is disregarded, i.e. the given name is the only search criterion. |
currentObj | Object relative to which to search (optional.) If given then the enclosing scope(s) of this object are searched before the global scope. |
UMLObject * Model_Utils::findUMLObjectRecursive | ( | const UMLObjectList & | inList, |
const QString & | name, | ||
UMLObject::ObjectType | type | ||
) |
Find the UML object of the given type and name in the passed-in list. This method searches for the raw name.
inList | List in which to seek the object. |
name | Name of the object to find. |
type | ObjectType of the object to find (optional.) When the given type is ot_UMLObject the type is disregarded, i.e. the given name is the only search criterion. |
QString Model_Utils::getXmiId | ( | QDomElement | element | ) |
Return the xmi.id (XMI-1) or xmi:id (XMI-2) of a QDomElement.
Uml::ModelType::Enum Model_Utils::guessContainer | ( | UMLObject * | o | ) |
Try to guess the correct container folder type of a UMLObject. Object types that can't be guessed are mapped to Uml::ModelType::Logical. NOTE: This function exists mainly for handling pre-1.5.5 files and should not be used for new code.
bool Model_Utils::hasAssociations | ( | UMLObject::ObjectType | type | ) |
return true if given object type supports associations
type | uml object type to check |
bool Model_Utils::isClassifierListitem | ( | UMLObject::ObjectType | type | ) |
Return true if the given object type is a classifier list item type.
bool Model_Utils::isCloneable | ( | WidgetBase::WidgetType | type | ) |
Determines whether the given widget type is cloneable.
type | The input WidgetType. |
bool Model_Utils::isCommonDataType | ( | QString | type | ) |
Return true if the given type is common among the majority of programming languages, such as "bool" or "boolean".
bool Model_Utils::isCommonXMI1Attribute | ( | const QString & | tag | ) |
Return true if the given tag is one of the common XMI attributes, such as: "name" | "visibility" | "isRoot" | "isLeaf" | "isAbstract" | "isActive" | "ownerScope"
QString Model_Utils::newText | ( | UMLObject::ObjectType | type | ) |
Returns translated text string used by uml object related dialogs
type | uml object type |
QString Model_Utils::newTitle | ( | UMLObject::ObjectType | type | ) |
Returns translated title string used by uml object related dialogs
type | uml object type |
QString Model_Utils::normalize | ( | QString | type | ) |
Normalize a type name with respect to interspersed spaces.
type | Input type name e.g. from a user text entry dialog. |
Parse_Status Model_Utils::parseAttribute | ( | QString | a, |
NameAndType & | nmTp, | ||
UMLClassifier * | owningScope, | ||
Uml::Visibility::Enum * | vis | ||
) |
Parses an attribute given in UML syntax.
a | Input text of the attribute in UML syntax. Example: argname : argtype |
nmTp | NameAndType returned by this method. |
owningScope | Pointer to the owning scope of the attribute. |
vis | Optional pointer to visibility (return value.) The visibility may be given at the beginning of the attribute text in mnemonic form as follows: "+" stands for public "#" stands for protected "-" stands for private "~" stands for implementation level visibility |
Parse_Status Model_Utils::parseConstraint | ( | QString | m, |
QString & | name, | ||
UMLEntity * | owningScope | ||
) |
Parses a constraint.
m | Input text of the constraint |
name | The name returned by this method |
owningScope | Pointer to the owning scope of the constraint |
Parse_Status Model_Utils::parseOperation | ( | QString | m, |
OpDescriptor & | desc, | ||
UMLClassifier * | owningScope | ||
) |
Parses an operation given in UML syntax.
m | Input text of the operation in UML syntax. Example of a two-argument operation returning "void": methodname (arg1name : arg1type, arg2name : arg2type) : void |
desc | OpDescriptor returned by this method. |
owningScope | Pointer to the owning scope of the operation. |
The search pattern includes everything up to the opening parenthesis because UML also permits non programming-language oriented designs using narrative names, for example "check water temperature".
Parse_Status Model_Utils::parseTemplate | ( | QString | t, |
NameAndType & | nmTp, | ||
UMLClassifier * | owningScope | ||
) |
Parses a template parameter given in UML syntax.
t | Input text of the template parameter. Example: parname : partype or just: parname (for class type) |
nmTp | NameAndType returned by this method. |
owningScope | Pointer to the owning scope of the template param. |
QString Model_Utils::psText | ( | Parse_Status | value | ) |
Returns the Parse_Status as a text.
QString Model_Utils::renameText | ( | UMLObject::ObjectType | type | ) |
Returns translated text string used by uml object related dialogs
type | uml object type |
QString Model_Utils::renameTitle | ( | UMLObject::ObjectType | type | ) |
Returns translated title string used by uml object related dialogs
type | uml object type |
UMLPackage * Model_Utils::rootPackage | ( | UMLObject * | obj | ) |
int Model_Utils::stringToDirection | ( | QString | input, |
Uml::ParameterDirection::Enum & | result | ||
) |
Parse a direction string into the Uml::ParameterDirection::Enum.
input | The string to parse: "in", "out", or "inout" optionally followed by whitespace. |
result | The corresponding Uml::ParameterDirection::Enum. |
void Model_Utils::treeViewAddViews | ( | const UMLViewList & | viewList | ) |
Add the given list of views to the tree view.
viewList | the list of views to add |
QString Model_Utils::treeViewBuildDiagramName | ( | Uml::ID::Type | id | ) |
Build the diagram name from the tree view.
The function returns a relative path constructed from the folder hierarchy.
id | the id of the diaram |
void Model_Utils::treeViewChangeIcon | ( | UMLObject * | object, |
Icon_Utils::IconType | to | ||
) |
Change an icon of an object in the tree view.
object | the object in the treeViewAddViews |
to | the new icon type for the given object |
UMLObject * Model_Utils::treeViewGetCurrentObject | ( | ) |
Return the current UMLObject from the tree view.
UMLPackage * Model_Utils::treeViewGetPackageFromCurrent | ( | ) |
Return the UMLPackage if the current item in the tree view is a package. Return the closest package in the tree view or NULL otherwise
Move an object to a new container in the tree view.
container | the new container for the object |
object | the to be moved object |
void Model_Utils::treeViewSetCurrentItem | ( | UMLObject * | object | ) |
Set the given object to the current item in the tree view.
object | the object which will be the current item |
Return true if the object type is allowed in the related diagram
o | UML object instance |
scene | diagram instance |
Return true if the widget type is allowed in the related diagram
w | UML widget object |
scene | diagram instance |
bool Model_Utils::typeIsAllowedInType | ( | UMLListViewItem::ListViewType | childType, |
UMLListViewItem::ListViewType | parentType | ||
) |
Check if a listviewitem of type childType is allowed as child of type parentType
bool Model_Utils::typeIsCanvasWidget | ( | UMLListViewItem::ListViewType | type | ) |
Return true if the listview type also has a widget representation in diagrams.
bool Model_Utils::typeIsClassifier | ( | UMLListViewItem::ListViewType | type | ) |
Return true if the listview type is a classifier (Class, Entity, Enum)
bool Model_Utils::typeIsClassifierList | ( | UMLListViewItem::ListViewType | type | ) |
Return true if the listview type is an attribute, operation, or template.
bool Model_Utils::typeIsContainer | ( | UMLListViewItem::ListViewType | type | ) |
Return true if the listview type may act as a container for other objects, i.e. if it is a folder, package, subsystem, or component.
bool Model_Utils::typeIsDiagram | ( | UMLListViewItem::ListViewType | type | ) |
Return true if the listview type is a diagram.
bool Model_Utils::typeIsFolder | ( | UMLListViewItem::ListViewType | type | ) |
Return true if the listview type is a logical, usecase or component folder.
bool Model_Utils::typeIsProperties | ( | UMLListViewItem::ListViewType | type | ) |
Return true if the listview type is a settings entry.
bool Model_Utils::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.)
QString Model_Utils::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.g. new_actor, new_actor_1 etc.
type | The object type. |
parentPkg | The package in which to compare the name. |
prefix | The prefix to use (optional) If no prefix is given then a type related prefix will be chosen internally. |
QString Model_Utils::updateDeleteActionToString | ( | UMLForeignKeyConstraint::UpdateDeleteAction | uda | ) |
Converts from the UpdateDeleteAction enum to a QString
uda | The UpdateDeleteAction enum literal |