eric7.Graphics.UMLDialog

Module implementing a dialog showing UML like diagrams.

Global Attributes

None

Classes

UMLDialog Class implementing a dialog showing UML like diagrams.
UMLDialogType Class defining the UML dialog types.

Functions

None


UMLDialog

Class implementing a dialog showing UML like diagrams.

Derived from

EricMainWindow

Class Attributes

FileVersions
JsonFileVersions
UMLDialogType2String

Class Methods

None

Methods

UMLDialog Constructor
__diagramBuilder Private method to instantiate a diagram builder object.
__getDiagramTitel Private method to get a textual description for the diagram type.
__initActions Private slot to initialize the actions.
__initToolBars Private slot to initialize the toolbars.
__readJsonGraphicsFile Private method to read an eric graphics file using the JSON based file format.
__relayout Private method to re-layout 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.
__writeJsonGraphicsFile Private method to write an eric graphics file using the JSON based file format.
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 (UMLDialogType)
type of the diagram
project (Project)
reference to the project object
path (str)
file or directory path to build the diagram from
parent (QWidget)
parent widget of the dialog
initBuilder (bool)
flag indicating to initialize the diagram builder
kwargs= (dict)
diagram specific data

UMLDialog.__diagramBuilder

__diagramBuilder(diagramType, path, **kwargs)

Private method to instantiate a diagram builder object.

diagramType (UMLDialogType)
type of the diagram
path (str)
file or directory path to build the diagram from
kwargs= (dict)
diagram specific data
Return:
reference to the instantiated diagram builder
Return Type:
UMLDiagramBuilder

UMLDialog.__getDiagramTitel

__getDiagramTitel(diagramType)

Private method to get a textual description for the diagram type.

diagramType (str)
diagram type string
Return:
titel of the diagram
Return Type:
str

UMLDialog.__initActions

__initActions()

Private slot to initialize the actions.

UMLDialog.__initToolBars

__initToolBars()

Private slot to initialize the toolbars.

UMLDialog.__readJsonGraphicsFile

__readJsonGraphicsFile(filename)

Private method to read an eric graphics file using the JSON based file format.

filename (str)
name of the file to be read
Return:
flag indicating a successful read
Return Type:
bool

UMLDialog.__relayout

__relayout()

Private method to re-layout 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 (str)
name of the file to write to

UMLDialog.__showInvalidDataMessage

__showInvalidDataMessage(filename)

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

filename (str)
name of the file containing the invalid data

UMLDialog.__writeJsonGraphicsFile

__writeJsonGraphicsFile(filename)

Private method to write an eric graphics file using the JSON based file format.

filename (str)
name of the file to write to
Return:
flag indicating a successful write
Return Type:
bool

UMLDialog.load

load(filename="")

Public method to load a diagram from a file.

filename (str)
name of the file to be loaded
Return:
flag indicating success
Return Type:
bool

UMLDialog.show

show(fromFile=False)

Public method to show the dialog.

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


UMLDialogType

Class defining the UML dialog types.

Derived from

enum.Enum

Class Attributes

APPLICATION_DIAGRAM
CLASS_DIAGRAM
IMPORTS_DIAGRAM
NO_DIAGRAM
PACKAGE_DIAGRAM

Class Methods

None

Methods

None

Static Methods

None
Up