Data table.
Each column should have only one type, it will be checked. Can be
accessed as a python list:
Method Summary |
|
__init__ (self,
id,
label,
items,
types,
headers,
show_headers,
editable,
expand_columns_indexes,
selection_callback,
data_changed_callback)
Table constructor. |
|
__contains__(self,
row)
|
|
__delitem__(self,
index)
|
|
__delslice__(self,
start,
end)
|
|
__get_resize_mode__ (self)
Return a tuple with ( horizontal, vertical ) resize mode |
|
__getitem__(self,
index)
|
|
__getslice__(self,
start,
end)
|
|
__iadd__(self,
other)
|
|
__len__(self)
|
|
__nonzero__(self)
|
|
__setitem__(self,
index,
other)
|
|
__setslice__(self,
start,
end,
slice)
|
|
__setup_connections__(self)
|
|
__setup_connections_changed__(self)
|
|
__setup_connections_editable__(self)
|
|
__setup_connections_selection__(self)
|
|
__setup_gui__(self)
|
|
__setup_model__(self)
|
|
__setup_table__(self)
|
|
append(self,
row,
select,
autosize)
|
|
columns_autosize(self)
|
|
insert(self,
index,
row,
select,
autosize)
|
|
selected(self)
|
Inherited from object |
|
__delattr__ (...)
x.__delattr__('name') <==> del x.name |
|
__getattribute__ (...)
x.__getattribute__('name') <==> x.name |
|
__hash__ (x)
x.__hash__() <==> hash(x) |
|
__new__ (T,
S,
...)
T.__new__(S, ...) -> a new object with type S, a subtype of T |
|
__reduce__ (...)
helper for pickle |
|
__reduce_ex__ (...)
helper for pickle |
|
__setattr__ (...)
x.__setattr__('name', value) <==> x.name = value |
__init__(self,
id,
label,
items=None,
types=None,
headers=None,
show_headers=True,
editable=False,
expand_columns_indexes=None,
selection_callback=None,
data_changed_callback=None)
(Constructor)
Table constructor.
-
- Parameters:
id -
unique identifier.
label -
what to show on table frame
items -
a list (single column) or list of lists (multiple columns)
types -
a list of types (str, int, long, float, unicode, bool) for
columns, if omitted, will be guessed from items.
headers -
what to use as table header.
show_headers -
whenever to show table headers
editable -
if table is editable. If editable, user can change values
inline or double-clicking, also edit buttons will show after the
table.
expand_columns_indexes -
list of indexes that can expand size
selection_callback -
the function (or list of functions) to call when selection
changes. Function will get as parameters:
-
App reference
-
Table reference
-
List of pairs ( index, row_contents )
data_changed_callback -
the function (or list of functions) to call when data changes.
Function will get as parameters:
-
App reference
-
Table reference
-
Pair ( index, row_contents )
- Overrides:
eagle._EGWidget.__init__
Warning: although this widget contains data, it's not a _EGDataWidget and thus
will not notify application that data changed, also it cannot persist
it's data automatically, if you wish, do it manually. This behavior may
change in future if Table show to be useful as _EGDataWidget.
|