eric3.Graphics.PackageWidget

Module implementing a package widget.

Classes

PackageModel Class implementing the package model.
PackageWidget Class implementing a module widget.

Functions

None


PackageModel

Class implementing the package model.

Derived from

None

Methods

PackageModel Constructor
addModule Method to add a module to the package model.
getModules Method to retrieve the modules of the package.
getName Method to retrieve the package name.

PackageModel (Constructor)

PackageModel(name, moduleslist=[])

Constructor

classlist
list of class names (list of strings)
name
package name (string)

PackageModel.addModule

addModule(modulename)

Method to add a module to the package model.

modulename
module name to be added (string)

PackageModel.getModules

getModules()

Method to retrieve the modules of the package.

Returns:
list of module names (list of strings)

PackageModel.getName

getName()

Method to retrieve the package name.

Returns:
package name (string)

Up


PackageWidget

Class implementing a module widget.

Derived from

UMLWidget

Methods

PackageWidget Constructor
calculateSize Method to calculate the size of the package widget.
drawShape Overriden method to draw the shape.
setModel Method to set the package model.

PackageWidget (Constructor)

PackageWidget(canvas, model=None, x=0, y=0, rounded=0, noModules=0)

Constructor

canvas
canvas containing the class widget (QCanvas)
model
module model containing the module data (ModuleModel)
noModules=
flag indicating, that no module names should be shown (boolean)
rounded
flag indicating a rounded corner (boolean)
x
x-coordinate (integer)
y
y-coordinate (integer)

PackageWidget.calculateSize

calculateSize()

Method to calculate the size of the package widget.

PackageWidget.drawShape

drawShape(painter)

Overriden method to draw the shape.

painter
painter the shape is drawn to (QPainter)

PackageWidget.setModel

setModel(model)

Method to set the package model.

model
package model containing the package data (PackageModel)

Up