umbrello/umbrello
umlobject.cpp
Go to the documentation of this file.
124 QPointer<ClassPropertiesDialog> dlg = new ClassPropertiesDialog((QWidget*)UMLApp::app(), this, assoc);
734 m_pSecondary = Object_Factory::createUMLObject(ot_Datatype, QLatin1String("undef"), datatypes, false);
1009 QString ownerScope = element.attribute(QLatin1String("ownerScope"), QLatin1String("instance"));
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
UMLPackageList packages(bool includeRoot=false) const
Return a list of the packages in which this class is embedded.
Definition: umlobject.cpp:621
virtual void copyInto(UMLObject *lhs) const
Copy the internal presentation of this object into the new object.
Definition: umlobject.cpp:288
Definition: umlobject.h:61
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
Definition: umlobject.h:63
QString & append(QChar ch)
virtual bool showPropertiesPagedDialog(int page=0, bool assoc=false)
This method is called if you wish to see the properties of a UMLObject.
Definition: umlobject.cpp:119
void setUMLStereotype(UMLStereotype *stereo)
Sets the class' UMLStereotype.
Definition: umlobject.cpp:466
bool newUMLObjectWasCreated()
Returns whether the last createUMLObject() actually created a new object or just returned an existing...
Definition: import_utils.cpp:113
virtual bool loadFromXMI(QDomElement &element)
This method loads the generic parts of the XMI common to most model classes.
Definition: umlobject.cpp:912
void incrRefCount()
Increments the reference count for this stereotype.
Definition: stereotype.cpp:122
Definition: umlobject.h:67
Uml::Visibility::Enum visibility() const
Returns the visibility of the object.
Definition: umlobject.cpp:431
QString attribute(const QString &name, const QString &defValue) const
void decrRefCount()
Decrements the reference count for this stereotype.
Definition: stereotype.cpp:130
static bool tagEq(const QString &tag, const QString &pattern)
Function for comparing tags in XMI files.
Definition: umldoc.cpp:3081
void showDocumentation(UMLObject *object, bool overwrite=false)
Called when a widget wishes to display its documentation in the doc window.
Definition: docwindow.cpp:88
void setVisibility(Uml::Visibility::Enum visibility)
Sets the visibility of the object.
Definition: umlobject.cpp:441
void setNameCmd(const QString &strName)
Method used by setName: it is called by cmdSetName, Don't use it!
Definition: umlobject.cpp:177
void removeFirst()
Definition: cmd_renameUMLObject.h:20
QDebug & nospace()
void updateDocumentation(bool clear=false, bool startup=false)
Call when you wish move changes in the doc window back into the members documentation.
Definition: docwindow.cpp:230
bool loadStereotype(QDomElement &element)
Analyzes the given QDomElement for a reference to a stereotype.
Definition: umlobject.cpp:873
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
Definition: cmd_setStereotype.h:18
Definition: basictypes.h:58
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &inName, UMLPackage *parentPkg, const QString &comment, const QString &stereotype, bool searchInParentPackageOnly)
Find or create a document object.
Definition: import_utils.cpp:170
QDomNode nextSibling() const
void clear()
#define ENUM_NAME(o, e, v)
In a Q_OBJECT class define any enum as Q_ENUMS.
Definition: debug_utils.h:125
QDomElement toElement() const
void removeStereotype(UMLStereotype *s)
Remove a UMLStereotype from the application.
Definition: umldoc.cpp:937
QString getXmiId(QDomElement element)
Return the xmi.id (XMI-1) or xmi:id (XMI-2) of a QDomElement.
Definition: model_utils.cpp:511
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Creates a UMLObject of the given type.
Definition: object_factory.cpp:192
virtual bool acceptAssociationType(Uml::AssociationType::Enum)
This should be reimplemented by subclasses if they wish to accept certain types of associations...
Definition: umlobject.cpp:148
Definition: docwindow.h:28
static QString toString(ObjectType ot)
Helper function for debug output.
Definition: umlobject.cpp:1079
ListViewType type() const
Returns the type this instance represents.
Definition: umllistviewitem.cpp:231
QString fromUtf8(const char *str, int size)
virtual bool resolveRef()
Resolve referenced objects (if any.) Needs to be called after all UML objects are loaded from file...
Definition: umlobject.cpp:707
QString text() const
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
bool hasAttribute(const QString &name) const
Definition: classpropertiesdialog.h:34
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
void setAttribute(const QString &name, const QString &value)
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
int toInt(bool *ok, int base) const
void setObjectName(const QString &name)
Definition: umlobject.h:70
bool isEmpty() const
Definition: basictypes.h:60
UMLObject(UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None)
Creates a UMLObject.
Definition: umlobject.cpp:48
void setVisibilityCmd(Uml::Visibility::Enum visibility)
Method used by setVisibility: it is called by cmdSetVisibility, Don't use it!
Definition: umlobject.cpp:451
QString activeLanguageScopeSeparator()
Return the target language depedent scope separator.
Definition: uml.cpp:2459
QString m_SecondaryFallback
Last-chance backup for when m_SecondaryId is not found.
Definition: umlobject.h:189
void maybeSignalObjectCreated()
Calls UMLDoc::signalUMLObjectCreated() if m_BaseType affords doing so.
Definition: umlobject.cpp:684
QString toString(Enum item, bool mnemonic)
Convert Visibility item into QString representation.
Definition: basictypes.cpp:99
void setModified(bool modified=true)
Sets the modified flag for the document after a modifying action on the view connected to the documen...
Definition: umldoc.cpp:2652
bool hasChildNodes() const
Definition: umlobject.h:73
bool contains(QChar ch, Qt::CaseSensitivity cs) const
QDebug operator<<(QDebug out, const UMLObject &obj)
Print UML Object to debug output stream, so it can be used like uDebug() << "This object shouldn't be...
Definition: umlobject.cpp:1088
QString stereotype(bool includeAdornments=false) const
Returns the stereotype.
Definition: umlobject.cpp:579
QDebug & space()
Definition: basictypes.h:57
QTreeWidgetItem * parent() const
Definition: umlobject.h:59
bool isNull() const
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:782
bool isStatic() const
Returns true if this UMLObject has classifier scope, otherwise false (the default).
Definition: umlobject.cpp:331
Definition: umlobject.h:58
QDomElement save(const QString &tag, QDomDocument &qDoc)
Auxiliary to saveToXMI.
Definition: umlobject.cpp:806
QDomNode firstChild() const
UMLPackage * umlPackage()
Returns the UMLPackage that this class is located in.
Definition: umlobject.cpp:639
UMLStereotype * findOrCreateStereotype(const QString &name)
Finds or creates a stereotype for the parent object.
Definition: umldoc.cpp:1056
void setSecondaryFallback(const QString &id)
Set the secondary ID fallback.
Definition: umlobject.cpp:675
Definition: basictypes.h:44
Definition: umlobject.h:57
bool isComment() const
QString package(const QString &separator=QString(), bool includeRoot=false)
Return the package(s) in which this UMLObject is contained as a text.
Definition: umlobject.cpp:601
Definition: umlobject.h:50
int length() const
QString left(int n) const
Uml::ID::Type modelID() const
Return the m_modelID (currently this a fixed value: Umbrello supports only a single document...
Definition: umldoc.cpp:1680
void prepend(const T &value)
Definition: umlobject.h:66
int refCount() const
Returns the reference count for this stereotype.
Definition: stereotype.cpp:138
QString tagName() const
Definition: umlobject.h:53
virtual void setID(Uml::ID::Type NewID)
Assigns a new Id to the object.
Definition: umlobject.cpp:158
QDomElement createElement(const QString &tagName)
QString m_SecondaryId
xmi.id of the secondary object for intermediate use during loading.
Definition: umlobject.h:186
Definition: cmd_setVisibility.h:18
QObject * parent() const
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Returns the fully qualified name, i.e.
Definition: umlobject.cpp:202
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
void modified()
Definition: basictypes.h:59
void setStereotype(const QString &_name)
Sets the classes stereotype name.
Definition: umlobject.cpp:492
Definition: umlobject.h:55
const UMLStereotype * umlStereotype()
Returns the classes UMLStereotype object.
Definition: umlobject.cpp:571
Definition: umlobject.h:69
UMLObject * m_pSecondary
pointer to an associated object Only a few of the classes inheriting from UMLObject use this...
Definition: umlobject.h:182
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.