def METHOD_NAME(self):
    print('***CLOSE***', self.w.belt_1.isChecked())
    if self.w.MAIN.PREFS_:
        # find currently selected front belt button and save it's number
        # default to 1
        temp = 1
        for num,i in enumerate(['belt_1','belt_2','belt_3','belt_4']):
            print (type(i),i,num)
            if self.w[i].isChecked():
                temp = num +1
        self.w.MAIN.PREFS_.putpref('Front_Belt_enabled', temp, int, 'SPINDLE_EXTRAS')
        # find currently selected back belt button and save it's number
        # default to 5
        temp = 5
        for num,i in enumerate(['belt_5','belt_6','belt_7','belt_8']):
            print (type(i),i,num)
            if self.w[i].isChecked():
                temp = num +5
        self.w.MAIN.PREFS_.putpref('Back_Belt_enabled', temp, int, 'SPINDLE_EXTRAS')