umbrello/umbrello
object_factory.cpp
Go to the documentation of this file.
236 name = KInputDialog::getText(i18nc("UMLObject name", "Name"), i18n("Enter name:"), name, &ok, (QWidget*)UMLApp::app());
247 KMessageBox::error(0, i18n("This is a reserved keyword for the language of the configured code generator."),
288 UMLClassifierListItem* createChildObject(UMLClassifier* parent, UMLObject::ObjectType type, const QString& name)
Definition: umlobject.h:61
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
Definition: umlobject.h:63
UMLCheckConstraint * createCheckConstraint(const QString &name=QString())
Creates a Check Constraint for this Entity.
Definition: entity.cpp:254
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
UMLClassifierListItem * createChildObject(UMLClassifier *parent, UMLObject::ObjectType type, const QString &name)
Creates an operation, attribute, template, or enum literal for the parent classifier.
Definition: object_factory.cpp:288
Definition: cmd_createUMLObject.h:22
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
virtual void setType(UMLObject *type)
Sets the type of the UMLAttribute.
Definition: classifierlistitem.cpp:125
UMLUniqueConstraint * createUniqueConstraint(const QString &name=QString())
Creates a Unique Constraint for this Entity.
Definition: entity.cpp:151
Definition: umlobject.h:56
virtual UMLAttribute * createAttribute(const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
Creates an attribute for the class.
Definition: classifier.cpp:764
static bool tagEq(const QString &tag, const QString &pattern)
Function for comparing tags in XMI files.
Definition: umldoc.cpp:3081
This class contains the non-graphical information required for a UML Component.
Definition: component.h:27
virtual bool isReservedKeyword(const QString &keyword)
Check whether the given string is a reserved word for the language of this code generator.
Definition: codegenerator.cpp:891
Definition: umlobject.h:52
UMLOperation * createOperation(const QString &name=QString(), bool *isExistingOp=NULL, Model_Utils::NameAndType_List *params=NULL)
Creates an operation in the current document.
Definition: classifier.cpp:243
void setName(const QString &name)
Reimplementation of method from UMLObject is required as an extra signal, attributeChanged(), is emitted.
Definition: attribute.cpp:76
void setBaseType(UMLObject::ObjectType ot)
Reimplementation of method from class UMLObject for controlling the exact type of this classifier: cl...
Definition: classifier.cpp:82
UMLOperation * createOperation(UMLClassifier *parent, const QString &name)
Definition: object_factory.cpp:273
Definition: umlobject.h:72
Definition: umlobject.h:60
Definition: umlobject.h:62
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
UMLStereotype * findStereotypeById(Uml::ID::Type id)
Find a UMLStereotype by its unique ID.
Definition: umldoc.cpp:803
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: basictypes.h:104
This class contains the non-graphic representation of an association.
Definition: association.h:32
This class contains the non-graphical information required for a UML Node.
Definition: node.h:26
UMLObject * createNewUMLObject(UMLObject::ObjectType type, const QString &name, UMLPackage *parentPkg, bool undoable)
Creates a new UMLObject of the given type.
Definition: object_factory.cpp:91
void assignUniqueIdOnCreation(bool yesno)
Control whether the createUMLObject() solicits a new unique ID for the created object.
Definition: object_factory.cpp:65
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Creates a UMLObject of the given type.
Definition: object_factory.cpp:192
static QString toString(ObjectType ot)
Helper function for debug output.
Definition: umlobject.cpp:1079
bool isInterface() const
Returns true if this classifier represents an interface.
Definition: classifier.cpp:117
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
void executeCommand(QUndoCommand *cmd)
Execute a command and push it in the stack.
Definition: uml.cpp:3227
bool setUMLPackage(UMLPackage *pPkg)
Sets the UMLPackage in which this class is located.
Definition: umlobject.cpp:543
bool isUnique(const QString &name)
Returns true if the given name is unique within its scope.
Definition: umldoc.cpp:974
Definition: umlobject.h:70
bool isEmpty() const
Definition: umlobject.h:74
UMLAttribute * createAttribute(UMLObject *parent, const QString &name, UMLObject *type)
Definition: object_factory.cpp:263
Definition: umlobject.h:75
Definition: umlobject.h:68
Definition: umlobject.h:73
Definition: umlobject.h:59
Definition: umlobject.h:76
This class contains the non-graphical information required for a UML Enum.
Definition: enum.h:28
Definition: umlobject.h:54
Definition: umlobject.h:51
virtual UMLAttribute * createAttribute(const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
Create an UMLAttribute.
Definition: entity.cpp:100
Definition: umlobject.h:64
This class contains the non-graphical information required for a UML Artifact.
Definition: artifact.h:27
QString toString(Enum item)
Convert ModelType item into QString representation.
Definition: basictypes.cpp:39
Definition: umlobject.h:57
UMLObject * makeObjectFromXMI(const QString &xmiTag, const QString &stereoID)
Make a new UMLObject according to the given XMI tag.
Definition: object_factory.cpp:355
This class contains the non-graphical information required for a UML Category.
Definition: category.h:28
UMLObject * createTemplate(const QString &name=QString())
Create and add a just created template.
Definition: classifier.cpp:395
Definition: umlobject.h:50
This class collects together all of the code documents which form this project, and generates code fo...
Definition: codegenerator.h:67
This class contains the non-graphical information required for a UML UseCase.
Definition: usecase.h:24
int length() const
This class contains the non-graphical information required for a UML Actor.
Definition: actor.h:27
Definition: umlobject.h:53
virtual void setID(Uml::ID::Type NewID)
Assigns a new Id to the object.
Definition: umlobject.cpp:158
This class contains the non-graphical information required for a UML Port.
Definition: port.h:26
UMLObject * createEnumLiteral(const QString &name=QString())
Creates a literal for the enum.
Definition: enum.cpp:85
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
UMLForeignKeyConstraint * createForeignKeyConstraint(const QString &name=QString())
Creates a Foreign Key Constraint for this Entity.
Definition: entity.cpp:205
Definition: umlobject.h:55
Definition: umlobject.h:69
This class contains the non-graphical information required for a UML Entity.
Definition: entity.h:34
Definition: umlobject.h:65
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Return the predefined root folder of the given type.
Definition: umldoc.cpp:2721
void signalUMLObjectCreated(UMLObject *o)
Signal that a UMLObject has been created.
Definition: umldoc.cpp:1649
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.