def METHOD_NAME(self, style):
    charFormat, blockFormat = self.textStyles[style]
    cursor = self.output.textCursor()
    cursor.setBlockFormat(blockFormat)
    self.output.setCurrentCharFormat(charFormat)