def METHOD_NAME(self):
    """Called on close. Save settings and checkboxes state."""
    s = QSettings()
    s.beginGroup('lilypond_settings')
    for mode in layoutcontrol.modelist():
        s.setValue(mode, self.checkboxes[mode].isChecked())
    s.setValue('verbose', self.CBverbose.isChecked())
    s.setValue('point-and-click', self.CBpointandclick.isChecked())
    s.setValue('custom-file', self.CBcustomfile.isChecked())
    s.setValue('custom-filename', self.LEcustomfile.text())