uiObj.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:caltrac 作者: shiburizu 项目源码 文件源码
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')]]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号