'Show calltip'

def show_calltip(self, title, text, signature=False, color='#2D62FF', at_line=None, at_position=None):

    if ((text is None) or (len(text) == 0)):
        return
    if (at_position is None):
        at_position = self.get_position('cursor')
    self.calltip_position = at_position
    if signature:
        (text, wrapped_textlines) = self._format_signature(text)
    else:
        if isinstance(text, list):
            text = '\n                '.join(text)
        text = text.replace('\n', '<br>')
        if (len(text) > self.calltip_size):
            text = (text[:self.calltip_size] + '    ...')
    font = self.font()
    size = font.pointSize()
    family = font.family()
    format1 = ('<div    style=\'font-family:    "%s";    font-size:    %spt;    color:    %s\'>' % (family, size, color))
    format2 = ('<div    style=\'font-family:    "%s";    font-size:    %spt\'>' % (family, ((size - 1) if (size > 9) else size)))
    tiptext = (((((format1 + ('<b>%s</b></div>' % title)) + '<hr>') + format2) + text) + '</div>')
    (cx, cy) = self.get_coordinates('cursor')
    if (at_line is not None):
        cx = 5
        cursor = QTextCursor(self.document().findBlockByNumber((at_line - 1)))
        cy = self.cursorRect(cursor).top()
    point = self.mapToGlobal(QPoint(cx, cy))
    point = self.calculate_real_position(point)
    point.setY(((point.y() + font.pointSize()) + 5))
    if signature:
        self.calltip_widget.show_tip(point, tiptext, wrapped_textlines)
    else:
        QToolTip.showText(point, tiptext)
