nomad_camels.commands package

Submodules

nomad_camels.commands.change_sequence module

class nomad_camels.commands.change_sequence.CommandMoveStep(treeView, item_model, up_down, in_out, loop_step_dict, update_func)

Bases: QUndoCommand

Using a command for moving a step inside the protocol treeView to be able to reverse the action.

Parameters:
  • treeView (QTreeView) – The TreeView displaying the protocol sequence

  • item_model (QStandardItemModel) – The treeview’s item model

  • up_down (int) – The direction in which to move the step, if positive it moves down, if negative it moves up.

  • in_out (int) – The step is moved into the step above it, if positive, if negative it is moved out one layer.

  • loop_step_dict (dict) – The dictionary of the loopsteps, used to find the parent steps

  • update_func (function) – This function is called, when the command is finished, usually used to update the order of the steps in the protocol data.

redo()

Performs moving the step.

undo()

Moves the step back to its original position.

Module contents