spinetoolbox.spine_db_editor.mvcmodels.alternative_model

Contains alternative tree model.

Module Contents

Classes

AlternativeModel

A model to display alternatives in a tree view.

class spinetoolbox.spine_db_editor.mvcmodels.alternative_model.AlternativeModel(db_editor, db_mngr, *db_maps)[source]

Bases: spinetoolbox.spine_db_editor.mvcmodels.tree_model_base.TreeModelBase

A model to display alternatives in a tree view.

Parameters
_make_db_item(db_map)[source]
mimeData(indexes)[source]

Stores selected indexes into MIME data.

The MIME data structure contains two distinct data:

  • Text representation of the selection

  • A pickled dict mapping db identifier to list of alternative ids

Parameters

indexes (Sequence of QModelIndex) – selected indexes

Returns

MIME data

Return type

QMimeData

paste_alternative_mime_data(mime_data, database_item)[source]

Pastes alternatives from mime data into model.

Parameters