'Add a new entry to the legend.
**Arguments:**
item            A PlotDataItem from which the line and point style
of the item will be determined or an instance of
ItemSample (or a subclass), allowing the item display
to be customized.
title           The title to display for this item. Simple HTML allowed.'

def addItem(self, item, name):

    label = LabelItem(name)
    if isinstance(item, ItemSample):
        sample = item
    else:
        sample = ItemSample(item)
    row = self.layout.rowCount()
    self.items.append((sample, label))
    self.layout.addItem(sample, row, 0)
    self.layout.addItem(label, row, 1)
    self.updateSize()
