pyface.data_view.i_data_view_widget module

class pyface.data_view.i_data_view_widget.IDataViewWidget(adaptee, default=<class 'traits.adaptation.adaptation_error.AdaptationError'>)[source]

Bases: ILayoutWidget

Interface for data view widgets.

data_model = Instance(AbstractDataModel, allow_none=False)

The data model for the data view.

header_visible = Bool(True)

Whether or not the column headers are visible.

drop_handlers = List(Instance(IDropHandler, allow_none=False))

The global drop handlers for the data view. These are intended to handle drop actions which either affect the whole data view, or where the data handler can work out how to change the underlying data without additional input.

selection_type = Enum("row",)

What can be selected. Implementations may optionally allow “column” and “item” selection types.

selection_mode = Enum("extended", "single")

How selections are modified. Implementations may optionally allow “none” for no selection, or possibly other multiple selection modes as supported by the toolkit.

selection = List(Tuple)

The selected indices in the view.

exporters = List(Instance(AbstractDataExporter))

Exporters available for the DataViewWidget.

class pyface.data_view.i_data_view_widget.MDataViewWidget[source]

Bases: HasTraits

Mixin class for data view widgets.

data_model = Instance(AbstractDataModel, allow_none=False)

The data model for the data view.

header_visible = Bool(True)

Whether or not the column headers are visible.

drop_handlers = List(Instance(IDropHandler, allow_none=False))

The global drop handlers for the data view. These are intended to handle drop actions which either affect the whole data view, or where the data handler can work out how to change the underlying data without additional input.

selection = Property(observe='_selection.items')

The selected indices in the view. This should never be mutated, any changes should be by replacement of the entire list.

exporters = List(Instance(AbstractDataExporter))

Exporters available for the DataViewWidget.

create(parent=None)[source]

Creates the toolkit specific control.

This method should create the control and assign it to the :py:attr:control trait.