Module eagle :: Class Table
[hide private]
[frames] | no frames]

Class Table
source code

object --+        
         |        
 _EGObject --+    
             |    
     _EGWidget --+
                 |
                Table

Data table.

Each column should have only one type, it will be checked. Can be accessed as a python list:
>>> t = Table( 't', 'table', [ 1, 2, 3 ] )
>>> t[ 0 ]
[ 1 ]

>>> del t[ 1 ]
>>> t[ : ]
[ 1, 3 ]


Nested Classes [hide private]
Row  

Instance Methods [hide private]
  __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)
Table constructor.
  __setup_gui__(self)
  __setup_connections__(self)
  __setup_connections_changed__(self)
  __setup_connections_editable__(self)
  __setup_connections_selection__(self)
  __setup_table__(self)
  __setup_model__(self)
  __get_resize_mode__(self)
Return a tuple with ( horizontal, vertical ) resize mode
  columns_autosize(self)
  selected(self)
  append(self, row, select=True, autosize=True)
  insert(self, index, row, select=True, autosize=True)
  __nonzero__(self)
  __len__(self)
  __iadd__(self, other)
  __setitem__(self, index, other)
  __getitem__(self, index)
  __delitem__(self, index)
  __contains__(self, row)
  __getslice__(self, start, end)
  __setslice__(self, start, end, slice)
  __delslice__(self, start, end)

Inherited from _EGWidget: __get_widgets__, hide, set_active, set_inactive, show

Inherited from _EGObject: __repr__, __str__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__


Class Variables [hide private]
spacing  

Inherited from object: __class__


Properties [hide private]

Inherited from _EGWidget: app

Inherited from _EGObject: id


Method Details [hide private]

__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)

source code 
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: _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.

__setup_gui__(self)

source code 

__setup_connections__(self)

source code 

__setup_connections_changed__(self)

source code 

__setup_connections_editable__(self)

source code 

__setup_connections_selection__(self)

source code 

__setup_table__(self)

source code 

__setup_model__(self)

source code 

__get_resize_mode__(self)

source code 
Return a tuple with ( horizontal, vertical ) resize mode
Overrides: _EGWidget.__get_resize_mode__
(inherited documentation)

columns_autosize(self)

source code 

selected(self)

source code 

append(self, row, select=True, autosize=True)

source code 

insert(self, index, row, select=True, autosize=True)

source code 

__nonzero__(self)
(Boolean test operator)

source code 

__len__(self)
(Length operator)

source code 

__iadd__(self, other)

source code 

__setitem__(self, index, other)
(Index assignment operator)

source code 

__getitem__(self, index)
(Indexing operator)

source code 

__delitem__(self, index)
(Index deletion operator)

source code 

__contains__(self, row)
(In operator)

source code 

__getslice__(self, start, end)
(Slicling operator)

source code 

__setslice__(self, start, end, slice)
(Slice assignment operator)

source code 

__delslice__(self, start, end)
(Slice deletion operator)

source code 

Class Variable Details [hide private]

spacing

Value:
3