Quick search

Table Of Contents

DictAdapter

バージョン 1.5 で追加.

バージョン 1.10.0 で撤廃: The feature has been deprecated.

警告

This code is still experimental, and its API is subject to change in a future version.

A DictAdapter is an adapter around a python dictionary of records. It extends the list-like capabilities of the ListAdapter.

If you wish to have a bare-bones list adapter, without selection, use the SimpleListAdapter.

class kivy.adapters.dictadapter.DictAdapter(**kwargs)[ソース]

ベースクラス: kivy.adapters.listadapter.ListAdapter

A DictAdapter is an adapter around a python dictionary of records. It extends the list-like capabilities of the ListAdapter.

cut_to_sel(*args)[ソース]

Same as trim_to_sel, but intervening list items within the selected range are also cut, leaving only list items that are selected.

sorted_keys will be updated by update_for_new_data().

data

A dict that indexes records by keys that are equivalent to the keys in sorted_keys, or they are a superset of the keys in sorted_keys.

The values can be strings, class instances, dicts, etc.

data is a DictProperty and defaults to None.

sorted_keys

The sorted_keys list property contains a list of hashable objects (can be strings) that will be used directly if no args_converter function is provided. If there is an args_converter, the record received from a lookup of the data, using keys from sorted_keys, will be passed to it for instantiation of list item view class instances.

sorted_keys is a ListProperty and defaults to [].

trim_left_of_sel(*args)[ソース]

Cut list items with indices in sorted_keys that are less than the index of the first selected item, if there is a selection.

sorted_keys will be updated by update_for_new_data().

trim_right_of_sel(*args)[ソース]

Cut list items with indices in sorted_keys that are greater than the index of the last selected item, if there is a selection.

sorted_keys will be updated by update_for_new_data().

trim_to_sel(*args)[ソース]

Cut list items with indices in sorted_keys that are les than or greater than the index of the last selected item, if there is a selection. This preserves intervening list items within the selected range.

sorted_keys will be updated by update_for_new_data().