def triggerUpdate(self):
self.caluser.updateProfile(self.inp)
self.Root.toolbar.title = "CalTrac - %s" % date.isoformat(date.today())
self.Root.nameLbl.text = 'About ' + self.caluser.getDict('name')
self.Root.heightLbl.text = 'Height: ' + self.caluser.getDict('height')
self.Root.weightLbl.text = 'Weight: ' + self.caluser.getDict('weight')
self.Root.ageLbl.text = 'Age: ' + self.caluser.getDict('age')
if self.caluser.getDict('preg') == '0':
self.Root.genderLbl.text = 'Gender: ' + self.caluser.getDict('gender')
self.Root.kcalTxt.text = 'Kcal target: ' + str(int(float(self.caluser.getDict('bmr'))))
else:
self.Root.genderLbl.text = 'Gender: %s (Pregnant)' % self.caluser.getDict('gender')
self.Root.kcalTxt.text = 'Kcal target: ' + str(int(float(self.caluser.getDict('bmr')))+350)
self.Root.ratingLbl.text = 'Rating: ' + self.caluser.getDict('rating')
self.nav_drawer.ids['nameBtn'].text = self.caluser.getDict('name')
self.Profile.ids['profileToolbar'].left_action_items = [['arrow-left', lambda x: self.changeScreens('Root')]]
评论列表
文章目录