'Set the text margins.'

def setTextMargins(self, left, top, right, bottom):

    margins = (left, top, right, bottom)
    if (self.__textMargins != margins):
        self.__textMargins = margins
        self.__textItem.setPos(left, top)
        self.__textItem.setTextWidth(max(((self.geometry().width() - left) - right), 0))
