exopy.measurement.editors.database_access_editor.editor_model module

Model driving the database exception editor.

class exopy.measurement.editors.database_access_editor.editor_model.NodeModel[source]

Bases: atom.atom.Atom

Object representing the database node state linked to a ComplexTask

task

Reference to the task this node refers to.

entries

Database entries available on the node associated with the task.

exceptions

Database exceptions present on the node.

has_exceptions

Database entries for which an access exception exists

children

Children nodes

sort_nodes(nodes=None)[source]

Sort the nodes according to the task order.

New nodes can be passed to the methods in which case they will replace the existing ones.

add_node(node)[source]

Add a node to the children of this one.

remove_node(node)[source]

Remove a node from the children.

We also discard all nodes that have no linked task (happen when dicarding a ComplexTask containing other tasks).

add_exception(entry)[source]

Add an access exception.

class exopy.measurement.editors.database_access_editor.editor_model.EditorModel[source]

Bases: atom.atom.Atom

Model driving the database access editor.

root

Reference to the root task of the currently edited task hierarchy.

nodes

Dictionary storing the nodes for all tasks by path.

increase_exc_level(path, entry)[source]

Increase the exception level of an access exception.

Parameters
  • path (unicode) – Path of the node in which the exception to increase is.

  • entry (unicode) – Entry whose access exception should be increased.

decrease_exc_level(path, entry)[source]

Decrease the exception level of an access exception.

Parameters
  • path (unicode) – Path of the node in which the exception to increase is.

  • entry (unicode) – Entry whose access exception should be increased.