'Adds a custom PlotItem ``curve`` to the plot.
If ``enableLegend`` is ``True``, a curve symbol defined by
:meth:`.OWCurve.point_item` and the ``curve``\'s name
:obj:`.OWCurve.name` is added to the legend.
This function recalculates axis bounds and replots the plot if needed.
:param curve: The curve to add
:type curve: :obj:`.OWCurve`'

def add_custom_curve(self, curve, enableLegend=False):

    self.add_item(curve)
    if enableLegend:
        self.legend().add_curve(curve)
    for key in [curve.axes()]:
        if (key in self._bounds_cache):
            del self._bounds_cache[key]
    self._transform_cache = {}
    if hasattr(curve, 'tooltip'):
        curve.setToolTip(curve.tooltip)
    (x, y) = curve.axes()
    if (curve.is_auto_scale() and (self.is_axis_auto_scale(x) or self.is_axis_auto_scale(y))):
        self.set_dirty()
        self.replot()
    else:
        curve.set_graph_transform(self.transform_for_axes(x, y))
        curve.update_properties()
    return curve
