The signature of the createDialog
class method is the following :
def createDialog(cls, parent, instance_name, xobject, editor, xattribute):
cls
: the class,
parent
: the qt parent object,
instance_name
: two solutions for this attribute. If the
dialog is called for an object creation (in short, from menubar), the
instance_name
is a proposition for the instance name based on
the class name and the already presents objects. If the dialog is called
for the edition of an existing object (via a popup, Edit), instance_name
is None
object
: None
for an object creation, the object for
an object edition.
editor
: None
unless the dialog is called from
the edition on an attribute in a edition dialog of another object.
For instance, an object from the study is edited, this object has
an attribute a
which is an instance of class A, then
if you are editing a
for the edition dialog, the editor
attribute will be the edition dialog.
xattribute
: None
unless the dialog edition is
called on an attribute of an object in the study. It is called the
attribute direct edition. For instance, if you need to modify an
integer attribute in an object, you just select the attribute, and
with a popup, Edit, you can modify only this attribute.
The default implementation of createDialog
coded in
XObject class launch a dialog box with a line by
__init__xattributes__
for an object creation and a
line by __init__xattributes__
plus a line for each
read-write __object__xattributes__
for an object edition.
The edition of an attribute in this dialog box is described in
section 8.2.