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

umbrello/umbrello

UMLDoc Class Reference

#include <umldoc.h>

Inheritance diagram for UMLDoc:

Inheritance graph
[legend]

List of all members.


Detailed Description

UMLDoc provides a document object for a document-view model.

The UMLDoc class provides a document object that can be used in conjunction with the classes UMLApp and UMLView to create a document-view model for standard KDE applications based on KApplication and KMainWindow. Thereby, the document object is created by the UMLApp instance and contains the document structure with the according methods for manipulation of the document data by UMLView objects. Also, UMLDoc contains the methods for serialization of the document data from and to files.

Author:
Paul Hensgen <phensgen@techie.com> Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 66 of file umldoc.h.


Public Slots

void slotRemoveUMLObject (UMLObject *o)
void slotAutoSave ()
void slotDiagramPopupMenu (QWidget *umlview, const QPoint &point)

Signals

void sigDiagramCreated (Uml::IDType id)
void sigDiagramRemoved (Uml::IDType id)
void sigDiagramRenamed (Uml::IDType t)
void sigDiagramChanged (Uml::Diagram_Type)
void sigObjectCreated (UMLObject *)
void sigObjectRemoved (UMLObject *)
void sigResetStatusbarProgress ()
void sigSetStatusbarProgressSteps (int totalSteps)
void sigSetStatusbarProgress (int stepPosition)
void sigWriteToStatusBar (const QString &text)
void sigCurrentViewChanged ()

Public Member Functions

 UMLDoc ()
 ~UMLDoc ()
void init ()
void addView (UMLView *view)
void removeView (UMLView *view, bool enforceOneView=true)
void setMainViewID (Uml::IDType viewID)
void setModified (bool _m=true)
bool isModified ()
bool saveModified ()
bool newDocument ()
void closeDocument ()
bool openDocument (const KUrl &url, const char *format=0)
bool saveDocument (const KUrl &url, const char *format=0)
const KUrl & url () const
void setUrl (const KUrl &url)
void setupSignals ()
bool isUnique (const QString &name)
bool isUnique (const QString &name, UMLPackage *package)
UMLStereotype * findOrCreateStereotype (const QString &name)
UMLAssociation * createUMLAssociation (UMLObject *a, UMLObject *b, Uml::Association_Type type)
void addAssociation (UMLAssociation *pAssoc)
void removeAssociation (UMLAssociation *pAssoc, bool doSetModified=true)
UMLAssociation * findAssociation (Uml::Association_Type assocType, const UMLObject *roleAObj, const UMLObject *roleBObj, bool *swap=NULL)
UMLView * createDiagram (UMLFolder *folder, Uml::Diagram_Type type, bool askForName=true)
void removeUMLObject (UMLObject *o)
void renameDiagram (Uml::IDType id)
void renameUMLObject (UMLObject *o)
void renameChildUMLObject (UMLObject *o)
void changeCurrentView (Uml::IDType id)
void removeDiagram (Uml::IDType id)
UMLObject * findObjectById (Uml::IDType id)
UMLObject * findUMLObject (const QString &name, Uml::Object_Type type=Uml::ot_UMLObject, UMLObject *currentObj=NULL)
UMLObject * findObjectByAuxId (const QString &idStr)
UMLClassifier * findUMLClassifier (const QString &name)
UMLStereotype * findStereotype (const QString &name)
UMLView * findView (Uml::IDType id)
UMLView * findView (Uml::Diagram_Type type, const QString &name, bool searchAllScopes=false)
void setName (const QString &name)
QString getName () const
Uml::IDType getModelID () const
virtual void saveToXMI (QIODevice &file)
short getEncoding (QIODevice &file)
virtual bool loadFromXMI (QIODevice &file, short encode=ENC_UNKNOWN)
bool validateXMIHeader (QDomNode &headerNode)
bool loadUMLObjectsFromXMI (QDomElement &element)
void loadExtensionsFromXMI (QDomNode &node)
bool loadDiagramsFromXMI (QDomNode &node)
void signalDiagramRenamed (UMLView *pView)
void removeAllViews ()
void signalUMLObjectCreated (UMLObject *o)
UMLFolder * getDatatypeFolder ()
UMLClassifierList getConcepts (bool includeNested=true)
UMLClassifierList getClasses (bool includeNested=true)
UMLClassifierList getClassesAndInterfaces (bool includeNested=true)
UMLEntityList getEntities (bool includeNested=true)
UMLClassifierList getInterfaces (bool includeNested=true)
UMLClassifierList getDatatypes ()
UMLAssociationList getAssociations ()
UMLPackageList getPackages (bool includeNested=true)
void print (QPrinter *pPrinter, DiagramPrintPage *selectPage)
UMLViewList getViewIterator ()
bool assignNewIDs (UMLObject *Obj)
bool addUMLObject (UMLObject *object)
bool addUMLView (UMLView *pView)
UMLFolder * getRootFolder (Uml::Model_Type mt)
Uml::Model_Type rootFolderType (UMLObject *obj)
UMLFolder * currentRoot ()
void setCurrentRoot (Uml::Model_Type rootType)
virtual IDChangeLog * getChangeLog ()
void endPaste ()
void beginPaste ()
Uml::IDType assignNewID (Uml::IDType OldID)
QString getDocumentation () const
void setDocumentation (const QString &doc)
void activateAllViews ()
void settingsChanged (Settings::OptionState optionState)
int getFileVersion (void)
QString uniqViewName (const Uml::Diagram_Type type)
bool loading () const
void setLoading (bool state=true)
bool closing () const
void addDefaultDatatypes ()
void createDatatype (const QString &name)
UMLStereotype * findStereotypeById (Uml::IDType id)
void addStereotype (UMLStereotype *s)
void removeStereotype (UMLStereotype *s)
void addDefaultStereotypes ()
const UMLStereotypeList & getStereotypes ()
void writeToStatusBar (const QString &text)
void resolveTypes ()
ListPopupMenu::Menu_Type getPopupMenuSelection (QAction *action)

Constructor & Destructor Documentation

UMLDoc::UMLDoc (  ) 

Constructor for the fileclass of the application.

Definition at line 85 of file umldoc.cpp.

UMLDoc::~UMLDoc (  ) 

Destructor for the fileclass of the application.

Definition at line 134 of file umldoc.cpp.


Member Function Documentation

void UMLDoc::init (  ) 

Initialize the UMLDoc.

To be called after the constructor, before anything else.

Definition at line 101 of file umldoc.cpp.

void UMLDoc::addView ( UMLView *  view  ) 

Adds a view to the document which represents the document contents.

Usually this is your main view.

Parameters:
view Pointer to the UMLView to add.

Definition at line 139 of file umldoc.cpp.

void UMLDoc::removeView ( UMLView *  view,
bool  enforceOneView = true 
)

Removes a view from the list of currently connected views.

Parameters:
view Pointer to the UMLView to remove.
enforceOneView switch to determine if we have a current view or not. most of the time, we DO want this, except when exiting the program.

Definition at line 165 of file umldoc.cpp.

void UMLDoc::setMainViewID ( Uml::IDType  viewID  ) 

Sets m_nViewID.

Definition at line 1727 of file umldoc.cpp.

void UMLDoc::setModified ( bool  _m = true  ) 

Sets the modified flag for the document after a modifying action on the view connected to the document.

Parameters:
_m The value to set the modified flag to.

Definition at line 1928 of file umldoc.cpp.

bool UMLDoc::isModified (  )  [inline]

Returns if the document is modified or not.

Use this to determine if your document needs saving by the user on closing.

Returns:
True if this UMLDoc is modified.

Definition at line 122 of file umldoc.h.

bool UMLDoc::saveModified (  ) 

"save modified" - Asks the user for saving if the document is modified.

Returns:
True if document can be closed.

Definition at line 219 of file umldoc.cpp.

bool UMLDoc::newDocument (  ) 

Initializes the document generally.

Returns:
True if operation successful.

Definition at line 307 of file umldoc.cpp.

void UMLDoc::closeDocument (  ) 

Closes the current document.

Definition at line 259 of file umldoc.cpp.

bool UMLDoc::openDocument ( const KUrl &  url,
const char *  format = 0 
)

Loads the document by filename and format and emits the updateViews() signal.

Parameters:
url The filename in KUrl format.
format The format (optional.)
Returns:
True if operation successful.

Definition at line 332 of file umldoc.cpp.

bool UMLDoc::saveDocument ( const KUrl &  url,
const char *  format = 0 
)

Saves the document using the given filename and format.

Parameters:
url The filename in KUrl format.
format The format (optional.)
Returns:
True if operation successful.

insert some checks in saveToXMI to detect a failed save attempt

Definition at line 501 of file umldoc.cpp.

const KUrl & UMLDoc::url (  )  const

Returns the KUrl of the document.

Returns:
The KUrl of this UMLDoc.

Definition at line 215 of file umldoc.cpp.

void UMLDoc::setUrl ( const KUrl &  url  ) 

Sets the URL of the document.

Parameters:
url The KUrl to set.

Definition at line 210 of file umldoc.cpp.

void UMLDoc::setupSignals (  ) 

Sets up the signals needed by the program for it to work.

Definition at line 650 of file umldoc.cpp.

bool UMLDoc::isUnique ( const QString &  name  ) 

Returns true if the given name is unique within its scope.

Parameters:
name The name to check.
Returns:
True if name is unique.

Definition at line 769 of file umldoc.cpp.

bool UMLDoc::isUnique ( const QString &  name,
UMLPackage *  package 
)

Returns true if the given name is unique within its scope of given package.

Parameters:
name The name to check.
package The UMLPackage in which we have to determine the unique-ness
Returns:
True if name is unique.

Definition at line 804 of file umldoc.cpp.

UMLStereotype * UMLDoc::findOrCreateStereotype ( const QString &  name  ) 

Finds or creates a stereotype for the parent object.

Definition at line 830 of file umldoc.cpp.

UMLAssociation * UMLDoc::createUMLAssociation ( UMLObject *  a,
UMLObject *  b,
Uml::Association_Type  type 
)

Creates an association between two UMLObjects.

NOTE: this method does not check if the association is valid / legal

Parameters:
a The UMLObject "A" for the association (source)
b The UMLObject "B" for the association (destination)
type The association's type
Returns:
The Association created

Definition at line 878 of file umldoc.cpp.

void UMLDoc::addAssociation ( UMLAssociation *  pAssoc  ) 

Adds an association.

Parameters:
pAssoc Pointer to the UMLAssociation to add.

Definition at line 889 of file umldoc.cpp.

void UMLDoc::removeAssociation ( UMLAssociation *  pAssoc,
bool  doSetModified = true 
)

Removes an association.

Parameters:
pAssoc Pointer to the UMLAssociation to remove.
doSetModified Whether to mark the document as modified (default: true.)

Definition at line 840 of file umldoc.cpp.

UMLAssociation * UMLDoc::findAssociation ( Uml::Association_Type  assocType,
const UMLObject *  roleAObj,
const UMLObject *  roleBObj,
bool *  swap = NULL 
)

Finds an association.

Parameters:
assocType Type of the UMLAssociation to seek.
roleAObj Pointer to the role A UMLCanvasObject.
roleBObj Pointer to the role B UMLCanvasObject.
swap Optional pointer to boolean. The bool is set to true if the assocation matched with swapped roles, else it is set to false.
Returns:
Pointer to the UMLAssociation found or NULL if not found.

Definition at line 856 of file umldoc.cpp.

UMLView * UMLDoc::createDiagram ( UMLFolder *  folder,
Uml::Diagram_Type  type,
bool  askForName = true 
)

Creates a diagram of the given type.

Parameters:
folder The folder in which tp create the diagram.
type The type of diagram to create.
askForName If true shows a dialog box asking for name, else uses a default name.
Returns:
Pointer to the UMLView of the new diagram.

Definition at line 966 of file umldoc.cpp.

void UMLDoc::removeUMLObject ( UMLObject *  o  ) 

Removes an UMLObject from the current file.

If this object is being represented on a diagram it will also delete all those representations.

Parameters:
o Pointer to the UMLObject to delete.

Definition at line 1128 of file umldoc.cpp.

void UMLDoc::renameDiagram ( Uml::IDType  id  ) 

Used to rename a document.

This method takes care of everything. You just need to give the ID of the diagram to the method.

Parameters:
id The ID of the diagram to rename.

Definition at line 1001 of file umldoc.cpp.

void UMLDoc::renameUMLObject ( UMLObject *  o  ) 

Used to rename a UMLObject.

The UMLObject is to be an actor, use case or concept.

Parameters:
o The object to rename.

Definition at line 1026 of file umldoc.cpp.

void UMLDoc::renameChildUMLObject ( UMLObject *  o  ) 

Used to rename an operation or attribute of a concept.

Parameters:
o The attribute or operation to rename.

Definition at line 1046 of file umldoc.cpp.

void UMLDoc::changeCurrentView ( Uml::IDType  id  ) 

Changes the current view (diagram) to the view with the given ID.

Parameters:
id The ID of the view to change to.

Definition at line 1076 of file umldoc.cpp.

void UMLDoc::removeDiagram ( Uml::IDType  id  ) 

Deletes a diagram from the current file.

Parameters:
id The ID of the diagram to delete.

Definition at line 1088 of file umldoc.cpp.

UMLObject * UMLDoc::findObjectById ( Uml::IDType  id  ) 

Used to find a reference to a UMLObject by its ID.

Parameters:
id The UMLObject to find.
Returns:
Pointer to the UMLObject found, or NULL if not found.

Definition at line 676 of file umldoc.cpp.

UMLObject * UMLDoc::findUMLObject ( const QString &  name,
Uml::Object_Type  type = Uml::ot_UMLObject,
UMLObject *  currentObj = NULL 
)

Used to find a UMLObject by its type and name.

Parameters:
name The name of the UMLObject to find.
type Object_Type of the object to find (optional.) When the given type is ot_UMLObject the type is disregarded, i.e. the given name is the only search criterion.
currentObj Object relative to which to search (optional.) If given then the enclosing scope(s) of this object are searched before the global scope.
Returns:
Pointer to the UMLObject found, or NULL if not found.

Definition at line 697 of file umldoc.cpp.

UMLObject* UMLDoc::findObjectByAuxId ( const QString &  idStr  ) 

Used to find a reference to a UMLObject given its non-numeric ID string.

Only used for intermediate processing while loading files containing objects with non-numeric xmi.id's.

Parameters:
idStr The AuxId for the UMLObject to find.
Returns:
Pointer to the UMLObject found, or NULL if not found.

UMLClassifier * UMLDoc::findUMLClassifier ( const QString &  name  ) 

Used to find a UMLClassifier by its name.

Parameters:
name The name of the UMLObject to find.

Definition at line 715 of file umldoc.cpp.

UMLStereotype * UMLDoc::findStereotype ( const QString &  name  ) 

Finds a UMLStereotype by its name.

Parameters:
name The name of the UMLStereotype to find.
Returns:
Pointer to the UMLStereotype found, or NULL if not found.

Definition at line 822 of file umldoc.cpp.

UMLView * UMLDoc::findView ( Uml::IDType  id  ) 

Finds a view (diagram) by the ID given to method.

Parameters:
id The ID of the view to search for.
Returns:
Pointer to the view found, or NULL if not found.

Definition at line 660 of file umldoc.cpp.

UMLView * UMLDoc::findView ( Uml::Diagram_Type  type,
const QString &  name,
bool  searchAllScopes = false 
)

Finds a view (diagram) 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: false.)
Returns:
Pointer to the view found, or NULL if not found.

Definition at line 670 of file umldoc.cpp.

void UMLDoc::setName ( const QString &  name  ) 

Set the name of this model.

Definition at line 1193 of file umldoc.cpp.

QString UMLDoc::getName (  )  const

Return the name of this model.

Definition at line 1197 of file umldoc.cpp.

Uml::IDType UMLDoc::getModelID (  )  const

Return the m_modelID (currently this a fixed value: Umbrello supports only a single document.

)

Definition at line 1201 of file umldoc.cpp.

void UMLDoc::saveToXMI ( QIODevice &  file  )  [virtual]

This method is called for saving the given model as a XMI file.

It is virtual and calls the corresponding saveToXMI() functions of the derived classes.

Parameters:
file The file to be saved to.

bugs.kde.org/56184 comment by M. Alanen 2004-12-19: " XMI.model requires xmi.version. (or leave the whole XMI.model out, it's not required) " QDomElement model = doc.createElement( "XMI.model" ); QFile* qfile = dynamic_cast<QFile*>(&file); if (qfile) { QString modelName = qfile->name(); modelName = modelName.section('/', -1 ); modelName = modelName.section('.', 0, 0); model.setAttribute( "xmi.name", modelName ); model.setAttribute( "href", qfile->name() ); }

See comment on <XMI.model> above header.appendChild( model );

Definition at line 1205 of file umldoc.cpp.

short UMLDoc::getEncoding ( QIODevice &  file  ) 

Checks the given XMI file if it was saved with correct Unicode encoding set or not.

Parameters:
file The file to be checked.

Definition at line 1344 of file umldoc.cpp.

bool UMLDoc::loadFromXMI ( QIODevice &  file,
short  encode = ENC_UNKNOWN 
) [virtual]

Load a given XMI model from a file.

If the encoding of the file is already known it can be passed to the function. If this info isn't given, loadFromXMI will check which encoding was used.

Parameters:
file The file to be loaded.
encode The encoding used.

Definition at line 1419 of file umldoc.cpp.

bool UMLDoc::validateXMIHeader ( QDomNode &  headerNode  ) 

Ensures the XMI file is a valid UML file.

Currently only checks for metamodel=UML.

Parameters:
headerNode The <XMI.header> node

Definition at line 1599 of file umldoc.cpp.

bool UMLDoc::loadUMLObjectsFromXMI ( QDomElement &  element  ) 

Loads all UML objects from XMI into the current UMLDoc.

Returns:
True if operation successful.

Definition at line 1616 of file umldoc.cpp.

void UMLDoc::loadExtensionsFromXMI ( QDomNode &  node  ) 

Loads umbrello specific extensions from XMI to the UMLDoc.

The extension tags are: "docsettings", "diagrams", "listview", and "codegeneration".

Definition at line 1731 of file umldoc.cpp.

bool UMLDoc::loadDiagramsFromXMI ( QDomNode &  node  ) 

Loads all diagrams from XMI into the current UMLDoc.

Returns:
True if operation successful.

Definition at line 1788 of file umldoc.cpp.

void UMLDoc::signalDiagramRenamed ( UMLView *  pView  ) 

Signal a view/diagram has been renamed.

Definition at line 2124 of file umldoc.cpp.

void UMLDoc::removeAllViews (  ) 

Call to remove all the views (diagrams) in the current file.

Definition at line 1834 of file umldoc.cpp.

void UMLDoc::signalUMLObjectCreated ( UMLObject *  o  ) 

Signal that a UMLObject has been created.

Parameters:
o The object that has been created.

Definition at line 1183 of file umldoc.cpp.

UMLFolder* UMLDoc::getDatatypeFolder (  )  [inline]

Returns the datatype folder.

Returns:
Pointer to the predefined folder for datatypes.

Definition at line 471 of file umldoc.h.

UMLClassifierList UMLDoc::getConcepts ( bool  includeNested = true  ) 

Returns a list of the concepts in this UMLDoc.

Parameters:
includeNested Whether to include the concepts from nested packages (default: true.)
Returns:
List of UML concepts.

Definition at line 1851 of file umldoc.cpp.

UMLClassifierList UMLDoc::getClasses ( bool  includeNested = true  ) 

Returns a list of the classes in this UMLDoc.

Parameters:
includeNested Whether to include the concepts from nested packages (default: true.)
Returns:
List of UML classes.

Definition at line 1857 of file umldoc.cpp.

UMLClassifierList UMLDoc::getClassesAndInterfaces ( bool  includeNested = true  ) 

Returns a list of the classes and interfaces in this UMLDoc.

Parameters:
includeNested Whether to include the concepts from nested packages (default: true.)
Returns:
List of UML concepts.

Definition at line 1863 of file umldoc.cpp.

UMLEntityList UMLDoc::getEntities ( bool  includeNested = true  ) 

Returns a list of the entities in this UMLDoc.

Parameters:
includeNested Whether to include the entities from nested packages (default: true.)
Returns:
List of UML Entities.

Definition at line 1869 of file umldoc.cpp.

UMLClassifierList UMLDoc::getInterfaces ( bool  includeNested = true  ) 

Returns a list of the interfaces in this UMLDoc.

Parameters:
includeNested Whether to include the concepts from nested packages (default: true.)
Returns:
List of UML interfaces.

Definition at line 1875 of file umldoc.cpp.

UMLClassifierList UMLDoc::getDatatypes (  ) 

Returns a list of the datatypes in this UMLDoc.

Returns:
List of datatypes.

Definition at line 1881 of file umldoc.cpp.

UMLAssociationList UMLDoc::getAssociations (  ) 

Returns a list of the associations in this UMLDoc.

Returns:
List of UML associations.

Definition at line 1892 of file umldoc.cpp.

UMLPackageList UMLDoc::getPackages ( bool  includeNested = true  ) 

Returns a list of the packages in this UMLDoc,.

Returns:
List of UMLPackages.

Definition at line 1844 of file umldoc.cpp.

void UMLDoc::print ( QPrinter *  pPrinter,
DiagramPrintPage *  selectPage 
)

Controls the printing of the program.

Parameters:
pPrinter The printer (object) to use.

Definition at line 1903 of file umldoc.cpp.

UMLViewList UMLDoc::getViewIterator (  ) 

Return the list of views for this document.

Returns:
List of UML views.

Definition at line 1921 of file umldoc.cpp.

bool UMLDoc::assignNewIDs ( UMLObject *  Obj  ) 

Assigns an already created UMLObject a new ID.

If the object is a classifier then the operations/attributes are also assigned new IDs.

Parameters:
Obj Pointer to the UMLObject to add.
Returns:
True if operation successful.

Definition at line 1935 of file umldoc.cpp.

bool UMLDoc::addUMLObject ( UMLObject *  object  ) 

Adds a UMLObject thats already created but doesn't change any ids or signal.

Adds a UMLObject thats already created but doesn't change any ids or signal.

Use AddUMLObjectPaste if pasting.

Parameters:
object The object to add.
Returns:
True if the object was actually added.
Used by the list view. Use AddUMLObjectPaste if pasting.

Definition at line 726 of file umldoc.cpp.

bool UMLDoc::addUMLView ( UMLView *  pView  ) 

Adds an already created UMLView to the document, it gets assigned a new ID, if its name is already in use then the function appends a number to it to differentiate it from the others; this number is incremental so if number 1 is in use then it tries 2 and then 3 and so on.

Adds an already created UMLView to the document, it gets assigned a new ID.

Parameters:
pView Pointer to the UMLView to add.
Returns:
True if operation successful.
If its name is already in use then the function appends a number to it to differentiate it from the others; this number is incremental so if number 1 is in use then it tries 2 and then 3 and so on

Definition at line 2028 of file umldoc.cpp.

UMLFolder * UMLDoc::getRootFolder ( Uml::Model_Type  mt  ) 

Return the predefined root folder of the given type.

Definition at line 1972 of file umldoc.cpp.

Uml::Model_Type UMLDoc::rootFolderType ( UMLObject *  obj  ) 

Return the corresponding Model_Type if the given object is one of the root folders.

When the given object is not one of the root folders then return Uml::N_MODELTYPES.

Definition at line 1980 of file umldoc.cpp.

UMLFolder * UMLDoc::currentRoot (  ) 

Return the currently selected root folder.

This will be an element from the m_root[] array.

Definition at line 1109 of file umldoc.cpp.

void UMLDoc::setCurrentRoot ( Uml::Model_Type  rootType  ) 

Set the current root folder.

Parameters:
rootType The type of the root folder to set. The element from m_root[] which is indexed by this type is selected.

Definition at line 1124 of file umldoc.cpp.

IDChangeLog * UMLDoc::getChangeLog (  )  [virtual]

Read property of IDChangeLog* m_pChangeLog.

Returns:
Pointer to the IDChangeLog object.

Definition at line 1990 of file umldoc.cpp.

void UMLDoc::endPaste (  ) 

Closes a paste session, deletes the ChangeLog.

Closes a Paste session, Deletes the ChangeLog.

Definition at line 2007 of file umldoc.cpp.

void UMLDoc::beginPaste (  ) 

Opens a Paste session, deletes the old ChangeLog and creates an empty one.

Opens a Paste session, Deletes the Old ChangeLog and Creates an empty one.

Definition at line 1997 of file umldoc.cpp.

Uml::IDType UMLDoc::assignNewID ( Uml::IDType  OldID  ) 

Assigns a New ID to an Object, and also logs the assignment to its internal ChangeLog.

Assigns a New ID to an Object, and also logs the assignment to its internal ChangeLog.

Parameters:
OldID The present ID of the object.
Returns:
The new ID assigned to the object.

Definition at line 2016 of file umldoc.cpp.

QString UMLDoc::getDocumentation (  )  const [inline]

Returns the documentation for the project.

Returns:
The documentation text of this UMLDoc.

Definition at line 647 of file umldoc.h.

void UMLDoc::setDocumentation ( const QString &  doc  )  [inline]

Sets the documentation for the project.

Parameters:
doc The documentation to set for this UMLDoc.

Definition at line 656 of file umldoc.h.

void UMLDoc::activateAllViews (  ) 

Activate all the diagrams/views after loading so all their widgets keep their IDs.

Definition at line 2051 of file umldoc.cpp.

void UMLDoc::settingsChanged ( Settings::OptionState  optionState  ) 

Sets the default settings to the given settings.

Definition at line 2061 of file umldoc.cpp.

int UMLDoc::getFileVersion ( void   )  [inline]

Returns the version of the old UML files.

Definition at line 675 of file umldoc.h.

QString UMLDoc::uniqViewName ( const Uml::Diagram_Type  type  ) 

Returns a name for the new object, appended with a number if the default name is taken e.g.

class diagram, class diagram_1 etc

Definition at line 924 of file umldoc.cpp.

bool UMLDoc::loading (  )  const

Returns true when loading a document file.

Definition at line 954 of file umldoc.cpp.

void UMLDoc::setLoading ( bool  state = true  ) 

Sets loading boolean flag to the value given.

Definition at line 958 of file umldoc.cpp.

bool UMLDoc::closing (  )  const

Returns the m_bClosing flag.

Definition at line 962 of file umldoc.cpp.

void UMLDoc::addDefaultDatatypes (  ) 

Calls the active code generator to create its default datatypes.

Definition at line 2131 of file umldoc.cpp.

void UMLDoc::createDatatype ( const QString &  name  ) 

Add a datatype if it doesn't already exist.

Used by code generators and attribute dialog.

Definition at line 2143 of file umldoc.cpp.

UMLStereotype * UMLDoc::findStereotypeById ( Uml::IDType  id  ) 

Find a UMLStereotype by its unique ID.

Definition at line 689 of file umldoc.cpp.

void UMLDoc::addStereotype ( UMLStereotype *  s  ) 

Add a UMLStereotype to the application.

Definition at line 744 of file umldoc.cpp.

void UMLDoc::removeStereotype ( UMLStereotype *  s  ) 

Remove a UMLStereotype from the application.

Definition at line 749 of file umldoc.cpp.

void UMLDoc::addDefaultStereotypes (  ) 

Add a stereotype if it doesn't already exist.

Used by code generators, operations and attribute dialog.

Definition at line 2219 of file umldoc.cpp.

const UMLStereotypeList & UMLDoc::getStereotypes (  ) 

Returns a list of the stereotypes in this UMLDoc.

Returns:
List of UML stereotypes.

Definition at line 2225 of file umldoc.cpp.

void UMLDoc::writeToStatusBar ( const QString &  text  ) 

Write text to the status bar.

Definition at line 754 of file umldoc.cpp.

void UMLDoc::resolveTypes (  ) 

Type resolution pass.

Definition at line 1581 of file umldoc.cpp.

ListPopupMenu::Menu_Type UMLDoc::getPopupMenuSelection ( QAction *  action  ) 

Find and return the user selected type of the popup menu.

See also m_pTabPopupMenu and slotDiagramPopupMenu

Definition at line 2210 of file umldoc.cpp.

void UMLDoc::slotRemoveUMLObject ( UMLObject *  o  )  [slot]

Definition at line 759 of file umldoc.cpp.

void UMLDoc::slotAutoSave (  )  [slot]

Called after a specified time to autosave the document.

Definition at line 2084 of file umldoc.cpp.

void UMLDoc::slotDiagramPopupMenu ( QWidget *  umlview,
const QPoint &  point 
) [slot]

Make a popup menu for the tabs signalled from tabWidget's contextMenu().

Definition at line 2153 of file umldoc.cpp.

void UMLDoc::sigDiagramCreated ( Uml::IDType  id  )  [signal]

void UMLDoc::sigDiagramRemoved ( Uml::IDType  id  )  [signal]

void UMLDoc::sigDiagramRenamed ( Uml::IDType  t  )  [signal]

void UMLDoc::sigDiagramChanged ( Uml::Diagram_Type   )  [signal]

void UMLDoc::sigObjectCreated ( UMLObject *   )  [signal]

void UMLDoc::sigObjectRemoved ( UMLObject *   )  [signal]

void UMLDoc::sigResetStatusbarProgress (  )  [signal]

Reset the status bar.

void UMLDoc::sigSetStatusbarProgressSteps ( int  totalSteps  )  [signal]

Set the total range of the progressbar.

Parameters:
totalSteps Total range of the progressbar (0..totalSteps)

void UMLDoc::sigSetStatusbarProgress ( int  stepPosition  )  [signal]

Set the progress position of the progressbar.

Parameters:
stepPosition The step position to set.

void UMLDoc::sigWriteToStatusBar ( const QString &  text  )  [signal]

Write text to the status bar.

void UMLDoc::sigCurrentViewChanged (  )  [signal]

The diagram being displayed has changed.

UMLApp uses this to keep its menu items state up to date.


The documentation for this class was generated from the following files:
  • umldoc.h
  • umldoc.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