umbrello/umbrello
#include <folder.h>
Public Member Functions | |
UMLFolder (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None) | |
virtual | ~UMLFolder () |
void | activateViews () |
void | addView (UMLView *view) |
void | appendViews (UMLViewList &viewList, bool includeNested=true) |
virtual UMLObject * | clone () const |
UMLView * | findView (Uml::ID::Type id) |
UMLView * | findView (Uml::DiagramType::Enum type, const QString &name, bool searchAllScopes=true) |
QString | folderFile () const |
QString | localName () const |
void | removeAllViews () |
void | removeView (UMLView *view) |
void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
void | setFolderFile (const QString &fileName) |
void | setLocalName (const QString &localName) |
void | setViewOptions (const Settings::OptionState &optionState) |
Public Member Functions inherited from UMLPackage | |
UMLPackage (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None) | |
virtual | ~UMLPackage () |
void | addAssocToConcepts (UMLAssociation *assoc) |
bool | addObject (UMLObject *pObject) |
void | appendClasses (UMLClassifierList &classes, bool includeNested=true) |
void | appendClassesAndInterfaces (UMLClassifierList &classifiers, bool includeNested=true) |
void | appendClassifiers (UMLClassifierList &classifiers, bool includeNested=true) |
void | appendEntities (UMLEntityList &entities, bool includeNested=true) |
void | appendInterfaces (UMLClassifierList &interfaces, bool includeNested=true) |
void | appendPackages (UMLPackageList &packages, bool includeNested=true) |
UMLObjectList | containedObjects () |
virtual void | copyInto (UMLObject *lhs) const |
UMLObject * | findObject (const QString &name) |
UMLObject * | findObjectById (Uml::ID::Type id) |
virtual void | removeAllObjects () |
void | removeAssocFromConcepts (UMLAssociation *assoc) |
void | removeObject (UMLObject *pObject) |
virtual bool | resolveRef () |
Public Member Functions inherited from UMLCanvasObject | |
UMLCanvasObject (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None) | |
virtual | ~UMLCanvasObject () |
bool | addAssociationEnd (UMLAssociation *assoc) |
int | associations () |
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) |
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 |
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) |
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 Member Functions | |
bool | load (QDomElement &element) |
bool | loadDiagramsFromXMI (QDomNode &diagrams) |
bool | loadFolderFile (const QString &path) |
void | save (QDomDocument &qDoc, QDomElement &qElement) |
void | saveContents (QDomDocument &qDoc, QDomElement &qElement) |
Protected Member Functions inherited from UMLObject | |
void | init () |
void | maybeSignalObjectCreated () |
Friends | |
QDebug | operator<< (QDebug out, const UMLFolder &item) |
Detailed Description
This class manages the UMLObjects and UMLViews of a Folder.
This class inherits from UMLPackage which contains most of the information.
The UMLDoc class allocates a fixed instance of this class for each of the predefined Logical, UseCase, Component, Deployment, and Entity-Relationship folders. Further instances are created on demand for user folders.
Non-graphical management of objects and diagrams of a Folder
TODO: This whole class needs a relook regarding view/scene.
Constructor & Destructor Documentation
|
explicit |
Sets up a Folder.
- Parameters
-
name The name of the Folder. id The unique id of the Folder. A new ID will be generated if this argument is left away.
Definition at line 37 of file folder.cpp.
|
virtual |
Empty destructor.
Definition at line 47 of file folder.cpp.
Member Function Documentation
void UMLFolder::activateViews | ( | ) |
Acivate the views in this folder.
"Activation": Some widgets require adjustments after loading from file, those are done here.
Definition at line 126 of file folder.cpp.
void UMLFolder::addView | ( | UMLView * | view | ) |
Add a view to the diagram list.
Definition at line 86 of file folder.cpp.
void UMLFolder::appendViews | ( | UMLViewList & | viewList, |
bool | includeNested = true |
||
) |
Append the views in this folder to the given diagram list.
- Parameters
-
viewList The UMLViewList to which to append the diagrams. includeNested Whether to include diagrams from nested folders (default: true.)
Definition at line 106 of file folder.cpp.
|
virtual |
Make a clone of this object.
Reimplemented from UMLPackage.
Definition at line 56 of file folder.cpp.
UMLView * UMLFolder::findView | ( | Uml::ID::Type | id | ) |
Seek a view of the given ID in this folder.
- Parameters
-
id ID of the view to find.
- Returns
- Pointer to the view if found, NULL if no view found.
Definition at line 152 of file folder.cpp.
UMLView * UMLFolder::findView | ( | Uml::DiagramType::Enum | type, |
const QString & | name, | ||
bool | searchAllScopes = true |
||
) |
Seek a view by the type and name given.
- Parameters
-
type The type of view to find. name The name of the view to find. searchAllScopes Search in all subfolders (default: true.)
- Returns
- Pointer to the view found, or NULL if not found.
Definition at line 181 of file folder.cpp.
QString UMLFolder::folderFile | ( | ) | const |
Get the folder file name for a separate submodel.
Definition at line 253 of file folder.cpp.
|
protectedvirtual |
Loads the UML:Component element.
Reimplemented from UMLPackage.
Definition at line 445 of file folder.cpp.
|
protected |
Auxiliary to load(): Load the diagrams from the "diagrams" in the <XMI.extension>
Definition at line 369 of file folder.cpp.
|
protected |
Folders in the listview can be marked such that their contents are saved to a separate file.
This method loads the separate folder file. CAVEAT: This is not XMI standard compliant. If standard compliance is an issue then avoid folder files.
- Parameters
-
path Fully qualified file name, i.e. absolute directory plus file name.
- Returns
- True for success.
Definition at line 404 of file folder.cpp.
QString UMLFolder::localName | ( | ) | const |
Return the localized name of this folder.
Only useful for the predefined root folders.
Definition at line 78 of file folder.cpp.
void UMLFolder::removeAllViews | ( | ) |
Remove all views in this folder.
Definition at line 219 of file folder.cpp.
void UMLFolder::removeView | ( | UMLView * | view | ) |
Remove a view from the diagram list.
Definition at line 94 of file folder.cpp.
|
protected |
Auxiliary to saveToXMI(): Creates a <UML:Model> element when saving a predefined modelview, or a <UML:Package> element when saving a user created folder.
Invokes saveContents() with the newly created element.
Definition at line 298 of file folder.cpp.
|
protected |
Auxiliary to saveToXMI(): Save the contained objects and diagrams.
Can be used regardless of whether saving to the main model file or to an external folder file (see m_folderFile.)
Definition at line 263 of file folder.cpp.
|
virtual |
Creates a UML:Model or UML:Package element: UML:Model is created for the predefined fixed folders, UML:Package with stereotype "folder" is created for all else.
Reimplemented from UMLPackage.
Definition at line 316 of file folder.cpp.
void UMLFolder::setFolderFile | ( | const QString & | fileName | ) |
Set the folder file name for a separate submodel.
Definition at line 245 of file folder.cpp.
void UMLFolder::setLocalName | ( | const QString & | localName | ) |
Set the localized name of this folder.
This is set for the predefined root views (Logical, UseCase, Component, Deployment, EntityRelationship, and the Datatypes folder inside the Logical View.)
Definition at line 69 of file folder.cpp.
void UMLFolder::setViewOptions | ( | const Settings::OptionState & | optionState | ) |
Set the options for the views in this folder.
Definition at line 208 of file folder.cpp.
Friends And Related Function Documentation
|
friend |
Overloading operator for debugging output.
Definition at line 533 of file folder.cpp.
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.