• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdesdk
  • Sitemap
  • Contact Us
 

umbrello/umbrello

UMLFolder Class Reference

#include <folder.h>

Inheritance diagram for UMLFolder:

Inheritance graph
[legend]

List of all members.


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

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.


Public Member Functions

 UMLFolder (const QString &name=QString(), Uml::IDType id=Uml::id_None)
virtual ~UMLFolder ()
virtual void init ()
virtual UMLObject * clone () const
void setLocalName (const QString &localName)
QString getLocalName ()
void addView (UMLView *view)
void removeView (UMLView *view)
void appendViews (UMLViewList &viewList, bool includeNested=true)
void activateViews ()
UMLView * findView (Uml::IDType id)
UMLView * findView (Uml::Diagram_Type type, const QString &name, bool searchAllScopes=true)
void setViewOptions (const Settings::OptionState &optionState)
void removeAllViews ()
void setFolderFile (const QString &fileName)
QString getFolderFile ()
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)

Protected Member Functions

void saveContents (QDomDocument &qDoc, QDomElement &qElement)
void save (QDomDocument &qDoc, QDomElement &qElement)
bool loadDiagramsFromXMI (QDomNode &diagrams)
bool loadFolderFile (const QString &path)
bool load (QDomElement &element)

Constructor & Destructor Documentation

UMLFolder::UMLFolder ( const QString &  name = QString(),
Uml::IDType  id = Uml::id_None 
) [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 28 of file folder.cpp.

UMLFolder::~UMLFolder (  )  [virtual]

Empty deconstructor.

Definition at line 33 of file folder.cpp.


Member Function Documentation

void UMLFolder::init (  )  [virtual]

Initializes key variables of the class.

Reimplemented from UMLCanvasObject.

Definition at line 40 of file folder.cpp.

UMLObject * UMLFolder::clone (  )  const [virtual]

Make a clone of this object.

Reimplemented from UMLPackage.

Definition at line 47 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 53 of file folder.cpp.

QString UMLFolder::getLocalName (  ) 

Return the localized name of this folder.

Only useful for the predefined root folders.

Definition at line 57 of file folder.cpp.

void UMLFolder::addView ( UMLView *  view  ) 

Add a view to the diagram list.

Definition at line 61 of file folder.cpp.

void UMLFolder::removeView ( UMLView *  view  ) 

Remove a view from the diagram list.

Definition at line 65 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 71 of file folder.cpp.

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 84 of file folder.cpp.

UMLView * UMLFolder::findView ( Uml::IDType  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 107 of file folder.cpp.

UMLView * UMLFolder::findView ( Uml::Diagram_Type  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 125 of file folder.cpp.

void UMLFolder::setViewOptions ( const Settings::OptionState &  optionState  ) 

Set the options for the views in this folder.

Definition at line 146 of file folder.cpp.

void UMLFolder::removeAllViews (  ) 

Remove all views in this folder.

Definition at line 152 of file folder.cpp.

void UMLFolder::setFolderFile ( const QString &  fileName  ) 

Set the folder file name for a separate submodel.

Definition at line 175 of file folder.cpp.

QString UMLFolder::getFolderFile (  ) 

Get the folder file name for a separate submodel.

Definition at line 179 of file folder.cpp.

void UMLFolder::saveToXMI ( QDomDocument &  qDoc,
QDomElement &  qElement 
) [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 222 of file folder.cpp.

void UMLFolder::saveContents ( QDomDocument &  qDoc,
QDomElement &  qElement 
) [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 183 of file folder.cpp.

void UMLFolder::save ( QDomDocument &  qDoc,
QDomElement &  qElement 
) [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 211 of file folder.cpp.

bool UMLFolder::loadDiagramsFromXMI ( QDomNode &  diagrams  )  [protected]

Auxiliary to load(): Load the diagrams from the "diagrams" in the <XMI.extension>.

Definition at line 271 of file folder.cpp.

bool UMLFolder::loadFolderFile ( const QString &  path  )  [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 295 of file folder.cpp.

bool UMLFolder::load ( QDomElement &  element  )  [protected, virtual]

Loads the UML:Component element.

Reimplemented from UMLPackage.

Definition at line 332 of file folder.cpp.


The documentation for this class was generated from the following files:
  • folder.h
  • folder.cpp

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdesdk

Skip menu "kdesdk"
  • kate
  •     kate
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal