'Initialize a Parameter object. Although it is rare to directly create a
Parameter instance, the options available to this method are also allowed
by most Parameter subclasses.
**Keyword Arguments:**
name                         The name to give this Parameter. This is the name that
will appear in the left-most column of a ParameterTree
for this Parameter.
value                        The value to initially assign to this Parameter.
default                      The default value for this Parameter (most Parameters
provide an option to \'reset to default\').
children                     A list of children for this Parameter. Children
may be given either as a Parameter instance or as a
dictionary to pass to Parameter.create(). In this way,
it is possible to specify complex hierarchies of
Parameters from a single nested data structure.
readonly                     If True, the user will not be allowed to edit this
Parameter. (default=False)
enabled                      If False, any widget(s) for this parameter will appear
disabled. (default=True)
visible                      If False, the Parameter will not appear when displayed
in a ParameterTree. (default=True)
renamable                    If True, the user may rename this Parameter.
(default=False)
removable                    If True, the user may remove this Parameter.
(default=False)
expanded                     If True, the Parameter will appear expanded when
displayed in a ParameterTree (its children will be
visible). (default=True)
title                        (str or None) If specified, then the parameter will be
displayed to the user using this string as its name.
However, the parameter will still be referred to
internally using the *name* specified above. Note that
this option is not compatible with renamable=True.
(default=None; added in version 0.9.9)'

def __init__(self, **opts):

    QtCore.QObject.__init__(self)
    self.opts = {'type': None, 'readonly': False, 'visible': True, 'enabled': True, 'renamable': False, 'removable': False, 'strictNaming': False, 'expanded': True, 'title': None}
    self.opts.update(opts)
    self.childs = []
    self.names = {}
    self.items = weakref.WeakKeyDictionary()
    self._parent = None
    self.treeStateChanges = []
    self.blockTreeChangeEmit = 0
    if ('value' not in self.opts):
        self.opts['value'] = None
    if (('name' not in self.opts) or (not isinstance(self.opts['name'], basestring))):
        raise Exception('Parameter    must    have    a    string    name    specified    in    opts.')
    self.setName(opts['name'])
    self.addChildren(self.opts.get('children', []))
    if (('value' in self.opts) and ('default' not in self.opts)):
        self.opts['default'] = self.opts['value']
    self.sigValueChanged.connect((lambda param, data: self.emitStateChanged('value', data)))
    self.sigChildAdded.connect((lambda param, *data: self.emitStateChanged('childAdded', data)))
    self.sigChildRemoved.connect((lambda param, data: self.emitStateChanged('childRemoved', data)))
    self.sigParentChanged.connect((lambda param, data: self.emitStateChanged('parent', data)))
    self.sigLimitsChanged.connect((lambda param, data: self.emitStateChanged('limits', data)))
    self.sigDefaultChanged.connect((lambda param, data: self.emitStateChanged('default', data)))
    self.sigNameChanged.connect((lambda param, data: self.emitStateChanged('name', data)))
    self.sigOptionsChanged.connect((lambda param, data: self.emitStateChanged('options', data)))
