pyface.data_view.exporters.item_exporter module¶
-
class
pyface.data_view.exporters.item_exporter.
ItemExporter
¶ Bases:
pyface.data_view.abstract_data_exporter.AbstractDataExporter
Export a single item from a data view.
This is suitable for drag and drop or copying of the content of a single item in a data view. If passed an multiple items it will fail by raising
DataViewGetError
; drag and drop support will then ignore this as an exporter to use.-
add_data
(data_wrapper, model, indices)¶ Add data to the data wrapper from the model and indices.
- Parameters
data_wrapper (DataWrapper instance) – The data wrapper that will be used to export data.
model (AbstractDataModel instance) – The data model holding the data.
indices (list of (row, column) index pairs) – The indices where the data is to be stored.
-
get_data
(model, indices)¶ Get the data to be exported from the model and indices.
- Parameters
model (AbstractDataModel instance) – The data model holding the data.
indices (list of (row, column) index pairs) – The indices where the data is to be stored.
- Returns
data – The data, of a type that can be serialized by the format.
- Return type
any
-