def METHOD_NAME(self):
    self.format = self.textEdit.currentCharFormat()
    self.underlineButton.setChecked(self.format.fontUnderline())
    self.overlineButton.setChecked(self.format.fontOverline())
    if self.format.fontWeight() == QtGui.QFont.Bold:
        self.boldButton.setChecked(True)
    else:
        self.boldButton.setChecked(False)
    if self.format.verticalAlignment() == QtGui.QTextCharFormat.AlignSuperScript:
        self.superscriptButton.setChecked(True)
        self.subscriptButton.setChecked(False)
    elif self.format.verticalAlignment() == QtGui.QTextCharFormat.AlignSubScript:
        self.superscriptButton.setChecked(False)
        self.subscriptButton.setChecked(True)
    else:
        self.superscriptButton.setChecked(False)
        self.subscriptButton.setChecked(False)