Part of kiwi.ui.listdialog View In Hierarchy
A ListDialog implements a ListContainer
in a gtk.Dialog
with a close button.
It's a simple Base class which needs to be subclassed to provide interesting functionality.
Example: >>> class MyListDialog(ListDialog): ... ... columns = [Column('name')] ... list_type = ListType.UNEDITABLE ... ... def populate(self): ... return [Settable(name='test')] ... ... def add_item(self): ... return Settable(name="added")
>>> dialog = MyListDialog()
>>> dialog.run()
Method | __init__ | Undocumented |
Method | _on_listcontainer__add_item | Undocumented |
Method | _on_listcontainer__remove_item | Undocumented |
Method | _on_listcontainer__edit_item | Undocumented |
Method | _on_listcontainer__selection_changed | Undocumented |
Method | set_list_type | |
Method | add_list_item | |
Method | add_list_items | |
Method | remove_list_item | |
Method | update_list_item | |
Method | default_remove | Undocumented |
Method | add_item | This must be implemented in a subclass if you want to be able |
Method | remove_item | A subclass can implement this to get a notification after |
Method | edit_item | A subclass must implement this if you want to support editing |
Method | selection_changed | This will be called when the selection changes in the ListDialog |
Method | populate | This will be called once after the user interface construction is done. |
This must be implemented in a subclass if you want to be able to add items.
It should return the model you want to add to the list or None if you don't want anything to be added, eg the user cancelled creation of the modeldefault_remove
will be called
Returns | False if the item should not be removed |
Returns | False if the item should not be removed |