Skip to main content
Version: Next

PlotDataDict

class compolyx.plot_data.PlotDataDict(name, label=None, obj=None, list=[], item_type=<class 'object'>, parent=None, key_attr='name')

Attributes

NameDescription
PlotDataDict.enabledWhether this object is currently enabled or not
PlotDataDict.is_dict_itemSpecifies whether the object is an item of a dict
PlotDataDict.is_list_itemSpecifies whether the object is an item of a list
PlotDataDict.item_typeType of items stored in this UIDict
PlotDataDict.key_attrName of attribute of item objects which is mapped to the key of the UIDict
PlotDataDict.label
PlotDataDict.link_pathRoot path of the current node in the tree for links to this object
PlotDataDict.nameName of object
PlotDataDict.parentParent object in tree
PlotDataDict.root_pathRoot path of the current node in the tree

Methods

NameDescription
PlotDataDict.append(value)Append a new item to the UIDict
PlotDataDict.clear()
PlotDataDict.copy_plot(source)Copy a plot object
PlotDataDict.extend(values)Extend the UIDict with multiple items at once
PlotDataDict.find(func)Return the value of the first value in dict where func(value) == True
PlotDataDict.find_key(func)Return the key of the first value in dict where func(value) == True
PlotDataDict.find_parent(type)Function steps up the tree and returns the first parent with given type
PlotDataDict.get(key[, default])
PlotDataDict.index(key)
PlotDataDict.items()Return ordered list with (key,value) pairs
PlotDataDict.iteritems()
PlotDataDict.iterkeys()
PlotDataDict.itervalues()
PlotDataDict.keys()
PlotDataDict.new(name[, type])
PlotDataDict.rename(old_name, new_name)Rename function which updates the name of the object by calling obj._update_name(new_name)
PlotDataDict.sort([cmp, key, reverse])
PlotDataDict.update_key(old)Update old key of object to the current value of the key_attr attribute of this object
PlotDataDict.values()
PlotDataDict.visit(visitor)Walk through the tree and let the visitor perform action on every descendant node