Catch remaining 'values' usages
This commit is contained in:
parent
6f44d27f2d
commit
3d15ca1038
|
@ -115,9 +115,9 @@ children = [
|
||||||
dict(name='enableExperimental', type='bool', value=pg.getConfigOption('enableExperimental')),
|
dict(name='enableExperimental', type='bool', value=pg.getConfigOption('enableExperimental')),
|
||||||
dict(name='pen', type='pen', value=default_pen),
|
dict(name='pen', type='pen', value=default_pen),
|
||||||
dict(name='antialias', type='bool', value=pg.getConfigOption('antialias')),
|
dict(name='antialias', type='bool', value=pg.getConfigOption('antialias')),
|
||||||
dict(name='connect', type='list', values=['all', 'pairs', 'finite', 'array'], value='all'),
|
dict(name='connect', type='list', limits=['all', 'pairs', 'finite', 'array'], value='all'),
|
||||||
dict(name='skipFiniteCheck', type='bool', value=False),
|
dict(name='skipFiniteCheck', type='bool', value=False),
|
||||||
dict(name='plotMethod', title='Plot Method', type='list', values=['pyqtgraph', 'drawPolyline', 'drawLines'])
|
dict(name='plotMethod', title='Plot Method', type='list', limits=['pyqtgraph', 'drawPolyline', 'drawLines'])
|
||||||
]
|
]
|
||||||
|
|
||||||
params = ptree.Parameter.create(name='Parameters', type='group', children=children)
|
params = ptree.Parameter.create(name='Parameters', type='group', children=children)
|
||||||
|
|
|
@ -26,7 +26,7 @@ param = ptree.Parameter.create(name=translate('ScatterPlot', 'Parameters'), type
|
||||||
dict(name='randomize', title=translate('ScatterPlot', 'Randomize: '), type='bool', value=False),
|
dict(name='randomize', title=translate('ScatterPlot', 'Randomize: '), type='bool', value=False),
|
||||||
dict(name='pxMode', title='pxMode: ', type='bool', value=True),
|
dict(name='pxMode', title='pxMode: ', type='bool', value=True),
|
||||||
dict(name='useCache', title='useCache: ', type='bool', value=True),
|
dict(name='useCache', title='useCache: ', type='bool', value=True),
|
||||||
dict(name='mode', title=translate('ScatterPlot', 'Mode: '), type='list', values={translate('ScatterPlot', 'New Item'): 'newItem', translate('ScatterPlot', 'Reuse Item'): 'reuseItem', translate('ScatterPlot', 'Simulate Pan/Zoom'): 'panZoom', translate('ScatterPlot', 'Simulate Hover'): 'hover'}, value='reuseItem'),
|
dict(name='mode', title=translate('ScatterPlot', 'Mode: '), type='list', limits={translate('ScatterPlot', 'New Item'): 'newItem', translate('ScatterPlot', 'Reuse Item'): 'reuseItem', translate('ScatterPlot', 'Simulate Pan/Zoom'): 'panZoom', translate('ScatterPlot', 'Simulate Hover'): 'hover'}, value='reuseItem'),
|
||||||
])
|
])
|
||||||
for c in param.children():
|
for c in param.children():
|
||||||
c.setDefault(c.value())
|
c.setDefault(c.value())
|
||||||
|
|
|
@ -27,10 +27,10 @@ class RelativityGUI(QtGui.QWidget):
|
||||||
self.objectGroup = ObjectGroupParam()
|
self.objectGroup = ObjectGroupParam()
|
||||||
|
|
||||||
self.params = Parameter.create(name='params', type='group', children=[
|
self.params = Parameter.create(name='params', type='group', children=[
|
||||||
dict(name='Load Preset..', type='list', values=[]),
|
dict(name='Load Preset..', type='list', limits=[]),
|
||||||
#dict(name='Unit System', type='list', values=['', 'MKS']),
|
#dict(name='Unit System', type='list', limits=['', 'MKS']),
|
||||||
dict(name='Duration', type='float', value=10.0, step=0.1, limits=[0.1, None]),
|
dict(name='Duration', type='float', value=10.0, step=0.1, limits=[0.1, None]),
|
||||||
dict(name='Reference Frame', type='list', values=[]),
|
dict(name='Reference Frame', type='list', limits=[]),
|
||||||
dict(name='Animate', type='bool', value=True),
|
dict(name='Animate', type='bool', value=True),
|
||||||
dict(name='Animation Speed', type='float', value=1.0, dec=True, step=0.1, limits=[0.0001, None]),
|
dict(name='Animation Speed', type='float', value=1.0, dec=True, step=0.1, limits=[0.0001, None]),
|
||||||
dict(name='Recalculate Worldlines', type='action'),
|
dict(name='Recalculate Worldlines', type='action'),
|
||||||
|
|
|
@ -194,10 +194,10 @@ class RangeColorMapItem(ptree.types.SimpleParameter):
|
||||||
ptree.types.SimpleParameter.__init__(self,
|
ptree.types.SimpleParameter.__init__(self,
|
||||||
name=name, autoIncrementName=True, type='colormap', removable=True, renamable=True,
|
name=name, autoIncrementName=True, type='colormap', removable=True, renamable=True,
|
||||||
children=[
|
children=[
|
||||||
#dict(name="Field", type='list', value=name, values=fields),
|
#dict(name="Field", type='list', value=name, limits=fields),
|
||||||
dict(name='Min', type='float', value=0.0, suffix=units, siPrefix=True),
|
dict(name='Min', type='float', value=0.0, suffix=units, siPrefix=True),
|
||||||
dict(name='Max', type='float', value=1.0, suffix=units, siPrefix=True),
|
dict(name='Max', type='float', value=1.0, suffix=units, siPrefix=True),
|
||||||
dict(name='Operation', type='list', value='Overlay', values=['Overlay', 'Add', 'Multiply', 'Set']),
|
dict(name='Operation', type='list', value='Overlay', limits=['Overlay', 'Add', 'Multiply', 'Set']),
|
||||||
dict(name='Channels..', type='group', expanded=False, children=[
|
dict(name='Channels..', type='group', expanded=False, children=[
|
||||||
dict(name='Red', type='bool', value=True),
|
dict(name='Red', type='bool', value=True),
|
||||||
dict(name='Green', type='bool', value=True),
|
dict(name='Green', type='bool', value=True),
|
||||||
|
@ -240,7 +240,7 @@ class EnumColorMapItem(ptree.types.GroupParameter):
|
||||||
name=name, autoIncrementName=True, removable=True, renamable=True,
|
name=name, autoIncrementName=True, removable=True, renamable=True,
|
||||||
children=[
|
children=[
|
||||||
dict(name='Values', type='group', children=childs),
|
dict(name='Values', type='group', children=childs),
|
||||||
dict(name='Operation', type='list', value='Overlay', values=['Overlay', 'Add', 'Multiply', 'Set']),
|
dict(name='Operation', type='list', value='Overlay', limits=['Overlay', 'Add', 'Multiply', 'Set']),
|
||||||
dict(name='Channels..', type='group', expanded=False, children=[
|
dict(name='Channels..', type='group', expanded=False, children=[
|
||||||
dict(name='Red', type='bool', value=True),
|
dict(name='Red', type='bool', value=True),
|
||||||
dict(name='Green', type='bool', value=True),
|
dict(name='Green', type='bool', value=True),
|
||||||
|
|
|
@ -130,7 +130,7 @@ class RangeFilterItem(ptree.types.SimpleParameter):
|
||||||
ptree.types.SimpleParameter.__init__(self,
|
ptree.types.SimpleParameter.__init__(self,
|
||||||
name=name, autoIncrementName=True, type='bool', value=True, removable=True, renamable=True,
|
name=name, autoIncrementName=True, type='bool', value=True, removable=True, renamable=True,
|
||||||
children=[
|
children=[
|
||||||
#dict(name="Field", type='list', value=name, values=fields),
|
#dict(name="Field", type='list', value=name, limits=fields),
|
||||||
dict(name='Min', type='float', value=0.0, suffix=units, siPrefix=True),
|
dict(name='Min', type='float', value=0.0, suffix=units, siPrefix=True),
|
||||||
dict(name='Max', type='float', value=1.0, suffix=units, siPrefix=True),
|
dict(name='Max', type='float', value=1.0, suffix=units, siPrefix=True),
|
||||||
])
|
])
|
||||||
|
|
|
@ -31,8 +31,8 @@ def test_types():
|
||||||
dict(name='float', type='float'),
|
dict(name='float', type='float'),
|
||||||
dict(name='int', type='int'),
|
dict(name='int', type='int'),
|
||||||
dict(name='str', type='str'),
|
dict(name='str', type='str'),
|
||||||
dict(name='list', type='list', values=['x','y','z']),
|
dict(name='list', type='list', limits=['x','y','z']),
|
||||||
dict(name='dict', type='list', values={'x':1, 'y':3, 'z':7}),
|
dict(name='dict', type='list', limits={'x':1, 'y':3, 'z':7}),
|
||||||
dict(name='bool', type='bool'),
|
dict(name='bool', type='bool'),
|
||||||
dict(name='color', type='color'),
|
dict(name='color', type='color'),
|
||||||
]
|
]
|
||||||
|
@ -129,8 +129,8 @@ def test_limits_enforcement():
|
||||||
p = pt.Parameter.create(name='params', type='group', children=[
|
p = pt.Parameter.create(name='params', type='group', children=[
|
||||||
dict(name='float', type='float', limits=[0, 1]),
|
dict(name='float', type='float', limits=[0, 1]),
|
||||||
dict(name='int', type='int', bounds=[0, 1]),
|
dict(name='int', type='int', bounds=[0, 1]),
|
||||||
dict(name='list', type='list', values=['x', 'y']),
|
dict(name='list', type='list', limits=['x', 'y']),
|
||||||
dict(name='dict', type='list', values={'x': 1, 'y': 2}),
|
dict(name='dict', type='list', limits={'x': 1, 'y': 2}),
|
||||||
])
|
])
|
||||||
t = pt.ParameterTree()
|
t = pt.ParameterTree()
|
||||||
t.setParameters(p)
|
t.setParameters(p)
|
||||||
|
|
Loading…
Reference in New Issue