exopy.utils.widgets.qt_list_str_widget module

Basic list widget limited to selection.

class exopy.utils.widgets.qt_list_str_widget.QtListStrWidget(parent=None, **kwargs)[source]

Bases: enaml.widgets.raw_widget.RawWidget

A list widget for Enaml displaying objects as strings.

Objects that are not string should be convertible to str and hashable.

items

The list of str being viewed

selected_item

The list of the currently selected str

selected_items

A member which allows list values.

Assigning to a list creates a copy. The orginal list will remain unmodified. This is similar to the semantics of the assignment operator on the C++ STL container classes.

multiselect

Whether or not the user can select multiple lines

to_string

Callable to use to build a unicode representation of the objects (one at a time).

sort

Whether or not to sort the items before inserting them.

hug_width

A member where the value can be one in a sequence of items.

hug_height

A member where the value can be one in a sequence of items.

initialize()[source]

Ensures that the selected members always have meaningful values.

refresh_items()[source]

Refresh the items displayed in the list.

This is useful after an inplace operation on the list which is not notified.

clear_selection()[source]

Make no item be selected.

create_widget(parent)[source]

Create the QListView widget.

on_selection()[source]

The signal handler for the index changed signal.

w
e
a
k
r
f