UMLDoc Class Reference
UMLDoc provides a document object for a document-view model. More...
#include <umldoc.h>
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. | |
| UMLStereotype * | findOrCreateStereotype (const QString &name) |
| Finds or creates a stereotype for the parent object. | |
| UMLAssociation * | createUMLAssociation (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. | |
| UMLAssociation * | findAssociation (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. | |
| UMLObject * | findObjectById (Uml::IDType id) |
| Used to find a reference to a UMLObject by its ID. | |
| UMLObject * | findUMLObject (const QString &name, Uml::Object_Type type=Uml::ot_UMLObject, UMLObject *currentObj=NULL) |
| Used to find a UMLObject by its type and name. | |
| UMLObject * | findObjectByAuxId (const QString &idStr) |
| Used to find a reference to a UMLObject given its non-numeric ID string. | |
| UMLClassifier * | findUMLClassifier (const QString &name) |
| Used to find a UMLClassifier by its name. | |
| UMLStereotype * | findStereotype (const QString &name) |
| Finds a UMLStereotype by its name. | |
| UMLView * | findView (Uml::IDType id) |
| Finds a view (diagram) by the ID given to method. | |
| UMLView * | findView (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. | |
| UMLFolder * | getDatatypeFolder () |
| 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. | |
| UMLFolder * | getRootFolder (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. | |
| UMLFolder * | currentRoot () |
| Return the currently selected root folder. | |
| void | setCurrentRoot (Uml::Model_Type rootType) |
| Set the current root folder. | |
| virtual IDChangeLog * | getChangeLog () |
| 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. | |
| UMLStereotype * | findStereotypeById (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
|
|
Constructor for the fileclass of the application.
Definition at line 81 of file umldoc.cpp. |
|
|
Destructor for the fileclass of the application.
Definition at line 129 of file umldoc.cpp. |
Member Function Documentation
|
|
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(). |
|
|
Adds a view to the document which represents the document contents. Usually this is your main view.
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(). |
|
||||||||||||
|
Removes a view from the list of currently connected views.
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(). |
|
|
Sets m_nViewID.
Definition at line 1751 of file umldoc.cpp. Referenced by UMLView::loadUISDiagram(). |
|
||||||||||||
|
|
Returns if the document is modified or not. Use this to determine if your document needs saving by the user on closing.
Definition at line 135 of file umldoc.h. Referenced by UMLApp::saveProperties(), slotAutoSave(), and UMLApp::slotFileSaveAs(). |
|
|
"save modified" - Asks the user for saving if the document is modified.
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(). |
|
|
Initializes the document generally.
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(). |
|
|
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(). |
|
||||||||||||
|
Loads the document by filename and format and emits the updateViews() signal.
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(). |
|
||||||||||||
|
Saves the document using the given filename and format.
Definition at line 506 of file umldoc.cpp. References saveToXMI(), and setModified(). Referenced by saveModified(), UMLApp::saveProperties(), slotAutoSave(), UMLApp::slotFileSave(), and UMLApp::slotFileSaveAs(). |
|
|
Returns the KURL of the document.
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(). |
|
|
Sets the URL of the document.
Definition at line 214 of file umldoc.cpp. Referenced by slotAutoSave(). |
|
|
Sets up the signals needed by the program for it to work.
Definition at line 648 of file umldoc.cpp. Referenced by UMLApp::initView(). |
|
|
Returns true if the given name is unique within its scope.
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(). |
|
||||||||||||
|
Returns true if the given name is unique within its scope of given package.
Definition at line 804 of file umldoc.cpp. |
|
|
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(). |
|
||||||||||||||||
|
Creates an association between two UMLObjects. NOTE: this method does not check if the association is valid / legal
Definition at line 882 of file umldoc.cpp. References addAssociation(), and findAssociation(). Referenced by AssociationWidget::loadFromXMI(). |
|
|
Adds an association.
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(). |
|
||||||||||||
|
Removes an association.
Definition at line 843 of file umldoc.cpp. References UMLObject::getName(), UMLObject::getUMLPackage(), UMLPackage::removeObject(), and setModified(). Referenced by UMLView::removeAssocInViewAndDoc(), and removeUMLObject(). |
|
||||||||||||||||||||
|
Finds an association.
Definition at line 860 of file umldoc.cpp. References getAssociations(), UMLAssociation::getAssocType(), and UMLAssociation::getObject(). Referenced by AssociationWidget::AssociationWidget(), createUMLAssociation(), and Import_Utils::createUMLObject(). |
|
||||||||||||||||
|
Creates a diagram of the given type.
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(). |
|
|
Removes an UMLObject from the current file. If this object is being represented on a diagram it will also delete all those representations.
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(). |
|
|
Used to rename a document. This method takes care of everything. You just need to give the ID of the diagram to the method.
Definition at line 1003 of file umldoc.cpp. References findView(), UMLView::getName(), UMLView::getType(), setModified(), and UMLView::setName(). |
|
|
Used to rename a UMLObject. The UMLObject is to be an actor, use case or concept.
Definition at line 1028 of file umldoc.cpp. References UMLView::getName(), isUnique(), setModified(), and UMLView::setName(). |
|
|
Used to rename an operation or attribute of a concept.
Definition at line 1048 of file umldoc.cpp. References UMLCanvasObject::findChildObject(), UMLView::getName(), setModified(), and UMLView::setName(). Referenced by ClassifierListPage::slotPopupMenuSel(). |
|
|
Changes the current view (diagram) to the view with the given ID.
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(). |
|
|
Deletes a diagram from the current file.
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(). |
|
|
Used to find a reference to a UMLObject by its ID.
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(). |
|
||||||||||||||||
|
Used to find a UMLObject by its type and name.
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(). |
|
|
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.
|
|
|
Used to find a UMLClassifier by its name.
Definition at line 713 of file umldoc.cpp. References findUMLObject(). |
|
|
Finds a UMLStereotype by its name.
Definition at line 823 of file umldoc.cpp. References UMLObject::getName(). Referenced by findOrCreateStereotype(), loadUMLObjectsFromXMI(), and UMLStereotype::UMLStereotype(). |
|
|
Finds a view (diagram) by the ID given to method.
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(). |
|
||||||||||||||||
|
Finds a view (diagram) by the type and name given.
Definition at line 668 of file umldoc.cpp. References Model_Utils::convert_DT_MT(), and UMLFolder::findView(). |
|
|
Set the name of this model.
Definition at line 1195 of file umldoc.cpp. Referenced by DocbookGenerator::generateDocbookForProjectInto(), and UMLListView::popupMenuSel(). |
|
|
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(). |
|
|
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(). |
|
|
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.
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(). |
|
|
Checks the given XMI file if it was saved with correct Unicode encoding set or not.
Definition at line 1352 of file umldoc.cpp. Referenced by loadFromXMI(). |
|
||||||||||||
|
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.
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(). |
|
|
Ensures the XMI file is a valid UML file. Currently only checks for metamodel=UML.
Definition at line 1612 of file umldoc.cpp. Referenced by loadFromXMI(). |
|
|
Loads all UML objects from XMI into the current UMLDoc.
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(). |
|
|
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(). |
|
|
Loads all diagrams from XMI into the current UMLDoc.
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(). |
|
|
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(). |
|
|
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(). |
|
|
Signal that a UMLObject 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(). |
|
|
Returns the datatype folder.
Definition at line 482 of file umldoc.h. Referenced by Import_Utils::createUMLObject(), UMLObject::getFullyQualifiedName(), UMLListView::init(), UMLFolder::load(), and UMLObject::resolveRef(). |
|
|
Returns a list of the concepts in this UMLDoc.
Definition at line 1866 of file umldoc.cpp. References UMLPackage::appendClassifiers(). Referenced by UMLTemplateDialog::apply(), ParmPropDlg::ParmPropDlg(), UMLTemplateDialog::setupDialog(), UMLOperationDialog::setupDialog(), and UMLAttributeDialog::setupDialog(). |
|
|
Returns a list of the classes in this UMLDoc.
Definition at line 1872 of file umldoc.cpp. References UMLPackage::appendClasses(). |
|
|
Returns a list of the classes and interfaces in this UMLDoc.
Definition at line 1878 of file umldoc.cpp. References UMLPackage::appendClassesAndInterfaces(). Referenced by CodeGenerator::initFromParentDocument(), and SimpleCodeGenerator::writeCodeToFile(). |
|
|
Returns a list of the interfaces in this UMLDoc.
Definition at line 1884 of file umldoc.cpp. References UMLPackage::appendInterfaces(). |
|
|
Returns a list of the datatypes in this UMLDoc.
Definition at line 1890 of file umldoc.cpp. References UMLPackage::containedObjects(), and UMLObject::getBaseType(). Referenced by UMLEntityAttributeDialog::apply(), and UMLEntityAttributeDialog::setupDialog(). |
|
|
Returns a list of the associations in this UMLDoc.
Definition at line 1902 of file umldoc.cpp. References UMLCanvasObject::getAssociations(). Referenced by addAssociation(), and findAssociation(). |
|
|
Controls the printing of the program.
Definition at line 1913 of file umldoc.cpp. References findView(), and UMLView::print(). |
|
|
Return the list of views for this document.
Definition at line 1932 of file umldoc.cpp. References UMLFolder::appendViews(). Referenced by UMLViewImageExporterModel::exportAllViews(), UMLApp::slotChangeTabLeft(), UMLApp::slotChangeTabRight(), and UMLApp::slotUpdateViews(). |
|
|
Assigns an already created UMLObject a new ID. If the object is a classifier then the operations/attributes are also assigned new IDs.
Definition at line 1951 of file umldoc.cpp. References assignNewID(), UMLClassifier::getFilteredList(), UMLObject::getID(), UMLObject::setID(), and setModified(). Referenced by UMLDrag::decodeClip1(). |
|
|
Adds a UMLObject thats already created but doesn't change any ids or signal. Use AddUMLObjectPaste if pasting.
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(). |
|
|
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.
Definition at line 2044 of file umldoc.cpp. References addView(), assignNewID(), findView(), and setModified(). |
|
|
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(). |
|
|
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(). |
|
|
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(). |
|
|
Set the current root folder.
Definition at line 1127 of file umldoc.cpp. Referenced by Import_Rose::petalTree2Uml(). |
|
|
Read property of IDChangeLog* m_pChangeLog.
Definition at line 2006 of file umldoc.cpp. Referenced by UMLView::activate(). |
|
|
Closes a paste session, deletes the ChangeLog.
Definition at line 2023 of file umldoc.cpp. Referenced by UMLClipboard::paste(). |
|
|
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(). |
|
|
Assigns a New ID to an Object, and also logs the assignment to its internal ChangeLog.
Definition at line 2032 of file umldoc.cpp. References IDChangeLog::addIDChange(). Referenced by addUMLView(), UMLView::addWidget(), and assignNewIDs(). |
|
|
Returns the documentation for the project.
Definition at line 641 of file umldoc.h. Referenced by DocWindow::newDocumentation(), DocWindow::showDocumentation(), and DocWindow::updateDocumentation(). |
|
|
Sets the documentation for the project.
Definition at line 650 of file umldoc.h. Referenced by DocWindow::updateDocumentation(). |
|
|
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(). |
|
|
Sets the default settings to the given settings.
Definition at line 2077 of file umldoc.cpp. References UMLFolder::setViewOptions(). |
|
|
Returns the version of the old UML files.
|
|
|
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(). |
|
|
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(). |
|
|
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(). |
|
|
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(). |
|
|
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(). |
|
|
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(). |
|
|
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(). |
|
|
Sets loading boolean flag to the value given.
Definition at line 965 of file umldoc.cpp. Referenced by UMLApp::slotImportClasses(). |
|
|
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(). |
|
|
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(). |
|
|
Find a UMLStereotype by its unique ID.
Definition at line 687 of file umldoc.cpp. Referenced by findObjectById(), and UMLObject::loadFromXMI(). |
|
|
Add a UMLStereotype to the application.
Definition at line 742 of file umldoc.cpp. Referenced by findOrCreateStereotype(), and loadUMLObjectsFromXMI(). |
|
|
Remove a UMLStereotype from the application.
Definition at line 747 of file umldoc.cpp. Referenced by UMLObject::setUMLStereotype(). |
|
|
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(). |
|
|
Returns a list of the stereotypes in this UMLDoc.
Definition at line 2352 of file umldoc.cpp. Referenced by ClassGenPage::ClassGenPage(), ParmPropDlg::ParmPropDlg(), and UMLOperationDialog::setupDialog(). |
|
|
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(). |
|
|
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(). |
|
|
Called after a specified time to autosave the document.
Definition at line 2099 of file umldoc.cpp. References isModified(), saveDocument(), UMLApp::setModified(), and setURL(). |
|
||||||||||||
|
Make a popup menu for the tabs signalled from tabWidget's contextMenu().
Definition at line 2287 of file umldoc.cpp. References UMLView::getType(). |
|
|
Reset the status bar.
Referenced by loadDiagramsFromXMI(), and loadFromXMI(). |
|
|
Set the total range of the progressbar.
Referenced by loadDiagramsFromXMI(). |
|
|
Set the progress position of the progressbar.
Referenced by loadDiagramsFromXMI(). |
|
|
Write text to the status bar.
Referenced by loadDiagramsFromXMI(), loadFromXMI(), loadUMLObjectsFromXMI(), and writeToStatusBar(). |
|
|
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:
