spinetoolbox.project_items.exporter.list_utils

Contains list helper functions for list manipulation.

author:
  1. Soininen (VTT)
date:

12.12.2019

Module Contents

spinetoolbox.project_items.exporter.list_utils.move_list_elements(originals, first, last, target)[source]

Moves elements in a list.

Parameters:
  • originals (list) – a list
  • first (int) – index of the first element to move
  • last (int) – index of the last element to move
  • target (int) – index where the elements [first:last] should be inserted
Returns:

a new list with the elements moved

spinetoolbox.project_items.exporter.list_utils.move_selected_elements_by(list_view, delta)[source]

Moves selected items in a QListView by given delta.

Parameters:
  • list_view (QListView) – a list view
  • delta (int) – positive values move the items up, negative down