Saves the current UI setting to the model

def saveToObject(self):
        """Saves the current UI setting to the model"""
        for i in range(self.ui.caleditorStack.count()):
            try:
                self.ui.caleditorStack.widget(i).saveToObject()
            except AttributeError:
                logger = logging.getLogger('main')
                logger.debug('index {} does not have method saveToObject'.format(i))