Bugfix: Malformed tables.

This commit is contained in:
tommy3001 2014-02-05 20:03:25 +01:00
parent 92d7bbe18e
commit 8b6ff6b06a
2 changed files with 46 additions and 46 deletions

View File

@ -52,17 +52,17 @@ class ColorMap(object):
def __init__(self, pos, color, mode=None): def __init__(self, pos, color, mode=None):
""" """
========= ============================================================== =============== ==============================================================
**Arguments:** **Arguments:**
pos Array of positions where each color is defined pos Array of positions where each color is defined
color Array of RGBA colors. color Array of RGBA colors.
Integer data types are interpreted as 0-255; float data types Integer data types are interpreted as 0-255; float data types
are interpreted as 0.0-1.0 are interpreted as 0.0-1.0
mode Array of color modes (ColorMap.RGB, HSV_POS, or HSV_NEG) mode Array of color modes (ColorMap.RGB, HSV_POS, or HSV_NEG)
indicating the color space that should be used when indicating the color space that should be used when
interpolating between stops. Note that the last mode value is interpolating between stops. Note that the last mode value is
ignored. By default, the mode is entirely RGB. ignored. By default, the mode is entirely RGB.
========= ============================================================== =============== ==============================================================
""" """
self.pos = pos self.pos = pos
self.color = color self.color = color
@ -193,16 +193,16 @@ class ColorMap(object):
""" """
Return an RGB(A) lookup table (ndarray). Return an RGB(A) lookup table (ndarray).
============= ============================================================================ =============== =============================================================================
**Arguments:** **Arguments:**
start The starting value in the lookup table (default=0.0) start The starting value in the lookup table (default=0.0)
stop The final value in the lookup table (default=1.0) stop The final value in the lookup table (default=1.0)
nPts The number of points in the returned lookup table. nPts The number of points in the returned lookup table.
alpha True, False, or None - Specifies whether or not alpha values are included alpha True, False, or None - Specifies whether or not alpha values are included
in the table. If alpha is None, it will be automatically determined. in the table. If alpha is None, it will be automatically determined.
mode Determines return type: 'byte' (0-255), 'float' (0.0-1.0), or 'qcolor'. mode Determines return type: 'byte' (0-255), 'float' (0.0-1.0), or 'qcolor'.
See :func:`map() <pyqtgraph.ColorMap.map>`. See :func:`map() <pyqtgraph.ColorMap.map>`.
============= ============================================================================ =============== =============================================================================
""" """
if isinstance(mode, basestring): if isinstance(mode, basestring):
mode = self.enumMap[mode.lower()] mode = self.enumMap[mode.lower()]

View File

@ -107,33 +107,33 @@ class Parameter(QtCore.QObject):
Parameter instance, the options available to this method are also allowed Parameter instance, the options available to this method are also allowed
by most Parameter subclasses. by most Parameter subclasses.
================= ========================================================= ======================= =========================================================
**Keyword Arguments:** **Keyword Arguments:**
name The name to give this Parameter. This is the name that name The name to give this Parameter. This is the name that
will appear in the left-most column of a ParameterTree will appear in the left-most column of a ParameterTree
for this Parameter. for this Parameter.
value The value to initially assign to this Parameter. value The value to initially assign to this Parameter.
default The default value for this Parameter (most Parameters default The default value for this Parameter (most Parameters
provide an option to 'reset to default'). provide an option to 'reset to default').
children A list of children for this Parameter. Children children A list of children for this Parameter. Children
may be given either as a Parameter instance or as a may be given either as a Parameter instance or as a
dictionary to pass to Parameter.create(). In this way, dictionary to pass to Parameter.create(). In this way,
it is possible to specify complex hierarchies of it is possible to specify complex hierarchies of
Parameters from a single nested data structure. Parameters from a single nested data structure.
readonly If True, the user will not be allowed to edit this readonly If True, the user will not be allowed to edit this
Parameter. (default=False) Parameter. (default=False)
enabled If False, any widget(s) for this parameter will appear enabled If False, any widget(s) for this parameter will appear
disabled. (default=True) disabled. (default=True)
visible If False, the Parameter will not appear when displayed visible If False, the Parameter will not appear when displayed
in a ParameterTree. (default=True) in a ParameterTree. (default=True)
renamable If True, the user may rename this Parameter. renamable If True, the user may rename this Parameter.
(default=False) (default=False)
removable If True, the user may remove this Parameter. removable If True, the user may remove this Parameter.
(default=False) (default=False)
expanded If True, the Parameter will appear expanded when expanded If True, the Parameter will appear expanded when
displayed in a ParameterTree (its children will be displayed in a ParameterTree (its children will be
visible). (default=True) visible). (default=True)
================= ========================================================= ======================= =========================================================
""" """
@ -676,7 +676,7 @@ class Parameter(QtCore.QObject):
Called when the state of any sub-parameter has changed. Called when the state of any sub-parameter has changed.
========== ================================================================ ========== ================================================================
**Arguments:** Arguments:
param The immediate child whose tree state has changed. param The immediate child whose tree state has changed.
note that the change may have originated from a grandchild. note that the change may have originated from a grandchild.
changes List of tuples describing all changes that have been made changes List of tuples describing all changes that have been made