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

umbrello/umbrello

Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
UMLDoc Class Reference

#include <umldoc.h>

Inheritance diagram for UMLDoc:
Inheritance graph
[legend]

Public Slots

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

Signals

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

Public Member Functions

 UMLDoc ()
 
 ~UMLDoc ()
 
void activateAllViews ()
 
void addAssociation (UMLAssociation *assoc)
 
void addDefaultDatatypes ()
 
void addDefaultStereotypes ()
 
void addStereotype (UMLStereotype *s)
 
bool addUMLObject (UMLObject *object)
 
bool addUMLView (UMLView *pView)
 
void addView (UMLView *view)
 
Uml::ID::Type assignNewID (Uml::ID::Type oldID)
 
bool assignNewIDs (UMLObject *obj)
 
UMLAssociationList associations ()
 
void beginPaste ()
 
void changeCurrentView (Uml::ID::Type id)
 
virtual IDChangeLog * changeLog ()
 
UMLClassifierList classes (bool includeNested=true)
 
UMLClassifierList classesAndInterfaces (bool includeNested=true)
 
void closeDocument ()
 
bool closing () const
 
UMLClassifierList concepts (bool includeNested=true)
 
void createDatatype (const QString &name)
 
UMLView * createDiagram (UMLFolder *folder, Uml::DiagramType::Enum type, const QString &name)
 
QString createDiagramName (Uml::DiagramType::Enum type, bool askForName=true)
 
UMLAssociation * createUMLAssociation (UMLObject *a, UMLObject *b, Uml::AssociationType::Enum type)
 
UMLFolder * currentRoot ()
 
UMLFolder * datatypeFolder () const
 
UMLClassifierList datatypes ()
 
QString documentation () const
 
short encoding (QIODevice &file)
 
void endPaste ()
 
UMLEntityList entities (bool includeNested=true)
 
UMLAssociation * findAssociation (Uml::AssociationType::Enum assocType, const UMLObject *roleAObj, const UMLObject *roleBObj, bool *swap=0)
 
UMLObject * findObjectById (Uml::ID::Type id)
 
UMLStereotype * findOrCreateStereotype (const QString &name)
 
UMLStereotype * findStereotype (const QString &name)
 
UMLStereotype * findStereotypeById (Uml::ID::Type id)
 
UMLClassifier * findUMLClassifier (const QString &name)
 
UMLObject * findUMLObject (const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
 
UMLObject * findUMLObjectRaw (Uml::ModelType::Enum, const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject)
 
UMLObject * findUMLObjectRaw (UMLFolder *folder, const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject)
 
UMLView * findView (Uml::ID::Type id)
 
UMLView * findView (Uml::DiagramType::Enum type, const QString &name, bool searchAllScopes=false)
 
void init ()
 
UMLClassifierList interfaces (bool includeNested=true)
 
bool isModified ()
 
bool isUnique (const QString &name)
 
bool isUnique (const QString &name, UMLPackage *package)
 
bool loadDiagramsFromXMI (QDomNode &node)
 
void loadExtensionsFromXMI (QDomNode &node)
 
virtual bool loadFromXMI (QIODevice &file, short encode=ENC_UNKNOWN)
 
bool loading () const
 
bool loadUMLObjectsFromXMI (QDomElement &element)
 
Uml::ID::Type modelID () const
 
QString name () const
 
bool newDocument ()
 
bool openDocument (const KUrl &url, const char *format=0)
 
UMLPackageList packages (bool includeNested=true)
 
void print (QPrinter *pPrinter, DiagramPrintPage *selectPage)
 
void removeAllObjects ()
 
void removeAllViews ()
 
void removeAssociation (UMLAssociation *assoc, bool doSetModified=true)
 
void removeDiagram (Uml::ID::Type id)
 
void removeStereotype (UMLStereotype *s)
 
void removeUMLObject (UMLObject *umlobject)
 
void removeView (UMLView *view, bool enforceOneView=true)
 
void renameChildUMLObject (UMLObject *o)
 
void renameDiagram (Uml::ID::Type id)
 
void renameUMLObject (UMLObject *o)
 
void resolveTypes ()
 
UMLFolder * rootFolder (Uml::ModelType::Enum mt)
 
Uml::ModelType::Enum rootFolderType (UMLObject *obj)
 
bool saveDocument (const KUrl &url, const char *format=0)
 
bool saveModified ()
 
virtual void saveToXMI (QIODevice &file)
 
void setCurrentRoot (Uml::ModelType::Enum rootType)
 
void setDocumentation (const QString &doc)
 
void setLoading (bool state=true)
 
void setMainViewID (Uml::ID::Type viewID)
 
void setModified (bool modified=true)
 
void setName (const QString &name)
 
void settingsChanged (Settings::OptionState optionState)
 
void setupSignals ()
 
void setUrl (const KUrl &url)
 
void signalDiagramRenamed (UMLView *view)
 
void signalUMLObjectCreated (UMLObject *o)
 
const UMLStereotypeList & stereotypes () const
 
QString uniqueViewName (const Uml::DiagramType::Enum type)
 
const KUrl & url () const
 
bool validateXMIHeader (QDomNode &headerNode)
 
UMLViewList viewIterator ()
 
void writeToStatusBar (const QString &text)
 

Static Public Member Functions

static bool tagEq (const QString &tag, const QString &pattern)
 

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 phens.nosp@m.gen@.nosp@m.techi.nosp@m.e.co.nosp@m.m Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or http://bugs.kde.org

Definition at line 63 of file umldoc.h.

Constructor & Destructor Documentation

UMLDoc::UMLDoc ( )

Constructor for the fileclass of the application.

Definition at line 77 of file umldoc.cpp.

UMLDoc::~UMLDoc ( )

Destructor for the fileclass of the application.

Definition at line 147 of file umldoc.cpp.

Member Function Documentation

void UMLDoc::activateAllViews ( )

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

Definition at line 2812 of file umldoc.cpp.

void UMLDoc::addAssociation ( UMLAssociation *  assoc)

Adds an association.

Parameters
assocPointer to the UMLAssociation to add.

Definition at line 1153 of file umldoc.cpp.

void UMLDoc::addDefaultDatatypes ( )

Calls the active code generator to create its default datatypes.

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

void UMLDoc::addStereotype ( UMLStereotype *  s)

Add a UMLStereotype to the application.

Parameters
sthe stereotype to be added

Definition at line 924 of file umldoc.cpp.

bool UMLDoc::addUMLObject ( UMLObject *  object)

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

Use AddUMLObjectPaste if pasting.

Parameters
objectThe object to add.
Returns
True if the object was actually added.

Definition at line 901 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.

Parameters
pViewPointer to the UMLView to add.
Returns
True if operation successful.

Definition at line 2782 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
viewPointer to the UMLView to add.

Definition at line 159 of file umldoc.cpp.

Uml::ID::Type UMLDoc::assignNewID ( Uml::ID::Type  oldID)

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

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

Definition at line 2743 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
objPointer to the UMLObject to add.
Returns
True if operation successful.

Definition at line 2635 of file umldoc.cpp.

UMLAssociationList UMLDoc::associations ( )

Returns a list of the associations in this UMLDoc.

Returns
List of UML associations.

Definition at line 2548 of file umldoc.cpp.

void UMLDoc::beginPaste ( )

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

Definition at line 2716 of file umldoc.cpp.

void UMLDoc::changeCurrentView ( Uml::ID::Type  id)

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

Parameters
idThe ID of the view to change to.

Definition at line 1438 of file umldoc.cpp.

IDChangeLog * UMLDoc::changeLog ( )
virtual

Read property of IDChangeLog* m_pChangeLog.

Returns
Pointer to the IDChangeLog object.

Definition at line 2707 of file umldoc.cpp.

UMLClassifierList UMLDoc::classes ( bool  includeNested = true)

Returns a list of the classes in this UMLDoc.

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

Definition at line 2477 of file umldoc.cpp.

UMLClassifierList UMLDoc::classesAndInterfaces ( bool  includeNested = true)

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

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

Definition at line 2491 of file umldoc.cpp.

void UMLDoc::closeDocument ( )

Closes the current document.

Definition at line 316 of file umldoc.cpp.

bool UMLDoc::closing ( ) const

Returns the m_bClosing flag.

Returns
the value of the flag

Definition at line 1259 of file umldoc.cpp.

UMLClassifierList UMLDoc::concepts ( bool  includeNested = true)

Returns a list of the concepts in this UMLDoc.

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

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

UMLView * UMLDoc::createDiagram ( UMLFolder *  folder,
Uml::DiagramType::Enum  type,
const QString &  name 
)

Creates a diagram of the given type.

Parameters
folderthe folder in which tp create the diagram.
typethe type of diagram to create
nameif 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 1310 of file umldoc.cpp.

QString UMLDoc::createDiagramName ( Uml::DiagramType::Enum  type,
bool  askForName = true 
)

Creates the name of the given diagram type.

Parameters
typeThe type of diagram to create.
askForNameIf true shows a dialog box asking for name, else uses a default name.
Returns
name of the new diagram

Definition at line 1271 of file umldoc.cpp.

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

Creates AND adds an association between two UMLObjects.

Used by refactoring assistant. NOTE: this method does not check if the association is valid / legal

Parameters
aThe UMLObject "A" for the association (source)
bThe UMLObject "B" for the association (destination)
typeThe association's type
Returns
The Association created

Definition at line 1136 of file umldoc.cpp.

UMLFolder * UMLDoc::currentRoot ( )

Return the currently selected root folder.

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

Returns
the currently selected root folder or NULL

Definition at line 1491 of file umldoc.cpp.

UMLFolder * UMLDoc::datatypeFolder ( ) const

Returns the datatype folder.

Returns
Pointer to the predefined folder for datatypes.

Definition at line 2451 of file umldoc.cpp.

UMLClassifierList UMLDoc::datatypes ( )

Returns a list of the datatypes in this UMLDoc.

Returns
List of datatypes.

Definition at line 2531 of file umldoc.cpp.

QString UMLDoc::documentation ( ) const

Returns the documentation for the project.

Returns
The documentation text of this UMLDoc.

Definition at line 2757 of file umldoc.cpp.

short UMLDoc::encoding ( QIODevice &  file)

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

Parameters
fileThe file to be checked.

Definition at line 1807 of file umldoc.cpp.

void UMLDoc::endPaste ( )

Closes a paste session, deletes the ChangeLog.

Definition at line 2728 of file umldoc.cpp.

UMLEntityList UMLDoc::entities ( bool  includeNested = true)

Returns a list of the entities in this UMLDoc.

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

Definition at line 2505 of file umldoc.cpp.

UMLAssociation * UMLDoc::findAssociation ( Uml::AssociationType::Enum  assocType,
const UMLObject *  roleAObj,
const UMLObject *  roleBObj,
bool *  swap = 0 
)

Finds an association.

Parameters
assocTypeType of the UMLAssociation to seek.
roleAObjPointer to the role A UMLCanvasObject.
roleBObjPointer to the role B UMLCanvasObject.
swapOptional 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 1102 of file umldoc.cpp.

UMLObject * UMLDoc::findObjectById ( Uml::ID::Type  id)

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

Parameters
idThe UMLObject to find.
Returns
Pointer to the UMLObject found, or NULL if not found.

Definition at line 766 of file umldoc.cpp.

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

Finds or creates a stereotype for the parent object.

Parameters
namethe name of the stereotype
Returns
the found stereotype object or a just created one

Definition at line 1054 of file umldoc.cpp.

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

Finds a UMLStereotype by its name.

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

Definition at line 1039 of file umldoc.cpp.

UMLStereotype * UMLDoc::findStereotypeById ( Uml::ID::Type  id)

Find a UMLStereotype by its unique ID.

Parameters
idthe unique ID
Returns
the found stereotype or NULL

Definition at line 787 of file umldoc.cpp.

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

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
idStrThe AuxId for the UMLObject to find. Used to find a UMLClassifier by its name.
nameThe name of the UMLObject to find.

Definition at line 887 of file umldoc.cpp.

UMLObject * UMLDoc::findUMLObject ( const QString &  name,
UMLObject::ObjectType  type = UMLObject::ot_UMLObject,
UMLObject *  currentObj = 0 
)

Used to find a UMLObject by its type and name.

Parameters
nameThe name of the UMLObject to find.
typeObjectType 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.
currentObjObject 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 809 of file umldoc.cpp.

UMLObject * UMLDoc::findUMLObjectRaw ( Uml::ModelType::Enum  modelType,
const QString &  name,
UMLObject::ObjectType  type = UMLObject::ot_UMLObject 
)

Used to find a UMLObject by its type and raw name.

Parameters
modelTypeThe Mmdel type in which to search for the object
nameThe raw name of the UMLObject to find.
typeObjectType of the object to find
Returns
Pointer to the UMLObject found, or NULL if not found.

Definition at line 841 of file umldoc.cpp.

UMLObject * UMLDoc::findUMLObjectRaw ( UMLFolder *  folder,
const QString &  name,
UMLObject::ObjectType  type = UMLObject::ot_UMLObject 
)

Used to find a UMLObject by its type and raw name.

Parameters
folderThe UMLFolder in which to search for the object
nameThe raw name of the UMLObject to find.
typeObjectType of the object to find
Returns
Pointer to the UMLObject found, or NULL if not found.

Definition at line 856 of file umldoc.cpp.

UMLView * UMLDoc::findView ( Uml::ID::Type  id)

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

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

Definition at line 733 of file umldoc.cpp.

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

Finds a view (diagram) by the type and name given.

Parameters
typeThe type of view to find.
nameThe name of the view to find.
searchAllScopesSearch in all subfolders (default: false.)
Returns
Pointer to the view found, or NULL if not found.

Definition at line 753 of file umldoc.cpp.

void UMLDoc::init ( )

Initialize the UMLDoc.

To be called after the constructor, before anything else.

Definition at line 100 of file umldoc.cpp.

UMLClassifierList UMLDoc::interfaces ( bool  includeNested = true)

Returns a list of the interfaces in this UMLDoc.

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

Definition at line 2519 of file umldoc.cpp.

bool UMLDoc::isModified ( )

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

bool UMLDoc::isUnique ( const QString &  name)

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

Parameters
nameThe name to check.
Returns
True if name is unique.

Definition at line 972 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
nameThe name to check.
packageThe UMLPackage in which we have to determine the unique-ness
Returns
True if name is unique.

Definition at line 1014 of file umldoc.cpp.

bool UMLDoc::loadDiagramsFromXMI ( QDomNode &  node)

Loads all diagrams from XMI into the current UMLDoc.

For backward compatibility only: Since version 1.5.5 diagrams are saved as part of the UMLFolder.

Returns
True if operation successful.

Definition at line 2362 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 2298 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
fileThe file to be loaded.
encodeThe encoding used.

Definition at line 1884 of file umldoc.cpp.

bool UMLDoc::loading ( ) const

Returns true when loading a document file.

Returns
the value of the flag

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

Uml::ID::Type UMLDoc::modelID ( ) const

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

Definition at line 1650 of file umldoc.cpp.

QString UMLDoc::name ( ) const

Return the name of this model.

Definition at line 1641 of file umldoc.cpp.

bool UMLDoc::newDocument ( )

Initializes the document generally.

Returns
True if operation successful.

Definition at line 367 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
urlThe filename in KUrl format.
formatThe format (optional.)
Returns
True if operation successful.

Definition at line 402 of file umldoc.cpp.

UMLPackageList UMLDoc::packages ( bool  includeNested = true)

Returns a list of the packages in this UMLDoc,.

Returns
List of UMLPackages.

Definition at line 2439 of file umldoc.cpp.

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

Controls the printing of the program.

Parameters
pPrinterThe printer (object) to use.

Definition at line 2566 of file umldoc.cpp.

void UMLDoc::removeAllObjects ( )

Call to remove all objects in the current file.

Definition at line 2427 of file umldoc.cpp.

void UMLDoc::removeAllViews ( )

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

Definition at line 2413 of file umldoc.cpp.

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

Removes an association.

Parameters
assocPointer to the UMLAssociation to remove.
doSetModifiedWhether to mark the document as modified (default: true.)

Definition at line 1071 of file umldoc.cpp.

void UMLDoc::removeDiagram ( Uml::ID::Type  id)

Deletes a diagram from the current file.

Parameters
idThe ID of the diagram to delete.

Definition at line 1463 of file umldoc.cpp.

void UMLDoc::removeStereotype ( UMLStereotype *  s)

Remove a UMLStereotype from the application.

Parameters
sthe stereotype to be removed

Definition at line 935 of file umldoc.cpp.

void UMLDoc::removeUMLObject ( UMLObject *  umlobject)

Removes an UMLObject from the current file.

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

Parameters
umlobjectPointer to the UMLObject to delete.

Definition at line 1527 of file umldoc.cpp.

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

Removes a view from the list of currently connected views.

Parameters
viewPointer to the UMLView to remove.
enforceOneViewswitch 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 197 of file umldoc.cpp.

void UMLDoc::renameChildUMLObject ( UMLObject *  o)

Used to rename an operation or attribute of a concept.

Parameters
oThe attribute or operation to rename.

Definition at line 1400 of file umldoc.cpp.

void UMLDoc::renameDiagram ( Uml::ID::Type  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
idThe ID of the diagram to rename.

Definition at line 1337 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
oThe object to rename.

Definition at line 1372 of file umldoc.cpp.

void UMLDoc::resolveTypes ( )

Type resolution pass.

Definition at line 2081 of file umldoc.cpp.

UMLFolder * UMLDoc::rootFolder ( Uml::ModelType::Enum  mt)

Return the predefined root folder of the given type.

Definition at line 2676 of file umldoc.cpp.

Uml::ModelType::Enum 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::ModelType::N_MODELTYPES.

Definition at line 2691 of file umldoc.cpp.

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

Saves the document using the given filename and format.

Parameters
urlThe filename in KUrl format.
formatThe format (optional.)
Returns
True if operation successful.

insert some checks in saveToXMI to detect a failed save attempt

Definition at line 580 of file umldoc.cpp.

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 268 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
fileThe 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()); }

Definition at line 1662 of file umldoc.cpp.

void UMLDoc::setCurrentRoot ( Uml::ModelType::Enum  rootType)

Set the current root folder.

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

Definition at line 1515 of file umldoc.cpp.

void UMLDoc::setDocumentation ( const QString &  doc)

Sets the documentation for the project.

Parameters
docThe documentation to set for this UMLDoc.

Definition at line 2767 of file umldoc.cpp.

void UMLDoc::setLoading ( bool  state = true)

Sets loading boolean flag to the value given.

Parameters
statevalue to set

Definition at line 1250 of file umldoc.cpp.

void UMLDoc::setMainViewID ( Uml::ID::Type  viewID)

Sets m_nViewID.

Definition at line 2288 of file umldoc.cpp.

void UMLDoc::setModified ( bool  modified = true)

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

Parameters
modifiedThe value to set the modified flag to.

Definition at line 2607 of file umldoc.cpp.

void UMLDoc::setName ( const QString &  name)

Set the name of this model.

Definition at line 1633 of file umldoc.cpp.

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

Sets the default settings to the given settings.

Parameters
optionStatesettings

Definition at line 2828 of file umldoc.cpp.

void UMLDoc::setupSignals ( )

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

Definition at line 721 of file umldoc.cpp.

void UMLDoc::setUrl ( const KUrl &  url)

Sets the URL of the document.

Parameters
urlThe KUrl to set.

Definition at line 247 of file umldoc.cpp.

void UMLDoc::sigCurrentViewChanged ( )
signal

The diagram being displayed has changed.

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

void UMLDoc::sigDiagramChanged ( Uml::DiagramType::Enum  )
signal
void UMLDoc::sigDiagramCreated ( Uml::ID::Type  id)
signal
void UMLDoc::sigDiagramRemoved ( Uml::ID::Type  id)
signal
void UMLDoc::sigDiagramRenamed ( Uml::ID::Type  t)
signal
void UMLDoc::signalDiagramRenamed ( UMLView *  view)

Signal a view/diagram has been renamed.

Definition at line 2903 of file umldoc.cpp.

void UMLDoc::signalUMLObjectCreated ( UMLObject *  o)

Signal that a UMLObject has been created.

Parameters
oThe object that has been created.

Definition at line 1619 of file umldoc.cpp.

void UMLDoc::sigObjectCreated ( UMLObject *  )
signal
void UMLDoc::sigObjectRemoved ( UMLObject *  )
signal
void UMLDoc::sigResetStatusbarProgress ( )
signal

Reset the status bar.

void UMLDoc::sigSetStatusbarProgress ( int  stepPosition)
signal

Set the progress position of the progressbar.

Parameters
stepPositionThe step position to set.
void UMLDoc::sigSetStatusbarProgressSteps ( int  totalSteps)
signal

Set the total range of the progressbar.

Parameters
totalStepsTotal range of the progressbar (0..totalSteps)
void UMLDoc::sigWriteToStatusBar ( const QString &  text)
signal

Write text to the status bar.

void UMLDoc::slotAutoSave ( )
slot

Called after a specified time to autosave the document.

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

void UMLDoc::slotRemoveUMLObject ( UMLObject *  object)
slot

Simple removal of an object.

Parameters
objectthe UMLObject to be removed

Definition at line 955 of file umldoc.cpp.

const UMLStereotypeList & UMLDoc::stereotypes ( ) const

Returns a list of the stereotypes in this UMLDoc.

Returns
List of UML stereotypes.

Definition at line 3022 of file umldoc.cpp.

bool UMLDoc::tagEq ( const QString &  tag,
const QString &  pattern 
)
static

Function for comparing tags in XMI files.

Definition at line 3030 of file umldoc.cpp.

QString UMLDoc::uniqueViewName ( const Uml::DiagramType::Enum  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.

Parameters
typethe diagram type
Returns
the unique view name

Definition at line 1195 of file umldoc.cpp.

const KUrl & UMLDoc::url ( ) const

Returns the KUrl of the document.

Returns
The KUrl of this UMLDoc.

Definition at line 257 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
headerNodeThe <XMI.header> node

Definition at line 2107 of file umldoc.cpp.

UMLViewList UMLDoc::viewIterator ( )

Return the list of views for this document.

Returns
List of UML views.

Definition at line 2592 of file umldoc.cpp.

void UMLDoc::writeToStatusBar ( const QString &  text)

Write text to the status bar.

Parameters
textthe text to write

Definition at line 946 of file umldoc.cpp.


The documentation for this class was generated from the following files:
  • umldoc.h
  • umldoc.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal