exopy.utils.widgets.dict_tree_view module

Widget used to represent nested dict as a tree.

class exopy.utils.widgets.dict_tree_view.DictTreeView(parent=None, **kwargs)

Bases: exopy.utils.widgets.qt_tree_widget.QtTreeWidget

Widget used to represent a nested dict as a tree.

mapping

A value which allows objects of a given type or types.

Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.

The value of an Instance may be set to None.

class exopy.utils.widgets.dict_tree_view.Leaf

Bases: atom.atom.Atom

Class representing a non-mapping value associated with a name.

name

A value of type str.

Under Python 2 this is a byte string and behaves as Bytes with respect to promotion, under Python 3 it is a unicode string and behaves as Unicode with respect to promotion.

The use of this member is discouraged in Python 2/3 compatible codebase as Bytes and Unicode provide a more homogeneous behavior.

value

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

class exopy.utils.widgets.dict_tree_view.Node

Bases: atom.atom.Atom

Class representing a mapping value.

name

A value of type str.

Under Python 2 this is a byte string and behaves as Bytes with respect to promotion, under Python 3 it is a unicode string and behaves as Unicode with respect to promotion.

The use of this member is discouraged in Python 2/3 compatible codebase as Bytes and Unicode provide a more homogeneous behavior.

nodes

A member which allows list values.

Assigning to a list creates a copy. The orginal list will remain unmodified. This is similar to the semantics of the assignment operator on the C++ STL container classes.

parent

A Typed which delays resolving the type definition.

The first time the value is accessed or modified, the type will be resolved and the forward typed will behave identically to a normal typed.