Home ⌂Doc Index ◂Up ▴

eric6.Graphics.UMLDialog

Module implementing a dialog showing UML like diagrams.

Global Attributes

None

Classes

UMLDialog Class implementing a dialog showing UML like diagrams.

Functions

None


UMLDialog

Class implementing a dialog showing UML like diagrams.

Derived from

E5MainWindow

Class Attributes

ApplicationDiagram
ClassDiagram
FileVersions
ImportsDiagram
NoDiagram
PackageDiagram

Class Methods

None

Methods

UMLDialog Constructor
__diagramBuilder Private method to instantiate a diagram builder object.
__diagramTypeString Private method to generate a readable string for the diagram type.
__initActions Private slot to initialize the actions.
__initToolBars Private slot to initialize the toolbars.
__relayout Private method to relayout the diagram.
__save Private slot to save the diagram with the current name.
__saveAs Private slot to save the diagram.
__showInvalidDataMessage Private slot to show a message dialog indicating an invalid data file.
load Public method to load a diagram from a file.
show Public method to show the dialog.

Static Methods

None

UMLDialog (Constructor)

UMLDialog(diagramType, project, path="", parent=None, initBuilder=True, **kwargs)

Constructor

diagramType
type of the diagram (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, NoDiagram, PackageDiagram)
project
reference to the project object (Project)
path
file or directory path to build the diagram from (string)
parent
parent widget of the dialog (QWidget)
initBuilder=
flag indicating to initialize the diagram builder (boolean)
kwargs=
diagram specific data

UMLDialog.__diagramBuilder

__diagramBuilder(diagramType, path, **kwargs)

Private method to instantiate a diagram builder object.

diagramType
type of the diagram (one of ApplicationDiagram, ClassDiagram, ImportsDiagram, PackageDiagram)
path
file or directory path to build the diagram from (string)
kwargs=
diagram specific data
Returns:
reference to the instantiated diagram builder
Raises ValueError:
raised to indicate an illegal diagram type

UMLDialog.__diagramTypeString

__diagramTypeString()

Private method to generate a readable string for the diagram type.

Returns:
readable type string (string)

UMLDialog.__initActions

__initActions()

Private slot to initialize the actions.

UMLDialog.__initToolBars

__initToolBars()

Private slot to initialize the toolbars.

UMLDialog.__relayout

__relayout()

Private method to relayout the diagram.

UMLDialog.__save

__save()

Private slot to save the diagram with the current name.

UMLDialog.__saveAs

__saveAs(filename="")

Private slot to save the diagram.

filename
name of the file to write to (string)

UMLDialog.__showInvalidDataMessage

__showInvalidDataMessage(filename, linenum=-1)

Private slot to show a message dialog indicating an invalid data file.

filename
name of the file containing the invalid data (string)
linenum
number of the invalid line (integer)

UMLDialog.load

load()

Public method to load a diagram from a file.

Returns:
flag indicating success (boolean)

UMLDialog.show

show(fromFile=False)

Public method to show the dialog.

fromFile=
flag indicating, that the diagram was loaded from file (boolean)
Up



Home ⌂Doc Index ◂Up ▴