umbrello/umbrello
#include <umlcanvasobject.h>
Signals | |
void | sigAssociationEndAdded (UMLAssociation *assoc) |
void | sigAssociationEndRemoved (UMLAssociation *assoc) |
Signals inherited from UMLObject | |
void | modified () |
Public Member Functions | |
UMLCanvasObject (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None) | |
virtual | ~UMLCanvasObject () |
bool | addAssociationEnd (UMLAssociation *assoc) |
int | associations () |
virtual void | copyInto (UMLObject *lhs) const |
virtual UMLObject * | findChildObject (const QString &n, UMLObject::ObjectType t=UMLObject::ot_UMLObject) |
virtual UMLObject * | findChildObjectById (Uml::ID::Type id, bool considerAncestors=false) |
UMLAssociationList | getAggregations () |
UMLAssociationList | getAssociations () |
UMLAssociationList | getCompositions () |
virtual UMLAssociationList | getRealizations () |
UMLAssociationList | getRelationships () |
UMLAssociationList | getSpecificAssocs (Uml::AssociationType::Enum assocType) |
UMLClassifierList | getSubClasses () |
UMLClassifierList | getSuperClasses () |
bool | hasAssociation (UMLAssociation *assoc) |
bool | operator== (const UMLCanvasObject &rhs) const |
void | removeAllAssociationEnds () |
virtual void | removeAllChildObjects () |
int | removeAssociationEnd (UMLAssociation *assoc) |
virtual bool | resolveRef () |
UMLObjectList | subordinates () const |
virtual QString | uniqChildName (const UMLObject::ObjectType type, const QString &prefix=QString()) |
Public Member Functions inherited from UMLObject | |
UMLObject (UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None) | |
UMLObject (UMLObject *parent) | |
UMLObject (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None) | |
virtual | ~UMLObject () |
virtual bool | acceptAssociationType (Uml::AssociationType::Enum) |
ObjectType | baseType () const |
QLatin1String | baseTypeStr () const |
virtual UMLObject * | clone () const =0 |
QString | doc () const |
virtual QString | fullyQualifiedName (const QString &separator=QString(), bool includeRoot=false) const |
bool | hasDoc () const |
virtual Uml::ID::Type | id () const |
bool | isAbstract () const |
bool | isStatic () const |
virtual bool | loadFromXMI (QDomElement &element) |
bool | loadStereotype (QDomElement &element) |
QString | name () const |
bool | operator== (const UMLObject &rhs) const |
QString | package (const QString &separator=QString(), bool includeRoot=false) |
UMLPackageList | packages (bool includeRoot=false) const |
QDomElement | save (const QString &tag, QDomDocument &qDoc) |
virtual void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement)=0 |
QString | secondaryFallback () const |
QString | secondaryId () const |
void | setAbstract (bool bAbstract) |
virtual void | setBaseType (ObjectType ot) |
void | setDoc (const QString &d) |
virtual void | setID (Uml::ID::Type NewID) |
void | setInPaste (bool bInPaste=true) |
virtual void | setName (const QString &strName) |
void | setNameCmd (const QString &strName) |
void | setPackage (const QString &_name) |
void | setSecondaryFallback (const QString &id) |
void | setSecondaryId (const QString &id) |
void | setStatic (bool bStatic) |
void | setStereotype (const QString &_name) |
void | setStereotypeCmd (const QString &_name) |
bool | setUMLPackage (UMLPackage *pPkg) |
void | setUMLStereotype (UMLStereotype *stereo) |
void | setVisibility (Uml::Visibility::Enum visibility) |
void | setVisibilityCmd (Uml::Visibility::Enum visibility) |
virtual bool | showPropertiesPagedDialog (int page=0, bool assoc=false) |
QString | stereotype (bool includeAdornments=false) const |
UMLPackage * | umlPackage () |
const UMLStereotype * | umlStereotype () |
Uml::Visibility::Enum | visibility () const |
Protected Attributes | |
UMLObjectList | m_List |
Protected Attributes inherited from UMLObject | |
bool | m_bAbstract |
ObjectType | m_BaseType |
bool | m_bCreationWasSignalled |
bool | m_bInPaste |
bool | m_bStatic |
QString | m_Doc |
QString | m_name |
Uml::ID::Type | m_nId |
UMLObject * | m_pSecondary |
UMLStereotype * | m_pStereotype |
UMLPackage * | m_pUMLPackage |
QString | m_SecondaryFallback |
QString | m_SecondaryId |
Uml::Visibility::Enum | m_visibility |
Additional Inherited Members | |
Public Types inherited from UMLObject | |
enum | ObjectType { ot_UMLObject = 100, ot_Actor, ot_UseCase, ot_Package, ot_Interface, ot_Datatype, ot_Enum, ot_Class, ot_Association, ot_Attribute, ot_Operation, ot_EnumLiteral, ot_Template, ot_Component, ot_Artifact, ot_Node, ot_Stereotype, ot_Role, ot_Entity, ot_EntityAttribute, ot_Folder, ot_EntityConstraint, ot_UniqueConstraint, ot_ForeignKeyConstraint, ot_CheckConstraint, ot_Category } |
Public Slots inherited from UMLObject | |
void | emitModified () |
Static Public Member Functions inherited from UMLObject | |
static QString | toString (ObjectType ot) |
Protected Member Functions inherited from UMLObject | |
void | init () |
virtual bool | load (QDomElement &element) |
void | maybeSignalObjectCreated () |
Detailed Description
This class contains the non-graphical information required for UMLObjects which appear as moveable widgets on the scene.
This class inherits from UMLObject which contains most of the information. It is not instantiated itself, it's just used as a super class for actual model objects.
Non-graphical information for a UMLCanvasObject.
- See also
- UMLObject Bugs and comments to umbre or llo- devel @kde .orghttp://bugs.kde.org
Definition at line 33 of file umlcanvasobject.h.
Constructor & Destructor Documentation
|
explicit |
Sets up a UMLCanvasObject.
- Parameters
-
name The name of the Concept. id The unique id of the Concept.
Definition at line 37 of file umlcanvasobject.cpp.
|
virtual |
Standard deconstructor.
Definition at line 45 of file umlcanvasobject.cpp.
Member Function Documentation
bool UMLCanvasObject::addAssociationEnd | ( | UMLAssociation * | assoc | ) |
Adds an association end to m_List.
- Parameters
-
assoc The association to add.
Definition at line 83 of file umlcanvasobject.cpp.
int UMLCanvasObject::associations | ( | ) |
Returns the number of associations for the CanvasObject.
This is the sum of the aggregations and compositions.
- Returns
- The number of associations for the Concept.
Definition at line 319 of file umlcanvasobject.cpp.
|
virtual |
Copy the internal presentation of this object into the new object.
Reimplemented from UMLObject.
Reimplemented in UMLClassifier, UMLCategory, UMLEntity, UMLPackage, and UMLEnum.
Definition at line 303 of file umlcanvasobject.cpp.
|
virtual |
Find a child object with the given name.
- Parameters
-
n The name of the object to find. t The type to find (optional.) If not given then any object type will match.
- Returns
- Pointer to the object found; NULL if none found.
Definition at line 240 of file umlcanvasobject.cpp.
|
virtual |
Find an association.
- Parameters
-
id The id of the object to find. considerAncestors boolean switch to consider ancestors while searching
- Returns
- Pointer to the object found (NULL if not found.)
Reimplemented in UMLClassifier.
Definition at line 266 of file umlcanvasobject.cpp.
UMLAssociationList UMLCanvasObject::getAggregations | ( | ) |
Shorthand for getSpecificAssocs(Uml::at_Aggregation)
- Returns
- The list of aggregations for the Concept.
Definition at line 421 of file umlcanvasobject.cpp.
UMLAssociationList UMLCanvasObject::getAssociations | ( | ) |
Return the list of associations for the CanvasObject.
- Returns
- The list of associations for the CanvasObject.
Definition at line 337 of file umlcanvasobject.cpp.
UMLAssociationList UMLCanvasObject::getCompositions | ( | ) |
Shorthand for getSpecificAssocs(Uml::at_Composition)
- Returns
- The list of compositions for the Concept.
Definition at line 431 of file umlcanvasobject.cpp.
|
virtual |
Shorthand for getSpecificAssocs(Uml::at_Realization)
- Returns
- The list of realizations for the Concept.
Definition at line 411 of file umlcanvasobject.cpp.
UMLAssociationList UMLCanvasObject::getRelationships | ( | ) |
Shorthand for getSpecificAssocs(Uml::at_Relationship)
- Returns
- The list of relationships for the entity.
Definition at line 441 of file umlcanvasobject.cpp.
UMLAssociationList UMLCanvasObject::getSpecificAssocs | ( | Uml::AssociationType::Enum | assocType | ) |
Return the subset of m_List that matches the given type.
- Parameters
-
assocType The AssociationType::Enum to match.
- Returns
- The list of associations that match assocType.
Definition at line 61 of file umlcanvasobject.cpp.
UMLClassifierList UMLCanvasObject::getSubClasses | ( | ) |
Return a list of the classes that inherit from this concept.
TODO: This overlaps with UMLClassifier::findSubClassConcepts(), see if we can merge the two.
- Returns
- The list of classes inheriting from the concept.
Definition at line 386 of file umlcanvasobject.cpp.
UMLClassifierList UMLCanvasObject::getSuperClasses | ( | ) |
Return a list of the superclasses of this concept.
TODO: This overlaps with UMLClassifier::findSuperClassConcepts(), see if we can merge the two.
- Returns
- The list of superclasses for the concept.
Definition at line 359 of file umlcanvasobject.cpp.
bool UMLCanvasObject::hasAssociation | ( | UMLAssociation * | assoc | ) |
Determine if this canvasobject has the given association.
- Parameters
-
assoc The association to check.
Definition at line 104 of file umlcanvasobject.cpp.
bool UMLCanvasObject::operator== | ( | const UMLCanvasObject & | rhs | ) | const |
Overloaded '==' operator.
Definition at line 282 of file umlcanvasobject.cpp.
void UMLCanvasObject::removeAllAssociationEnds | ( | ) |
Remove all association ends from the CanvasObject.
Definition at line 132 of file umlcanvasobject.cpp.
|
virtual |
Remove all child objects.
Just clear list, objects must be deleted where they were created (or we have bad crashes).
Definition at line 166 of file umlcanvasobject.cpp.
int UMLCanvasObject::removeAssociationEnd | ( | UMLAssociation * | assoc | ) |
Remove an association end from the CanvasObject.
- Parameters
-
assoc The association to remove.
Definition at line 117 of file umlcanvasobject.cpp.
|
virtual |
Reimplementation of UMLObject method.
Reimplemented from UMLObject.
Reimplemented in UMLClassifier, UMLEntity, and UMLPackage.
Definition at line 449 of file umlcanvasobject.cpp.
|
signal |
|
signal |
|
inline |
Definition at line 80 of file umlcanvasobject.h.
|
virtual |
Returns a name for the new association, operation, template or attribute appended with a number if the default name is taken e.g.
new_association, new_association_1 etc.
- Parameters
-
type The object type for which to make a name. prefix Optional prefix to use for the name. If not given then uniqChildName() will choose the prefix internally based on the object type.
- Returns
- Unique name string for the ObjectType given.
Definition at line 185 of file umlcanvasobject.cpp.
Member Data Documentation
|
protected |
List of all the associations in this object.
Inheriting classes add more types of objects that are possible in this list; for example, UMLClassifier adds operations, attributes, and templates.
- Todo:
- Only a pointer to the appropriate assocation end object (UMLRole) should be saved here, not the entire UMLAssociation.
Definition at line 99 of file umlcanvasobject.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.