An enhanced version of GtkTreeView, which provides pythonic wrappers
for accessing rows, and optional facilities for column sorting (with
types) and column selection.
Items in an ObjectList is stored in objects. Each row represents an
object and each column represents an attribute in the object. The column
description object must be a subclass of
Method Summary |
|
add_list (self,
instances,
clear)
Allows a list to be loaded, by default clearing it first. |
|
append (self,
instance,
select)
Adds an instance to the list. |
|
clear (self)
Removes all the instances of the list |
|
count (self,
item)
L.count(item) -> integer -- return number of occurrences of
value |
|
double_click (self,
rowno)
Same as double clicking on the row rowno |
|
extend (self,
iterable)
Extend list by appending elements from the iterable |
|
get_column_by_name (self,
name)
Returns the name of a column |
|
get_columns(self)
|
|
get_model (self)
Return treemodel of the current list |
|
get_next (self,
instance)
Returns the item after instance in the list. |
|
get_previous (self,
instance)
Returns the item before instance in the list. |
|
get_selected (self)
Returns the currently selected object If an object is not selected,
None is returned |
|
get_selected_row_number (self)
Return the selected row number or None if no rows were selected |
|
get_selected_rows (self)
Returns a list of currently selected objects If no objects are
selected an empty list is returned |
|
get_selection_mode(self)
|
|
get_treeview (self)
Return treeview of the current list |
|
get_treeview_column (self,
column)
|
|
index (self,
item,
start,
stop)
Return first index of value |
|
insert (self,
index,
item)
L.insert(index, item) -- insert object before index |
|
pop (self,
index)
Remove and return item at index (default last) |
|
prop_get_selection_mode(self)
|
|
prop_set_selection_mode(self,
mode)
|
|
refresh (self,
view_only)
Reloads the values from all objects. |
|
remove (self,
instance,
select)
Remove an instance from the list. |
|
reverse (self,
pos,
item)
L.reverse() -- reverse *IN PLACE* |
|
select(self,
instance,
scroll)
|
|
select_paths (self,
paths)
Selects a number of rows corresponding to paths |
|
set_column_visibility(self,
column_index,
visibility)
|
|
set_columns (self,
columns)
|
|
set_headers_visible (self,
value)
|
|
set_selection_mode(self,
mode)
|
|
sort (self,
pos,
item)
L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;
cmp(x, y) -> -1, 0, 1 |
|
unselect_all(self)
|
|
update(self,
instance)
|
Inherited from PropertyObject |
|
do_get_property (self,
pspec)
|
|
do_set_property (self,
pspec,
value)
|
|
get_attribute_names (self)
|
|
is_default_value (self,
attr,
value)
|