'Add a graphics item to the view box.
If the item has plot data (PlotDataItem, PlotCurveItem, ScatterPlotItem), it may
be included in analysis performed by the PlotItem.'

def addItem(self, item, *args, **kargs):

    self.items.append(item)
    vbargs = {}
    if ('ignoreBounds' in kargs):
        vbargs['ignoreBounds'] = kargs['ignoreBounds']
    self.vb.addItem(item, *args, **vbargs)
    name = None
    if (hasattr(item, 'implements') and item.implements('plotData')):
        name = item.name()
        self.dataItems.append(item)
        params = kargs.get('params', {})
        self.itemMeta[item] = params
        self.curves.append(item)
    if hasattr(item, 'setLogMode'):
        item.setLogMode(self.ctrl.logXCheck.isChecked(), self.ctrl.logYCheck.isChecked())
    if isinstance(item, PlotDataItem):
        (alpha, auto) = self.alphaState()
        item.setAlpha(alpha, auto)
        item.setFftMode(self.ctrl.fftCheck.isChecked())
        item.setDownsampling(*self.downsampleMode())
        item.setClipToView(self.clipToViewMode())
        item.setPointMode(self.pointMode())
        self.updateDecimation()
        self.updateParamList()
        if (self.ctrl.averageGroup.isChecked() and ('skipAverage' not in kargs)):
            self.addAvgCurve(item)
    if ((name is not None) and hasattr(self, 'legend') and (self.legend is not None)):
        self.legend.addItem(item, name=name)
