'Return a QPainterPath representing the clickable shape of the curve'

def mouseShape(self):

    if (self._mouseShape is None):
        view = self.getViewBox()
        if (view is None):
            return QtGui.QPainterPath()
        stroker = QtGui.QPainterPathStroker()
        path = self.getPath()
        path = self.mapToItem(view, path)
        stroker.setWidth(self.opts['mouseWidth'])
        mousePath = stroker.createStroke(path)
        self._mouseShape = self.mapFromItem(view, mousePath)
    return self._mouseShape
