Python: module pyui.database

pyui.database | index c:\ninja\projects\pyui\pyui\database.py

`This module uses Twisted Enterprise to interface to a relational database.
For more information see: http://www.twistedmatrix.com
WANRING: this is experimental code and may not work. Multithreaded python database access and PyUI
together are a dangerous combination so far.`

Modules
`` |  |
pyui | twisted.enterprise.row |  |

Classes
`` |  | pyui.widgets.Edit(pyui.widgets.Base) DBGridCell pyui.grid.GridPanel(pyui.widgets.Panel) DBGridPanel pyui.widgets.Label(pyui.widgets.Base) DBKeyCell
class DBGridCell(pyui.widgets.Edit)
`` | `A cell in data grid for a non-key column (can be changed)`
| Method resolution order: DBGridCell pyui.widgets.Edit pyui.widgets.Base Methods defined here: __init__(self, reflector, rowObject, column) draw(self) loseFocus(self) onEnter(self, cell) Data and non-method functions defined here: __doc__ = 'A cell in data grid for a non-key column (can be changed)\n ' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` __module__ = 'pyui.database' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` Methods inherited from pyui.widgets.Edit: deleteSelected(self) findMousePos(self, pos) getFocus(self) onChar(self, event) onClicked(self, event) onKeyDown(self, event) onMouseDown(self, event) onMouseMotion(self, event) onMouseUp(self, event) setText(self, text) `external function to set the text and move the caret to the end` Data and non-method functions inherited from pyui.widgets.Edit: canTab = 1 `int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string.` Methods inherited from pyui.widgets.Base: __del__(self) addChild(self, child) `Add a child widget.` addPopup(self, popup) calcSize(self) `This sets up self.rect to be absolute co-ordinates. also sets up self.windowRect to be relative to the upper left of the parent Window` checkHit(self, pos) clearDirty(self) `Clears this widgets dirty flag.` destroy(self) `Call this to remove all references to the widget from the system.` getToolTipInfo(self, pos) `return a tuple of the text and rectangle for the tooltip for when the mouse is in <pos> within the window. This uses the member variable toolTipInfo if it is populated.` handleEvent(self, event) `event processing for base objects` hasFocus(self) hit(self, pos) `Check for a hit using absolute coordinates.` move(self, dx, dy) `move relative to current position.` moveto(self, x, y) `move to absolute position.` pack(self) `used by panels & layout managers` postEvent(self, eventType) `Post an event to be processed next time through the event loop` registerEvent(self, eventType, handler) `Setup handler for an event` removeChild(self, child) resize(self, w, h) `resize absolute size of the widget` setDirty(self, collide=1) `Sets this widget to redraw itself and notifies window.` setParent(self, parent) `Set the parent of this widget` setShow(self, value) setWindow(self, window) unregisterEvent(self, eventType) `Remove handler for an event`
class DBGridPanel(pyui.grid.GridPanel)
`` | `A Grid Panel to display the rows in a database table. Uses Twisted Enterprise Row objects to interface to the database. This panel loads the data from the database when the panel is created.`
| Method resolution order: DBGridPanel pyui.grid.GridPanel pyui.widgets.Panel pyui.widgets.Base Methods defined here: __init__(self, rowClass, tableName, keyColumns, rows, reflector) gotData(self, rows) `called when the data for the table comes back.` populated(self, dummy) `Called when the rowClass is populated.` refresh(self) Data and non-method functions defined here: __doc__ = 'A Grid Panel to display the rows in a database t... the database\n when the panel is created.\n ' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` __module__ = 'pyui.database' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` Methods inherited from pyui.grid.GridPanel: clear(self) findCellAt(self, posX, posY) `Find the cell at the x,y pixel position. Pass-through to the inner grid panel.` findCoordinatesAt(self, posX, posY) `convert screen co-ordinates into grid co-ordinates.` getCellAt(self, x, y) `return a cell at the co-ordinates.` putCellAt(self, widget, x, y) `put a widget into the grid at the co-ordinates.` removeCellAt(self, x, y) `remove a widget from the grid` resize(self, w, h) setColumnName(self, columnNum, name) setRowName(self, rowNum, name) Methods inherited from pyui.widgets.Panel: addChild(self, child, option=None) destroy(self) draw(self, renderer) `draw the panel's children` getFocus(self) nextTab(self, step=1) onKeyDown(self, event) pack(self) setLayout(self, layout) Methods inherited from pyui.widgets.Base: __del__(self) addPopup(self, popup) calcSize(self) `This sets up self.rect to be absolute co-ordinates. also sets up self.windowRect to be relative to the upper left of the parent Window` checkHit(self, pos) clearDirty(self) `Clears this widgets dirty flag.` getToolTipInfo(self, pos) `return a tuple of the text and rectangle for the tooltip for when the mouse is in <pos> within the window. This uses the member variable toolTipInfo if it is populated.` handleEvent(self, event) `event processing for base objects` hasFocus(self) hit(self, pos) `Check for a hit using absolute coordinates.` loseFocus(self) `lose the gui system's focus.` move(self, dx, dy) `move relative to current position.` moveto(self, x, y) `move to absolute position.` postEvent(self, eventType) `Post an event to be processed next time through the event loop` registerEvent(self, eventType, handler) `Setup handler for an event` removeChild(self, child) setDirty(self, collide=1) `Sets this widget to redraw itself and notifies window.` setParent(self, parent) `Set the parent of this widget` setShow(self, value) setWindow(self, window) unregisterEvent(self, eventType) `Remove handler for an event` Data and non-method functions inherited from pyui.widgets.Base: canTab = 0 `int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string.`
class DBKeyCell(pyui.widgets.Label)
`` | `A cell in a data grid for an immutable key column`
| Method resolution order: DBKeyCell pyui.widgets.Label pyui.widgets.Base Methods defined here: draw(self) Data and non-method functions defined here: __doc__ = 'A cell in a data grid for an immutable key column\n ' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` __module__ = 'pyui.database' `str(object) -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.` Methods inherited from pyui.widgets.Label: __init__(self, text, font=None) setText(self, text) `Set the text of the label. sets the dirty flag.` Methods inherited from pyui.widgets.Base: __del__(self) addChild(self, child) `Add a child widget.` addPopup(self, popup) calcSize(self) `This sets up self.rect to be absolute co-ordinates. also sets up self.windowRect to be relative to the upper left of the parent Window` checkHit(self, pos) clearDirty(self) `Clears this widgets dirty flag.` destroy(self) `Call this to remove all references to the widget from the system.` getFocus(self) `Acquire the gui system's focus. only one Base may have the focus` getToolTipInfo(self, pos) `return a tuple of the text and rectangle for the tooltip for when the mouse is in <pos> within the window. This uses the member variable toolTipInfo if it is populated.` handleEvent(self, event) `event processing for base objects` hasFocus(self) hit(self, pos) `Check for a hit using absolute coordinates.` loseFocus(self) `lose the gui system's focus.` move(self, dx, dy) `move relative to current position.` moveto(self, x, y) `move to absolute position.` pack(self) `used by panels & layout managers` postEvent(self, eventType) `Post an event to be processed next time through the event loop` registerEvent(self, eventType, handler) `Setup handler for an event` removeChild(self, child) resize(self, w, h) `resize absolute size of the widget` setDirty(self, collide=1) `Sets this widget to redraw itself and notifies window.` setParent(self, parent) `Set the parent of this widget` setShow(self, value) setWindow(self, window) unregisterEvent(self, eventType) `Remove handler for an event` Data and non-method functions inherited from pyui.widgets.Base: canTab = 0 `int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string.`

Data
`` |  | __file__ = r'.\pyui\database.py' __name__ = 'pyui.database'