Package NetworkEditor :: Module widgets :: Class PortWidget
[hide private]
[frames] | no frames]

Class PortWidget

source code

               object --+    
                        |    
itemBase.NetworkItemsBase --+
                            |
                           PortWidget
Known Subclasses:
TkPortWidget, PmwPortWidget, NEDial, NEMultiCheckButtons, NEThumbWheel, NEVectorGUI, NEXYZGUI

base class for network editor widgets
port:    Port instance to which the widget is bound

master:    parent widget into which the widget will be created
labelCfg:  configuration dictionary for a Tkinter.Label (use to anme the widget

## FIXME .... labelSide is now in the widgetGridCfgXXX 
labelSide: 'left', 'right', 'bottom', 'top'. Describes relative position
           of label and widget. Is used to compute row and column for gridding.
           Defaults to left.
labelGridCfg: label gridding options (other than 'row' and 'column')
widgetGridCfg: label gridding options (other than 'row' and 'column')
NEwidgetPosition: {'posx':i, 'posy':j} will be used to compute real row and col
initialValue: used to set widget in constructor



Instance Methods [hide private]
  __init__(self, port, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  moveWidgetToPanel(self, name)
  postWidgetMenu(self, event=None)
Display menu that allows to display vonfiguration panel or start port or widget editor
  getWidgetGridCfg(self)
select the right widgetGridCfg dictionary based on the panel by default we use se;f.widgetGridCfg, but then check if there is an entry in the node's widgetDescr that is specific for the master (i.e.
  gridLabelAndWidget(self)
  edit(self, event=None)
start widget editor
  label_cb(self)
  destroy(self)
  configure(self, rebuild=True, **kw)
  rebuild(self, rebuildDescr)
  getDescr(self)
  set(self, value, run=1)
  get(self)
  getDataForSaving(self)
  scheduleNode(self)
  newValueCallback(self, event=None)
  compareToOrigWidgetDescr(self)
Compare this widget to the widgetDescr defined in a given network node base class and return a dictionary with the differences

Inherited from itemBase.NetworkItemsBase: delEditor, getEditor, setEditor

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


Class Variables [hide private]
  configOpts = {'initialValue': {'defaultValue': None, 'type': 'Non...
  ownConfigOpts = {}

Properties [hide private]

Inherited from itemBase.NetworkItemsBase: editor

Inherited from object: __class__


Method Details [hide private]

__init__(self, port, **kw)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: itemBase.NetworkItemsBase.__init__

moveWidgetToPanel(self, name)

source code 
None

postWidgetMenu(self, event=None)

source code 
Display menu that allows to display vonfiguration panel or start port or widget editor

getWidgetGridCfg(self)

source code 
select the right widgetGridCfg dictionary based on the panel by default we use se;f.widgetGridCfg, but then check if there is an entry in the node's widgetDescr that is specific for the master (i.e. 'node', 'ParamPanel' or a user panel

gridLabelAndWidget(self)

source code 
None

edit(self, event=None)

source code 
start widget editor

label_cb(self)

source code 
None

destroy(self)

source code 
None

configure(self, rebuild=True, **kw)

source code 
None

rebuild(self, rebuildDescr)

source code 
None

getDescr(self)

source code 
None

set(self, value, run=1)

source code 
None

get(self)

source code 
None

getDataForSaving(self)

source code 
None

scheduleNode(self)

source code 
None

newValueCallback(self, event=None)

source code 
None

compareToOrigWidgetDescr(self)

source code 
Compare this widget to the widgetDescr defined in a given network node base class and return a dictionary with the differences

Class Variable Details [hide private]

configOpts

None
Value:
{'NEwidgetPosition': {'defaultValue': {},
                      'description': "dict of type { 'posx':i, 'posy':
j} use to place this NEwidget (label+widget) relative to other NEwidge
ts (2x2 sub-grid) also accepts {'row':i, 'column':j} to specify the re
al row and column",
                      'type': 'dict'},
 'initialValue': {'defaultValue': None, 'type': 'None'},
 'labelCfg': {'defaultValue': {'text': ''},
...                                                                    
      

ownConfigOpts

None
Value:
{}