Python kivy.properties 模块,ObjectProperty() 实例源码

我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用kivy.properties.ObjectProperty()

项目:Jiffy    作者:h5rdly    | 项目源码 | 文件源码
def __init__(self, db=DB, conf=CONF, **shnargs):
            super(KivySearchBox, self).__init__(**shnargs)
            #Widget.__init__(self, **shnargs)

            self.index=DriveIndex(db, conf)
            self.Plat=Platform()
            self.start= self.Plat.start_func()

            self.query=''
            #self.ids.result_view.data=[{'text': 'oh boy'}]
            #self.data=ObjectProperty(None)

            self._keyboard=window.Window.request_keyboard(self._other_kb_function, self)
            self._keyboard.bind(on_key_down=self._keyboard_events)

            separator='*'.encode(ENC)

            if not self.index.findex:  # change to a FileIndex api call (_findex)
                self.ids.result_view.data.append({'text': 'No cache database found. ' + 'Hit F5 to generate database'})
            else:
                self.ids.result_view.data.append({'text': 'Type to search.   [F5 - Refresh Database]'})

            #a=WindowBase()
            #WindowBase.maximize(a)
            #window.Window.maximized=True
项目:caltrac    作者:shiburizu    | 项目源码 | 文件源码
def __init__(self, **kwargs):
        super(CaltracApp, self).__init__(**kwargs)
        self.sm = ScreenManager()
        self.inp = []
        self.theme_cls = ThemeManager()
        self.theme_cls.theme_style = 'Dark'
        self.theme_cls.primary_palette = 'Green'
        self.theme_cls.accent_palette = 'Pink'
        self.nav_drawer = ObjectProperty()