UMLFolder Class Reference
This class manages the UMLObjects and UMLViews of a Folder. Non-graphical management of objects and diagrams of a Folder. More...
#include <folder.h>
Inheritance diagram for UMLFolder:

Public Member Functions | |
| UMLFolder (const QString &name="", Uml::IDType id=Uml::id_None) | |
| Sets up a Folder. | |
| virtual | ~UMLFolder () |
| Empty deconstructor. | |
| virtual void | init () |
| Initializes key variables of the class. | |
| virtual UMLObject * | clone () const |
| Make a clone of this object. | |
| void | setLocalName (const QString &localName) |
| Set the localized name of this folder. | |
| QString | getLocalName () |
| Return the localized name of this folder. | |
| void | addView (UMLView *view) |
| Add a view to the diagram list. | |
| void | removeView (UMLView *view) |
| Remove a view from the diagram list. | |
| void | appendViews (UMLViewList &viewList, bool includeNested=true) |
| Append the views in this folder to the given diagram list. | |
| void | activateViews () |
| Acivate the views in this folder. | |
| UMLView * | findView (Uml::IDType id) |
| Seek a view of the given ID in this folder. | |
| UMLView * | findView (Uml::Diagram_Type type, const QString &name, bool searchAllScopes=true) |
| Seek a view by the type and name given. | |
| void | setViewOptions (const Settings::OptionState &optionState) |
| Set the options for the views in this folder. | |
| void | removeAllViews () |
| Remove all views in this folder. | |
| void | setFolderFile (const QString &fileName) |
| Set the folder file name for a separate submodel. | |
| QString | getFolderFile () |
| Get the folder file name for a separate submodel. | |
| void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
| 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. | |
Protected Member Functions | |
| void | saveContents (QDomDocument &qDoc, QDomElement &qElement) |
| Auxiliary to saveToXMI(): Save the contained objects and diagrams. | |
| void | save (QDomDocument &qDoc, QDomElement &qElement) |
| Auxiliary to saveToXMI(): Creates a <UML:Model> element when saving a predefined modelview, or a <UML:Package> element when saving a user created folder. | |
| bool | loadDiagramsFromXMI (QDomNode &diagrams) |
| Auxiliary to load(): Load the diagrams from the <diagrams> in the <XMI.extension>. | |
| bool | loadFolderFile (const QString &path) |
| Folders in the listview can be marked such that their contents are saved to a separate file. | |
| bool | load (QDomElement &element) |
| Loads the UML:Component element. | |
Detailed Description
This class manages the UMLObjects and UMLViews of a Folder. Non-graphical management of objects and diagrams 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.
- Author:
- Oliver Kellogg Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
Definition at line 34 of file folder.h.
Constructor & Destructor Documentation
|
||||||||||||
|
Sets up a Folder.
Definition at line 28 of file folder.cpp. References init(). Referenced by clone(). |
|
|
Empty deconstructor.
Definition at line 33 of file folder.cpp. |
Member Function Documentation
|
|
Initializes key variables of the class.
Reimplemented from UMLPackage. Definition at line 36 of file folder.cpp. References UMLObject::setStereotype(). Referenced by UMLFolder(). |
|
|
Make a clone of this object.
Reimplemented from UMLPackage. Definition at line 42 of file folder.cpp. References clone(), UMLObject::copyInto(), and UMLFolder(). Referenced by clone(). |
|
|
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 48 of file folder.cpp. Referenced by UMLDoc::closeDocument(), and UMLDoc::init(). |
|
|
Return the localized name of this folder. Only useful for the predefined root folders. Definition at line 52 of file folder.cpp. Referenced by UMLListView::init(). |
|
|
Add a view to the diagram list.
Definition at line 56 of file folder.cpp. Referenced by UMLDoc::addView(). |
|
|
Remove a view from the diagram list.
Definition at line 60 of file folder.cpp. Referenced by UMLDoc::removeView(). |
|
||||||||||||
|
Append the views in this folder to the given diagram list.
Definition at line 65 of file folder.cpp. References UMLObject::getBaseType(). Referenced by UMLDoc::getViewIterator(), and UMLDoc::removeView(). |
|
|
Acivate the views in this folder. "Activation": Some widgets require adjustments after loading from file, those are done here. Definition at line 80 of file folder.cpp. References UMLView::activateAfterLoad(), UMLListView::createDiagramItem(), UMLListView::findItem(), UMLObject::getBaseType(), UMLView::getID(), and UMLApp::getListView(). Referenced by UMLDoc::activateAllViews(). |
|
|
Seek a view of the given ID in this folder.
Definition at line 104 of file folder.cpp. References UMLObject::getBaseType(), and UMLView::getID(). Referenced by UMLDoc::findView(), and findView(). |
|
||||||||||||||||
|
Seek a view by the type and name given.
Definition at line 122 of file folder.cpp. References findView(), UMLObject::getBaseType(), UMLView::getName(), and UMLView::getType(). |
|
|
Set the options for the views in this folder.
Definition at line 142 of file folder.cpp. References UMLView::setOptionState(). Referenced by UMLDoc::settingsChanged(). |
|
|
Remove all views in this folder.
Definition at line 149 of file folder.cpp. References UMLObject::getBaseType(), UMLApp::getDocument(), UMLView::removeAllAssociations(), and UMLDoc::removeView(). Referenced by UMLDoc::removeAllViews(). |
|
|
Set the folder file name for a separate submodel.
Definition at line 169 of file folder.cpp. Referenced by UMLListView::popupMenuSel(). |
|
|
Get the folder file name for a separate submodel.
Definition at line 173 of file folder.cpp. Referenced by UMLView::isSavedInSeparateFile(), UMLListViewItem::saveToXMI(), and UMLListView::slotObjectCreated(). |
|
||||||||||||
|
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 212 of file folder.cpp. References UMLApp::getDocument(), UMLObject::getFullyQualifiedName(), UMLObject::getID(), UMLObject::save(), save(), saveContents(), and UMLDoc::URL(). Referenced by UMLDoc::saveToXMI(). |
|
||||||||||||
|
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 177 of file folder.cpp. References UMLView::saveToXMI(), and UMLObject::saveToXMI(). Referenced by save(), and saveToXMI(). |
|
||||||||||||
|
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 201 of file folder.cpp. References UMLApp::getDocument(), UMLDoc::rootFolderType(), UMLObject::save(), and saveContents(). Referenced by saveToXMI(). |
|
|
Auxiliary to load(): Load the diagrams from the <diagrams> in the <XMI.extension>.
Definition at line 261 of file folder.cpp. References UMLDoc::addView(), UMLApp::getDocument(), UMLView::loadFromXMI(), and UMLView::setOptionState(). Referenced by load(). |
|
|
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.
Definition at line 286 of file folder.cpp. References load(). Referenced by load(). |
|
|
Loads the UML:Component element.
Reimplemented from UMLPackage. Definition at line 325 of file folder.cpp. References UMLDoc::findObjectById(), UMLDoc::getDatatypeFolder(), UMLApp::getDocument(), UMLDoc::getRootFolder(), loadDiagramsFromXMI(), loadFolderFile(), UMLObject::loadFromXMI(), UMLPackage::removeObject(), UMLObject::setUMLPackage(), and UMLDoc::URL(). Referenced by loadFolderFile(). |
The documentation for this class was generated from the following files:
