# eric7.Graphics.UMLDiagramBuilder

Module implementing the UML diagram builder base class.

### Global Attributes

None

### Classes

UMLDiagramBuilder | Class implementing the UML diagram builder base class.

### Functions

None

## UMLDiagramBuilder

Class implementing the UML diagram builder base class.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

UMLDiagramBuilder | Constructor
buildDiagram | Public method to build the diagram.
buildErrorMessage | Public method to build an error string to be included in the scene.
fromDict | Public method to populate the class with data persisted by 'toDict()'.
initialize | Public method to initialize the object.
parsePersistenceData | Public method to parse persisted data.
toDict | Public method to collect data to be persisted.

### Static Methods

None

#### UMLDiagramBuilder (Constructor)

UMLDiagramBuilder(dialog, view, project)

Constructor

dialog (UMLDialog)
  reference to the UML dialog
view (UMLGraphicsView)
  reference to the view object
project (Project)
  reference to the project object

#### UMLDiagramBuilder.buildDiagram

buildDiagram()

Public method to build the diagram.

This class must be implemented in subclasses.

Raises NotImplementedError:
  raised to indicate that this class must be subclassed

#### UMLDiagramBuilder.buildErrorMessage

buildErrorMessage(msg)

Public method to build an error string to be included in the scene.

msg (str)
  error message

Return:
  prepared error string

Return Type:
  str

#### UMLDiagramBuilder.fromDict

fromDict(version, data)

Public method to populate the class with data persisted by 'toDict()'.

version (str)
  version of the data
data (dict)
  dictionary containing the persisted data

Return:
  tuple containing a flag indicating success and an info message in case the diagram belongs to a different project

Return Type:
  tuple of (bool, str)

#### UMLDiagramBuilder.initialize

initialize()

Public method to initialize the object.

#### UMLDiagramBuilder.parsePersistenceData

parsePersistenceData(version, data)

Public method to parse persisted data.

version (str)
  version of the data
data (str)
  persisted data to be parsed

Return:
  flag indicating success

Return Type:
  bool

#### UMLDiagramBuilder.toDict

toDict()

Public method to collect data to be persisted.

Return:
  dictionary containing data to be persisted

Return Type:
  dict

Up