qubx :: table :: ObjectTable :: Class ObjectTable
[hide private]
[frames] | no frames]

Class ObjectTable

source code

object --+    
         |    
     Table --+
             |
            ObjectTable
Known Subclasses:

Implements Table as a list of pre-existing objects. You define a field with get and set functions on an object.

Instance Methods [hide private]
 
__init__(self, label, global_name='')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
get_size(self) source code
 
add_field(self, name, default, accept, format, units, choices=None, get=<__builtin__.function object>, set=<__builtin__.function object>, independent=False)
Adds a column.
source code
 
insert(self, i, obj, undoing=False) source code
 
remove(self, i, undoing=False) source code
 
get(self, i, field_name) source code
 
set(self, i, field_name, val, undoing=False) source code
 
_onChangeField(self, obj, field_name) source code

Inherited from Table: __getitem__, __iter__, __len__, __setitem__, __str__, add_field_to_stats, add_notebook_item, all_rows, append, calc_expr_values, check_rows_if, clear, copy_rows_from, dispose, from_json, from_text, get_by_name, get_row, get_row_by_name, index, nb_get_caption, nb_get_col, nb_get_col_format, nb_get_headers, nb_get_row, nb_get_shape, nb_get_type, remove_field_from_stats, rows_meeting_criteria, select, set_checked, set_global_name, to_json, to_text

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Instance Variables [hide private]

Inherited from Table: OnAddField, OnAfterInsert, OnChecked, OnDoubleClick, OnInsert, OnRemoved, OnRemoving, OnRemovingField, OnSelect, OnSet, accept, all_stats, checked, choices, count_in_group, default, field_stats, fields, fields_independent, format, global_name, group_stats, groups_occupied, label, mean, median, mode, rows_in_group, size, sortable, std, units, user_can_remove

Properties [hide private]
  __ref
  __setting_field
  entries
  getter
  setter

Inherited from Table: custom, max_bools, max_fields, notebook, notebook_items

Inherited from object: __class__

Method Details [hide private]

__init__(self, label, global_name='')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

add_field(self, name, default, accept, format, units, choices=None, get=<__builtin__.function object>, set=<__builtin__.function object>, independent=False)

source code 

Adds a column.

Parameters:
  • name - column label
  • default - default value
  • accept - f(str) -> value; can raise Exception on invalid input
  • format - f(value) -> str, or a printf-style format string (e.g. "%.6g")
  • units - string
  • choices - a list of acceptable values, or None to just use the accept function
  • get - f(object) -> value
  • set - f(object, value)

insert(self, i, obj, undoing=False)

source code 
Overrides: Table.insert

remove(self, i, undoing=False)

source code 
Overrides: Table.remove

get(self, i, field_name)

source code 
Overrides: Table.get

set(self, i, field_name, val, undoing=False)

source code 
Overrides: Table.set