def refreshUi(self):
        """
        Matches the UI state to the current cursor positioning.
        """
        font = self.currentFont()
        
        for name in ('underline', 'bold', 'italic', 'strikeOut'):
            getter = getattr(font, name)
            act = self._actions[name]
            act.blockSignals(True)
            act.setChecked(getter())
            act.blockSignals(False)
Matches the UI state to the current cursor positioning.