umbrello API Documentation

UMLDoc Class Reference

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

#include <umldoc.h>

List of all members.

Public Slots

void slotRemoveUMLObject (UMLObject *o)
void slotAutoSave ()
 Called after a specified time to autosave the document.
void slotDiagramPopupMenu (QWidget *umlview, const QPoint &point)
 Make a popup menu for the tabs signalled from tabWidget's contextMenu().

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 ()
 Reset the status bar.
void sigSetStatusbarProgressSteps (int totalSteps)
 Set the total range of the progressbar.
void sigSetStatusbarProgress (int stepPosition)
 Set the progress position of the progressbar.
void sigWriteToStatusBar (const QString &text)
 Write text to the status bar.
void sigCurrentViewChanged ()
 The diagram being displayed has changed.

Public Member Functions

 UMLDoc ()
 Constructor for the fileclass of the application.
 ~UMLDoc ()
 Destructor for the fileclass of the application.
void init ()
 Initialize the UMLDoc.
void addView (UMLView *view)
 Adds a view to the document which represents the document contents.
void removeView (UMLView *view, bool enforceOneView=true)
 Removes a view from the list of currently connected views.
void setMainViewID (Uml::IDType viewID)
 Sets m_nViewID.
void setModified (bool _m=true, bool addToUndo=true)
 Sets the modified flag for the document after a modifying action on the view connected to the document.
bool isModified ()
 Returns if the document is modified or not.
bool saveModified ()
 "save modified" - Asks the user for saving if the document is modified.
bool newDocument ()
 Initializes the document generally.
void closeDocument ()
 Closes the current document.
bool openDocument (const KURL &url, const char *format=0)
 Loads the document by filename and format and emits the updateViews() signal.
bool saveDocument (const KURL &url, const char *format=0)
 Saves the document using the given filename and format.
const KURL & URL () const
 Returns the KURL of the document.
void setURL (const KURL &url)
 Sets the URL of the document.
void setupSignals ()
 Sets up the signals needed by the program for it to work.
bool isUnique (const QString &name)
 Returns true if the given name is unique within its scope.
bool isUnique (const QString &name, UMLPackage *package)
 Returns true if the given name is unique within its scope of given package.
UMLStereotypefindOrCreateStereotype (const QString &name)
 Finds or creates a stereotype for the parent object.
UMLAssociationcreateUMLAssociation (UMLObject *a, UMLObject *b, Uml::Association_Type type)
 Creates an association between two UMLObjects.
void addAssociation (UMLAssociation *pAssoc)
 Adds an association.
void removeAssociation (UMLAssociation *pAssoc, bool doSetModified=true)
 Removes an association.
UMLAssociationfindAssociation (Uml::Association_Type assocType, const UMLObject *roleAObj, const UMLObject *roleBObj, bool *swap=NULL)
 Finds an association.
void createDiagram (UMLFolder *folder, Uml::Diagram_Type type, bool askForName=true)
 Creates a diagram of the given type.
void removeUMLObject (UMLObject *o)
 Removes an UMLObject from the current file.
void renameDiagram (Uml::IDType id)
 Used to rename a document.
void renameUMLObject (UMLObject *o)
 Used to rename a UMLObject.
void renameChildUMLObject (UMLObject *o)
 Used to rename an operation or attribute of a concept.
void changeCurrentView (Uml::IDType id)
 Changes the current view (diagram) to the view with the given ID.
void removeDiagram (Uml::IDType id)
 Deletes a diagram from the current file.
UMLObjectfindObjectById (Uml::IDType id)
 Used to find a reference to a UMLObject by its ID.
UMLObjectfindUMLObject (const QString &name, Uml::Object_Type type=Uml::ot_UMLObject, UMLObject *currentObj=NULL)
 Used to find a UMLObject by its type and name.
UMLObjectfindObjectByAuxId (const QString &idStr)
 Used to find a reference to a UMLObject given its non-numeric ID string.
UMLClassifierfindUMLClassifier (const QString &name)
 Used to find a UMLClassifier by its name.
UMLStereotypefindStereotype (const QString &name)
 Finds a UMLStereotype by its name.
UMLViewfindView (Uml::IDType id)
 Finds a view (diagram) by the ID given to method.
UMLViewfindView (Uml::Diagram_Type type, const QString &name, bool searchAllScopes=false)
 Finds a view (diagram) by the type and name given.
void setName (const QString &name)
 Set the name of this model.
QString getName () const
 Return the name of this model.
Uml::IDType getModelID () const
 Return the m_modelID (currently this a fixed value: Umbrello supports only a single document.).
virtual void saveToXMI (QIODevice &file)
 This method is called for saving the given model as a XMI file.
short getEncoding (QIODevice &file)
 Checks the given XMI file if it was saved with correct Unicode encoding set or not.
virtual bool loadFromXMI (QIODevice &file, short encode=ENC_UNKNOWN)
 Load a given XMI model from a file.
bool validateXMIHeader (QDomNode &headerNode)
 Ensures the XMI file is a valid UML file.
bool loadUMLObjectsFromXMI (QDomElement &element)
 Loads all UML objects from XMI into the current UMLDoc.
void loadExtensionsFromXMI (QDomNode &node)
 Loads umbrello specific extensions from XMI to the UMLDoc.
bool loadDiagramsFromXMI (QDomNode &node)
 Loads all diagrams from XMI into the current UMLDoc.
void signalDiagramRenamed (UMLView *pView)
 Signal a view/diagram has been renamed.
void removeAllViews ()
 Call to remove all the views (diagrams) in the current file.
void signalUMLObjectCreated (UMLObject *o)
 Signal that a UMLObject has been created.
UMLFoldergetDatatypeFolder ()
 Returns the datatype folder.
UMLClassifierList getConcepts (bool includeNested=true)
 Returns a list of the concepts in this UMLDoc.
UMLClassifierList getClasses (bool includeNested=true)
 Returns a list of the classes in this UMLDoc.
UMLClassifierList getClassesAndInterfaces (bool includeNested=true)
 Returns a list of the classes and interfaces in this UMLDoc.
UMLClassifierList getInterfaces (bool includeNested=true)
 Returns a list of the interfaces in this UMLDoc.
UMLClassifierList getDatatypes ()
 Returns a list of the datatypes in this UMLDoc.
UMLAssociationList getAssociations ()
 Returns a list of the associations in this UMLDoc.
void print (KPrinter *pPrinter)
 Controls the printing of the program.
UMLViewList getViewIterator ()
 Return the list of views for this document.
bool assignNewIDs (UMLObject *Obj)
 Assigns an already created UMLObject a new ID.
bool addUMLObject (UMLObject *object)
 Adds a UMLObject thats already created but doesn't change any ids or signal.
bool 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.
UMLFoldergetRootFolder (Uml::Model_Type mt)
 Return the predefined root folder of the given type.
Uml::Model_Type rootFolderType (UMLObject *obj)
 Return the corresponding Model_Type if the given object is one of the root folders.
UMLFoldercurrentRoot ()
 Return the currently selected root folder.
void setCurrentRoot (Uml::Model_Type rootType)
 Set the current root folder.
virtual IDChangeLoggetChangeLog ()
 Read property of IDChangeLog* m_pChangeLog.
void endPaste ()
 Closes a paste session, deletes the ChangeLog.
void beginPaste ()
 Opens a Paste session, deletes the old ChangeLog and creates an empty one.
Uml::IDType assignNewID (Uml::IDType OldID)
 Assigns a New ID to an Object, and also logs the assignment to its internal ChangeLog.
QString getDocumentation () const
 Returns the documentation for the project.
void setDocumentation (const QString &doc)
 Sets the documentation for the project.
void activateAllViews ()
 Activate all the diagrams/views after loading so all their widgets keep their IDs.
void settingsChanged (Settings::OptionState optionState)
 Sets the default settings to the given settings.
int getFileVersion (void)
 Returns the version of the old UML files.
void loadUndoData ()
 Performs the undo function, loading the document back to the state is was before the last addToUndoStack().
void loadRedoData ()
 Performs the redo function, loading the document back to the state is was before the last undo().
void addToUndoStack ()
 Takes an image of the document and adds it to the UndoStack.
void clearUndoStack ()
 Removes all entries from the UndoStack and RedoStack and disables the undo and redo actions.
void clearRedoStack ()
 Removes all entries from the RedoStack and disables the redo action.
QString 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.
bool loading () const
 Returns true when loading a document file.
void setLoading (bool state=true)
 Sets loading boolean flag to the value given.
void addDefaultDatatypes ()
 Calls the active code generator to create its default datatypes.
void createDatatype (const QString &name)
 Add a datatype if it doesn't already exist.
UMLStereotypefindStereotypeById (Uml::IDType id)
 Find a UMLStereotype by its unique ID.
void addStereotype (const UMLStereotype *s)
 Add a UMLStereotype to the application.
void removeStereotype (const UMLStereotype *s)
 Remove a UMLStereotype from the application.
void addDefaultStereotypes ()
 Add a stereotype if it doesn't already exist.
const UMLStereotypeList & getStereotypes ()
 Returns a list of the stereotypes in this UMLDoc.
void writeToStatusBar (const QString &text)
 Write text to the status bar.
void resolveTypes ()
 Type resolution pass.


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 77 of file umldoc.h.


Constructor & Destructor Documentation

UMLDoc::UMLDoc  ) 
 

Constructor for the fileclass of the application.

Definition at line 81 of file umldoc.cpp.

UMLDoc::~UMLDoc  ) 
 

Destructor for the fileclass of the application.

Definition at line 129 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 96 of file umldoc.cpp.

References UMLPackage::addObject(), UMLFolder::setLocalName(), UMLObject::setUMLPackage(), and sigCurrentViewChanged().

Referenced by UMLApp::UMLApp().

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 134 of file umldoc.cpp.

References UMLFolder::addView(), UMLApp::getListView(), UMLApp::setCurrentView(), UMLApp::setDiagramMenuItemsState(), UMLApp::slotUpdateViews(), and UMLApp::tabWidget().

Referenced by addUMLView(), createDiagram(), loadDiagramsFromXMI(), and UMLFolder::loadDiagramsFromXMI().

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 172 of file umldoc.cpp.

References UMLFolder::appendViews(), changeCurrentView(), createDiagram(), UMLApp::getCurrentView(), UMLView::getID(), UMLFolder::removeView(), UMLApp::setCurrentView(), and UMLApp::setDiagramMenuItemsState().

Referenced by UMLFolder::removeAllViews(), and removeDiagram().

void UMLDoc::setMainViewID Uml::IDType  viewID  ) 
 

Sets m_nViewID.

Definition at line 1751 of file umldoc.cpp.

Referenced by UMLView::loadUISDiagram().

void UMLDoc::setModified bool  _m = true,
bool  addToUndo = 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.
addToUndo Whether this is an action which should be added to the undo stack.

Definition at line 1939 of file umldoc.cpp.

References addToUndoStack(), clearRedoStack(), and UMLApp::setModified().

Referenced by addAssociation(), addUMLView(), assignNewIDs(), changeCurrentView(), UMLListView::createChildUMLObject(), createDiagram(), UMLApp::handleCursorKeyReleaseEvent(), FloatingTextWidget::handleRename(), Import_Utils::insertAttribute(), loadRedoData(), loadUndoData(), AssociationWidget::mouseDoubleClickEvent(), UMLWidgetController::mouseReleaseEvent(), newDocument(), UMLListViewItem::okRename(), openDocument(), UMLApp::readProperties(), UMLView::removeAssoc(), removeAssociation(), removeDiagram(), removeUMLObject(), UMLView::removeWidget(), renameChildUMLObject(), renameDiagram(), renameUMLObject(), saveDocument(), saveModified(), ToolBarStateMessages::setSecondWidget(), MessageWidget::setText(), UMLView::setupNewWidget(), UMLWidget::showProperties(), UMLObject::showProperties(), StateWidget::showProperties(), ObjectWidget::showProperties(), ActivityWidget::showProperties(), UMLApp::slotEditCut(), UMLApp::slotImportClasses(), UMLWidget::slotMenuSelection(), UMLView::slotMenuSelection(), ObjectWidget::slotMenuSelection(), EnumWidget::slotMenuSelection(), EntityWidget::slotMenuSelection(), ClassifierWidget::slotMenuSelection(), and AssociationWidget::slotMenuSelection().

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 135 of file umldoc.h.

Referenced by UMLApp::saveProperties(), slotAutoSave(), and UMLApp::slotFileSaveAs().

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 223 of file umldoc.cpp.

References closeDocument(), saveDocument(), setModified(), UMLApp::slotFileSaveAs(), and URL().

Referenced by UMLApp::queryClose(), UMLApp::slotFileNew(), UMLApp::slotFileOpen(), UMLApp::slotFileOpenRecent(), and UMLApp::slotFileQuit().

bool UMLDoc::newDocument  ) 
 

Initializes the document generally.

Returns:
True if operation successful.

Definition at line 309 of file umldoc.cpp.

References addDefaultDatatypes(), addDefaultStereotypes(), addToUndoStack(), clearUndoStack(), closeDocument(), Model_Utils::convert_DT_MT(), createDiagram(), UMLApp::enableUndo(), UMLApp::initGenerator(), UMLApp::setCurrentView(), and setModified().

Referenced by UMLApp::newDocument(), openDocument(), and UMLApp::slotFileNew().

void UMLDoc::closeDocument  ) 
 

Closes the current document.

Definition at line 263 of file umldoc.cpp.

References UMLPackage::addObject(), UMLApp::getDocWindow(), UMLApp::getListView(), UMLListView::init(), DocWindow::newDocumentation(), UMLPackage::removeAllObjects(), removeAllViews(), UMLApp::setGenerator(), UMLFolder::setLocalName(), UMLListViewItem::setUMLObject(), UMLObject::setUMLPackage(), and UMLListView::theDatatypeFolder().

Referenced by loadRedoData(), loadUndoData(), newDocument(), openDocument(), and saveModified().

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 337 of file umldoc.cpp.

References addDefaultStereotypes(), addToUndoStack(), clearUndoStack(), closeDocument(), UMLApp::enableUndo(), Import_Rose::loadFromMDL(), loadFromXMI(), newDocument(), and setModified().

Referenced by UMLApp::openDocumentFile(), UMLApp::readProperties(), UMLApp::slotFileOpen(), and UMLApp::slotFileOpenRecent().

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.

Definition at line 506 of file umldoc.cpp.

References saveToXMI(), and setModified().

Referenced by saveModified(), UMLApp::saveProperties(), slotAutoSave(), UMLApp::slotFileSave(), and UMLApp::slotFileSaveAs().

const KURL & UMLDoc::URL  )  const
 

Returns the KURL of the document.

Returns:
The KURL of this UMLDoc.

Definition at line 219 of file umldoc.cpp.

Referenced by UMLViewImageExporterAll::exportAllViews(), DocbookGenerator::generateDocbookForProject(), DocbookGenerator::generateDocbookForProjectInto(), XhtmlGenerator::generateXhtmlForProject(), UMLApp::initView(), UMLFolder::load(), UMLApp::openDocumentFile(), UMLListView::popupMenuSel(), saveModified(), UMLApp::saveOptions(), UMLApp::saveProperties(), UMLFolder::saveToXMI(), UMLApp::setModified(), XhtmlGenerator::slotDocbookToXhtml(), UMLApp::slotFileNew(), UMLApp::slotFileOpen(), UMLApp::slotFileOpenRecent(), UMLApp::slotFilePrint(), and UMLApp::slotFileSave().

void UMLDoc::setURL const KURL &  url  ) 
 

Sets the URL of the document.

Parameters:
url The KURL to set.

Definition at line 214 of file umldoc.cpp.

Referenced by slotAutoSave().

void UMLDoc::setupSignals  ) 
 

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

Definition at line 648 of file umldoc.cpp.

Referenced by UMLApp::initView().

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 768 of file umldoc.cpp.

References UMLApp::getListView(), UMLListViewItem::getType(), and UMLListViewItem::getUMLObject().

Referenced by UMLListViewItem::okRename(), renameUMLObject(), and Model_Utils::uniqObjectName().

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.
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 832 of file umldoc.cpp.

References addStereotype(), and findStereotype().

Referenced by UMLObject::setStereotype().

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 882 of file umldoc.cpp.

References addAssociation(), and findAssociation().

Referenced by AssociationWidget::loadFromXMI().

void UMLDoc::addAssociation UMLAssociation pAssoc  ) 
 

Adds an association.

Parameters:
pAssoc Pointer to the UMLAssociation to add.

Definition at line 893 of file umldoc.cpp.

References UMLPackage::addObject(), getAssociations(), UMLObject::getName(), UMLObject::getUMLPackage(), and setModified().

Referenced by Import_Utils::createGeneralization(), createUMLAssociation(), Import_Utils::createUMLObject(), AdaImport::parseStmt(), and Import_Rose::umbrellify().

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 843 of file umldoc.cpp.

References UMLObject::getName(), UMLObject::getUMLPackage(), UMLPackage::removeObject(), and setModified().

Referenced by UMLView::removeAssocInViewAndDoc(), and removeUMLObject().

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 860 of file umldoc.cpp.

References getAssociations(), UMLAssociation::getAssocType(), and UMLAssociation::getObject().

Referenced by AssociationWidget::AssociationWidget(), createUMLAssociation(), and Import_Utils::createUMLObject().

void 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.

Definition at line 969 of file umldoc.cpp.

References addView(), changeCurrentView(), UMLApp::enablePrint(), findView(), UMLView::getID(), UMLView::setID(), setModified(), UMLView::setName(), UMLView::setType(), and uniqViewName().

Referenced by loadFromXMI(), newDocument(), UMLListView::popupMenuSel(), removeView(), UMLApp::slotActivityDiagram(), UMLApp::slotClassDiagram(), UMLApp::slotCollaborationDiagram(), UMLApp::slotComponentDiagram(), UMLApp::slotDeploymentDiagram(), UMLApp::slotEntityRelationshipDiagram(), UMLApp::slotSequenceDiagram(), UMLApp::slotStateDiagram(), and UMLApp::slotUseCaseDiagram().

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 1131 of file umldoc.cpp.

References UMLObject::getBaseType(), UMLApp::getDocWindow(), UMLObject::getName(), UMLObject::getUMLPackage(), removeAssociation(), UMLClassifier::removeAttribute(), UMLEntity::removeEntityAttribute(), UMLEnum::removeEnumLiteral(), UMLPackage::removeObject(), UMLClassifier::removeOperation(), UMLClassifier::removeTemplate(), setModified(), and DocWindow::updateDocumentation().

Referenced by UMLListView::deleteItem(), and ClassifierListPage::slotDelete().

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 1003 of file umldoc.cpp.

References findView(), UMLView::getName(), UMLView::getType(), setModified(), and UMLView::setName().

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 1028 of file umldoc.cpp.

References UMLView::getName(), isUnique(), setModified(), and UMLView::setName().

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 1048 of file umldoc.cpp.

References UMLCanvasObject::findChildObject(), UMLView::getName(), setModified(), and UMLView::setName().

Referenced by ClassifierListPage::slotPopupMenuSel().

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 1078 of file umldoc.cpp.

References findView(), UMLView::getType(), UMLApp::setCurrentView(), UMLApp::setDiagramMenuItemsState(), setModified(), and sigCurrentViewChanged().

Referenced by createDiagram(), NoteWidgetController::doMouseDoubleClick(), loadFromXMI(), loadRedoData(), loadUndoData(), removeView(), UMLView::slotActivate(), and UMLApp::slotTabChanged().

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 1090 of file umldoc.cpp.

References findView(), UMLApp::getDocWindow(), UMLView::getName(), removeView(), setModified(), and DocWindow::updateDocumentation().

Referenced by UMLListView::deleteItem(), UMLApp::slotDeleteDiagram(), and UMLView::slotMenuSelection().

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 674 of file umldoc.cpp.

References UMLPackage::findObjectById(), and findStereotypeById().

Referenced by UMLWidget::activate(), AssociationWidget::activate(), UMLView::addWidget(), UMLView::contentsDragEnterEvent(), UMLView::contentsDropEvent(), UMLListView::createItem(), UMLRole::load(), UMLFolder::load(), UMLAssociation::load(), RubyClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaANTCodeDocument::loadChildTextBlocksFromNode(), CPPHeaderCodeDocument::loadChildTextBlocksFromNode(), CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode(), UMLListViewItem::loadFromXMI(), loadFromXMI(), AssociationWidget::loadFromXMI(), Widget_Factory::makeWidgetFromXMI(), UMLListView::moveObject(), UMLObject::resolveRef(), OwnedCodeBlock::setAttributesFromNode(), CodeParameter::setAttributesFromNode(), and CodeDocument::setAttributesFromNode().

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 695 of file umldoc.cpp.

References UMLPackage::containedObjects(), UMLPackage::findObject(), Model_Utils::findUMLObject(), and getName().

Referenced by UMLEntityAttributeDialog::apply(), UMLAttributeDialog::apply(), Import_Utils::createUMLObject(), findUMLClassifier(), Import_Utils::isDatatype(), UMLListView::isUnique(), Model_Utils::parseAttribute(), Model_Utils::parseOperation(), AdaImport::parseStmt(), Model_Utils::parseTemplate(), UMLObject::resolveRef(), CodeDocument::setAttributesFromNode(), UMLObject::setPackage(), UMLClassifierListItem::setTypeName(), and ClassGenPage::updateObject().

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 713 of file umldoc.cpp.

References findUMLObject().

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 823 of file umldoc.cpp.

References UMLObject::getName().

Referenced by findOrCreateStereotype(), loadUMLObjectsFromXMI(), and UMLStereotype::UMLStereotype().

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 658 of file umldoc.cpp.

References UMLFolder::findView().

Referenced by addUMLView(), changeCurrentView(), createDiagram(), UMLListView::createItem(), UMLListView::isUnique(), loadFromXMI(), UMLListView::popupMenuSel(), print(), removeDiagram(), renameDiagram(), NoteWidget::setDiagramLink(), UMLListView::slotDiagramRenamed(), and uniqViewName().

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 668 of file umldoc.cpp.

References Model_Utils::convert_DT_MT(), and UMLFolder::findView().

void UMLDoc::setName const QString &  name  ) 
 

Set the name of this model.

Definition at line 1195 of file umldoc.cpp.

Referenced by DocbookGenerator::generateDocbookForProjectInto(), and UMLListView::popupMenuSel().

QString UMLDoc::getName  )  const
 

Return the name of this model.

Definition at line 1199 of file umldoc.cpp.

Referenced by UMLView::addWidget(), Model_Utils::convert_OT_LVT(), findUMLObject(), loadUMLObjectsFromXMI(), and UMLListView::popupMenuSel().

Uml::IDType UMLDoc::getModelID  )  const
 

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

Definition at line 1203 of file umldoc.cpp.

Referenced by UMLObject::save().

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.

Definition at line 1207 of file umldoc.cpp.

References UMLApp::getCurrentView(), UMLApp::getGenerator(), UMLView::getID(), UMLObject::getID(), UMLApp::getListView(), UMLObject::getName(), CodeGenerator::saveToXMI(), UMLListView::saveToXMI(), UMLFolder::saveToXMI(), and UMLPackage::saveToXMI().

Referenced by addToUndoStack(), DocbookGenerator::generateDocbookForProjectInto(), and saveDocument().

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 1352 of file umldoc.cpp.

Referenced by loadFromXMI().

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 1427 of file umldoc.cpp.

References activateAllViews(), changeCurrentView(), createDiagram(), findObjectById(), findView(), getEncoding(), UMLApp::getListView(), loadExtensionsFromXMI(), loadUMLObjectsFromXMI(), resolveTypes(), UMLObject::setDoc(), UMLApp::setGenerator(), sigResetStatusbarProgress(), sigWriteToStatusBar(), UMLApp::tabWidget(), Uml::tagEq(), and validateXMIHeader().

Referenced by loadExtensionsFromXMI(), loadRedoData(), loadUMLObjectsFromXMI(), loadUndoData(), and openDocument().

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 1612 of file umldoc.cpp.

Referenced by loadFromXMI().

bool UMLDoc::loadUMLObjectsFromXMI QDomElement &  element  ) 
 

Loads all UML objects from XMI into the current UMLDoc.

Returns:
True if operation successful.

Definition at line 1629 of file umldoc.cpp.

References UMLPackage::addObject(), addStereotype(), findStereotype(), UMLObject::getBaseType(), UMLObject::getID(), UMLObject::getName(), getName(), UMLObject::getUMLPackage(), Model_Utils::guessContainer(), loadFromXMI(), UMLObject::loadFromXMI(), UMLObject::setUMLPackage(), sigWriteToStatusBar(), and Uml::tagEq().

Referenced by loadFromXMI().

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 1755 of file umldoc.cpp.

References UMLApp::getDocWindow(), UMLApp::getListView(), loadDiagramsFromXMI(), CodeGenerator::loadFromXMI(), loadFromXMI(), resolveTypes(), UMLApp::setGenerator(), and Model_Utils::stringToProgLang().

Referenced by loadFromXMI().

bool UMLDoc::loadDiagramsFromXMI QDomNode &  node  ) 
 

Loads all diagrams from XMI into the current UMLDoc.

Returns:
True if operation successful.

Definition at line 1812 of file umldoc.cpp.

References addView(), Model_Utils::convert_DT_MT(), UMLView::getType(), UMLView::loadFromXMI(), UMLView::loadUISDiagram(), UMLView::setFolder(), sigResetStatusbarProgress(), sigSetStatusbarProgress(), sigSetStatusbarProgressSteps(), and sigWriteToStatusBar().

Referenced by loadExtensionsFromXMI().

void UMLDoc::signalDiagramRenamed UMLView pView  ) 
 

Signal a view/diagram has been renamed.

Definition at line 2139 of file umldoc.cpp.

References UMLApp::tabWidget().

Referenced by UMLViewDialog::checkName(), UMLListViewItem::okRename(), and UMLView::slotMenuSelection().

void UMLDoc::removeAllViews  ) 
 

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

Definition at line 1858 of file umldoc.cpp.

References UMLFolder::removeAllViews(), UMLApp::setCurrentView(), and UMLApp::setDiagramMenuItemsState().

Referenced by closeDocument().

void UMLDoc::signalUMLObjectCreated UMLObject o  ) 
 

Signal that a UMLObject has been created.

Parameters:
o The object that has been created.

Definition at line 1185 of file umldoc.cpp.

Referenced by ClassWizard::accept(), UMLView::addObject(), UMLEntity::createAttribute(), UMLClassifier::createAttribute(), UMLEnum::createEnumLiteral(), UMLClassifier::createOperation(), UMLClassifier::createTemplate(), and UMLObject::maybeSignalObjectCreated().

UMLFolder* UMLDoc::getDatatypeFolder  )  [inline]
 

Returns the datatype folder.

Returns:
Pointer to the predefined folder for datatypes.

Definition at line 482 of file umldoc.h.

Referenced by Import_Utils::createUMLObject(), UMLObject::getFullyQualifiedName(), UMLListView::init(), UMLFolder::load(), and UMLObject::resolveRef().

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 1866 of file umldoc.cpp.

References UMLPackage::appendClassifiers().

Referenced by UMLTemplateDialog::apply(), ParmPropDlg::ParmPropDlg(), UMLTemplateDialog::setupDialog(), UMLOperationDialog::setupDialog(), and UMLAttributeDialog::setupDialog().

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 1872 of file umldoc.cpp.

References UMLPackage::appendClasses().

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 1878 of file umldoc.cpp.

References UMLPackage::appendClassesAndInterfaces().

Referenced by CodeGenerator::initFromParentDocument(), and SimpleCodeGenerator::writeCodeToFile().

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 1884 of file umldoc.cpp.

References UMLPackage::appendInterfaces().

UMLClassifierList UMLDoc::getDatatypes  ) 
 

Returns a list of the datatypes in this UMLDoc.

Returns:
List of datatypes.

Definition at line 1890 of file umldoc.cpp.

References UMLPackage::containedObjects(), and UMLObject::getBaseType().

Referenced by UMLEntityAttributeDialog::apply(), and UMLEntityAttributeDialog::setupDialog().

UMLAssociationList UMLDoc::getAssociations  ) 
 

Returns a list of the associations in this UMLDoc.

Returns:
List of UML associations.

Definition at line 1902 of file umldoc.cpp.

References UMLCanvasObject::getAssociations().

Referenced by addAssociation(), and findAssociation().

void UMLDoc::print KPrinter *  pPrinter  ) 
 

Controls the printing of the program.

Parameters:
pPrinter The printer (object) to use.

Definition at line 1913 of file umldoc.cpp.

References findView(), and UMLView::print().

UMLViewList UMLDoc::getViewIterator  ) 
 

Return the list of views for this document.

Returns:
List of UML views.

Definition at line 1932 of file umldoc.cpp.

References UMLFolder::appendViews().

Referenced by UMLViewImageExporterModel::exportAllViews(), UMLApp::slotChangeTabLeft(), UMLApp::slotChangeTabRight(), and UMLApp::slotUpdateViews().

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 1951 of file umldoc.cpp.

References assignNewID(), UMLClassifier::getFilteredList(), UMLObject::getID(), UMLObject::setID(), and setModified().

Referenced by UMLDrag::decodeClip1().

bool UMLDoc::addUMLObject UMLObject object  ) 
 

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.

Definition at line 724 of file umldoc.cpp.

References UMLPackage::addObject(), currentRoot(), UMLObject::getBaseType(), UMLObject::getName(), UMLObject::getUMLPackage(), and UMLObject::setUMLPackage().

Referenced by UMLView::addObject(), and Import_Rose::umbrellify().

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.

Parameters:
pView Pointer to the UMLView to add.
Returns:
True if operation successful.

Definition at line 2044 of file umldoc.cpp.

References addView(), assignNewID(), findView(), and setModified().

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

Return the predefined root folder of the given type.

Definition at line 1988 of file umldoc.cpp.

Referenced by Import_Utils::createGeneralization(), Import_Utils::createUMLObject(), UMLListView::init(), UMLFolder::load(), UMLAssociation::load(), AdaImport::parseStmt(), UMLApp::slotActivityDiagram(), UMLApp::slotClassDiagram(), UMLApp::slotCollaborationDiagram(), UMLApp::slotComponentDiagram(), UMLApp::slotDeploymentDiagram(), UMLApp::slotEntityRelationshipDiagram(), UMLApp::slotSequenceDiagram(), UMLApp::slotStateDiagram(), UMLApp::slotUseCaseDiagram(), ClassGenPage::updateObject(), and CSharpWriter::writeClass().

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 1996 of file umldoc.cpp.

Referenced by Model_Utils::convert_OT_LVT(), UMLObject::getFullyQualifiedName(), Model_Utils::guessContainer(), UMLObject::loadFromXMI(), and UMLFolder::save().

UMLFolder * UMLDoc::currentRoot  ) 
 

Return the currently selected root folder.

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

Definition at line 1111 of file umldoc.cpp.

References UMLApp::getCurrentView(), UMLView::getFolder(), and UMLObject::getUMLPackage().

Referenced by addUMLObject(), and UMLAssociation::init().

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 1127 of file umldoc.cpp.

Referenced by Import_Rose::petalTree2Uml().

IDChangeLog * UMLDoc::getChangeLog  )  [virtual]
 

Read property of IDChangeLog* m_pChangeLog.

Returns:
Pointer to the IDChangeLog object.

Definition at line 2006 of file umldoc.cpp.

Referenced by UMLView::activate().

void UMLDoc::endPaste  ) 
 

Closes a paste session, deletes the ChangeLog.

Definition at line 2023 of file umldoc.cpp.

Referenced by UMLClipboard::paste().

void UMLDoc::beginPaste  ) 
 

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

Definition at line 2013 of file umldoc.cpp.

Referenced by UMLClipboard::paste().

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

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 2032 of file umldoc.cpp.

References IDChangeLog::addIDChange().

Referenced by addUMLView(), UMLView::addWidget(), and assignNewIDs().

QString UMLDoc::getDocumentation  )  const [inline]
 

Returns the documentation for the project.

Returns:
The documentation text of this UMLDoc.

Definition at line 641 of file umldoc.h.

Referenced by DocWindow::newDocumentation(), DocWindow::showDocumentation(), and DocWindow::updateDocumentation().

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 650 of file umldoc.h.

Referenced by DocWindow::updateDocumentation().

void UMLDoc::activateAllViews  ) 
 

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

Definition at line 2067 of file umldoc.cpp.

References UMLFolder::activateViews().

Referenced by loadFromXMI().

void UMLDoc::settingsChanged Settings::OptionState  optionState  ) 
 

Sets the default settings to the given settings.

Definition at line 2077 of file umldoc.cpp.

References UMLFolder::setViewOptions().

int UMLDoc::getFileVersion void   )  [inline]
 

Returns the version of the old UML files.

Definition at line 669 of file umldoc.h.

void UMLDoc::loadUndoData  ) 
 

Performs the undo function, loading the document back to the state is was before the last addToUndoStack().

Definition at line 2178 of file umldoc.cpp.

References changeCurrentView(), closeDocument(), UMLApp::enableRedo(), UMLApp::enableUndo(), UMLApp::getCurrentView(), UMLView::getID(), loadFromXMI(), UMLView::resizeCanvasToItems(), and setModified().

Referenced by UMLApp::slotEditUndo(), and UMLView::slotMenuSelection().

void UMLDoc::loadRedoData  ) 
 

Performs the redo function, loading the document back to the state is was before the last undo().

Definition at line 2227 of file umldoc.cpp.

References changeCurrentView(), closeDocument(), UMLApp::enableRedo(), UMLApp::enableUndo(), UMLApp::getCurrentView(), UMLView::getID(), loadFromXMI(), UMLView::resizeCanvasToItems(), and setModified().

Referenced by UMLApp::slotEditRedo(), and UMLView::slotMenuSelection().

void UMLDoc::addToUndoStack  ) 
 

Takes an image of the document and adds it to the UndoStack.

Implemented using the saveToXMI functions.

Definition at line 2146 of file umldoc.cpp.

References UMLApp::enableUndo(), and saveToXMI().

Referenced by newDocument(), openDocument(), and setModified().

void UMLDoc::clearUndoStack  ) 
 

Removes all entries from the UndoStack and RedoStack and disables the undo and redo actions.

Definition at line 2163 of file umldoc.cpp.

References clearRedoStack(), and UMLApp::enableRedo().

Referenced by newDocument(), and openDocument().

void UMLDoc::clearRedoStack  ) 
 

Removes all entries from the RedoStack and disables the redo action.

Definition at line 2171 of file umldoc.cpp.

References UMLApp::enableRedo().

Referenced by clearUndoStack(), and setModified().

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 931 of file umldoc.cpp.

References findView().

Referenced by createDiagram(), and UMLListView::getUniqueDiagramName().

bool UMLDoc::loading  )  const
 

Returns true when loading a document file.

Definition at line 961 of file umldoc.cpp.

Referenced by UMLView::addAssociation(), UMLWidget::adjustAssocs(), ClassifierWidget::adjustAssocs(), UMLListView::childObjectAdded(), UMLListView::createChildUMLObject(), UMLObject::emitModified(), LinePath::insertPoint(), UMLListView::moveObject(), UMLAssociation::setAssocType(), UMLWidget::setFont(), UMLListView::slotDiagramCreated(), UMLListView::slotObjectChanged(), UMLListView::slotObjectCreated(), UMLListView::slotObjectRemoved(), UMLWidget::updateComponentSize(), and AssociationWidget::widgetMoved().

void UMLDoc::setLoading bool  state = true  ) 
 

Sets loading boolean flag to the value given.

Definition at line 965 of file umldoc.cpp.

Referenced by UMLApp::slotImportClasses().

void UMLDoc::addDefaultDatatypes  ) 
 

Calls the active code generator to create its default datatypes.

Definition at line 2264 of file umldoc.cpp.

References createDatatype(), CodeGenerator::defaultDatatypes(), and UMLApp::getGenerator().

Referenced by newDocument(), UMLEntityAttributeDialog::setupDialog(), and UMLApp::slotAddDefaultDatatypes().

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 2277 of file umldoc.cpp.

References UMLListView::closeDatatypesFolder(), UMLPackage::containedObjects(), Model_Utils::findUMLObject(), and UMLApp::getListView().

Referenced by addDefaultDatatypes().

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

Find a UMLStereotype by its unique ID.

Definition at line 687 of file umldoc.cpp.

Referenced by findObjectById(), and UMLObject::loadFromXMI().

void UMLDoc::addStereotype const UMLStereotype s  ) 
 

Add a UMLStereotype to the application.

Definition at line 742 of file umldoc.cpp.

Referenced by findOrCreateStereotype(), and loadUMLObjectsFromXMI().

void UMLDoc::removeStereotype const UMLStereotype s  ) 
 

Remove a UMLStereotype from the application.

Definition at line 747 of file umldoc.cpp.

Referenced by UMLObject::setUMLStereotype().

void UMLDoc::addDefaultStereotypes  ) 
 

Add a stereotype if it doesn't already exist.

Used by code generators, operations and attribute dialog.

Definition at line 2346 of file umldoc.cpp.

References CodeGenerator::createDefaultStereotypes(), and UMLApp::getGenerator().

Referenced by newDocument(), and openDocument().

const UMLStereotypeList & UMLDoc::getStereotypes  ) 
 

Returns a list of the stereotypes in this UMLDoc.

Returns:
List of UML stereotypes.

Definition at line 2352 of file umldoc.cpp.

Referenced by ClassGenPage::ClassGenPage(), ParmPropDlg::ParmPropDlg(), and UMLOperationDialog::setupDialog().

void UMLDoc::writeToStatusBar const QString &  text  ) 
 

Write text to the status bar.

Definition at line 752 of file umldoc.cpp.

References sigWriteToStatusBar().

Referenced by UMLViewImageExporterAll::exportAllViews(), UMLViewImageExporter::exportView(), DocbookGenerator::generateDocbookForProjectInto(), ClassImport::importFiles(), UMLWidgetController::mouseMoveEvent(), UMLWidgetController::mouseReleaseEvent(), UMLWidgetController::resize(), and resolveTypes().

void UMLDoc::resolveTypes  ) 
 

Type resolution pass.

Definition at line 1594 of file umldoc.cpp.

References UMLObject::getID(), UMLObject::getName(), UMLPackage::resolveRef(), and writeToStatusBar().

Referenced by loadExtensionsFromXMI(), loadFromXMI(), and Import_Rose::petalTree2Uml().

void UMLDoc::slotAutoSave  )  [slot]
 

Called after a specified time to autosave the document.

Definition at line 2099 of file umldoc.cpp.

References isModified(), saveDocument(), UMLApp::setModified(), and setURL().

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

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

Definition at line 2287 of file umldoc.cpp.

References UMLView::getType().

void UMLDoc::sigResetStatusbarProgress  )  [signal]
 

Reset the status bar.

Referenced by loadDiagramsFromXMI(), and loadFromXMI().

void UMLDoc::sigSetStatusbarProgressSteps int  totalSteps  )  [signal]
 

Set the total range of the progressbar.

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

Referenced by loadDiagramsFromXMI().

void UMLDoc::sigSetStatusbarProgress int  stepPosition  )  [signal]
 

Set the progress position of the progressbar.

Parameters:
stepPosition The step position to set.

Referenced by loadDiagramsFromXMI().

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

Write text to the status bar.

Referenced by loadDiagramsFromXMI(), loadFromXMI(), loadUMLObjectsFromXMI(), and writeToStatusBar().

void UMLDoc::sigCurrentViewChanged  )  [signal]
 

The diagram being displayed has changed.

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

Referenced by changeCurrentView(), and init().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:06 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003