Class k.u.l.ListDialog(gtk.Dialog):

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.
def __init__(self, columns=None):
Undocumented
def _on_listcontainer__add_item(self, listcontainer):
Undocumented
def _on_listcontainer__remove_item(self, listcontainer, item):
Undocumented
def _on_listcontainer__edit_item(self, listcontainer, item):
Undocumented
def _on_listcontainer__selection_changed(self, listcontainer, selection):
Undocumented
def set_list_type(self, list_type):
See AlsoListcontainer.set_list_type
def add_list_item(self, item):
See AlsoListcontainer.add_item
def add_list_items(self, item):
See AlsoListcontainer.add_items
def remove_list_item(self, item):
See AlsoListcontainer.remove_item
def update_list_item(self, item):
See AlsoListcontainer.edit_item
def default_remove(self, item):
Undocumented
def add_item(self):

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 model
def remove_item(self, item):
A subclass can implement this to get a notification after an item is removed. If it's not implemented default_remove will be called
ReturnsFalse if the item should not be removed
def edit_item(self, item):
A subclass must implement this if you want to support editing of objects.
ReturnsFalse if the item should not be removed
def selection_changed(self, selection):
This will be called when the selection changes in the ListDialog
Parametersselectionselected object or None if nothing is selected
def populate(self):
This will be called once after the user interface construction is done. It should return a list of objects which will initially be inserted
Returnsobject to insert (type: sequence of objects )
API Documentation for Kiwi, generated by pydoctor.