当前位置: 首页>>代码示例>>Python>>正文


Python Clock.schedule_interval方法代码示例

本文整理汇总了Python中kivy.properties.Clock.schedule_interval方法的典型用法代码示例。如果您正苦于以下问题:Python Clock.schedule_interval方法的具体用法?Python Clock.schedule_interval怎么用?Python Clock.schedule_interval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kivy.properties.Clock的用法示例。


在下文中一共展示了Clock.schedule_interval方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: build

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
    def build(self):
        self.plot.points = [(point[0], point[1]) for point in
                            self.user.userECG.ecgListFFT]
        # self.plot.points = [(x, sin(x / 100.)) for x in range(self.counter,
        #                                                       self.counter + 10)]
        self.graph.add_plot(self.plot)

        Clock.schedule_interval(self.update, 1.0 / 60.0)

        return self.graph
开发者ID:neurotechuoft,项目名称:Wall-EEG,代码行数:12,代码来源:kivy_app.py

示例2: __init__

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def __init__(self, **kwargs):
     super(NewsWidget, self).__init__(**kwargs)
     self.app = App.get_running_app()
     app_config = self.app.config
     provider = app_config.get('news', 'provider')
     news_module = imp.load_source(provider, os.path.join(PROJECT_PATH, 'libs', "news", "%s.py" % provider))
     self.news_provider = news_module.News()
     Clock.schedule_interval(self.update_news, 600)
     Clock.schedule_interval(self.rotate_news, app_config.getint('news', 'cycle_interval'))
     self.update_news()
     self.key_handler = self.app.key_handler
     self.key_handler.bind('down', lambda *args: self.rotate_news(direction='next', manual=True))
     self.key_handler.bind('up', lambda *args: self.rotate_news(direction='prev', manual=True))
开发者ID:talpah,项目名称:pivystation,代码行数:15,代码来源:news.py

示例3: __init__

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
    def __init__(self, **kw):
        super().__init__(**kw)

        self.playlist = StaticPlaylist([

        ])
        self.__cached_playlist = list(self.playlist)
        self.load_audio()

        def update_position(_):
            if self.sound and self.sound.state == 'play':
                self.last_sound_position = self.sound.get_pos()

        Clock.schedule_interval(update_position, 1.5)
开发者ID:tomerghelber,项目名称:pyplayer,代码行数:16,代码来源:main_screen.py

示例4: on_start

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def on_start(self):
     ble_central.init()
     ble_peripheral.init()
     ble_central.set_callbacks(on_state=self.central_state_changed,
                               on_discover=self.discover)
     ble_peripheral.set_callbacks(on_state=self.peripheral_state_changed,
                                  on_service_added=self.peripheral_service_added,
                                  on_service_error=self.peripheral_service_error,
                                  on_advertising_started=self.peripheral_adv,
                                  on_advertising_error=self.peripheral_adv,
                                  on_characteristic_subscribed=self.char_sub,
                                  on_characteristic_write=self.char_write)
     self.scanning = ble_central.is_scanning
     Clock.schedule_interval(self.update_list, 0.5)
开发者ID:mritchie712,项目名称:ble_example,代码行数:16,代码来源:main.py

示例5: __init__

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
    def __init__(self, **kwargs):
        super(ZbarQrcodeDetector, self).__init__(**kwargs)
        # my code
        #
        self.add_widget(self.labell)


        def Course_thread(dt):
            self.labell.text = "24923849"
            self._examplefunc()
            print "r"
            #self.examplefunc("rrrr")

            #self._send_request_dzyk(
            #    'bal_sum/', params=None,
            #    success=self._get_commands_result_dzyk_balance_allsum, error=self._get_commands_error_dzyk)


        Clock.schedule_interval(Course_thread, 1)


        # ID of the command being executed
        self._cmd_id = None

        # List of the "completed" statuses.
        # The first status should be "Done"
        self._completed = []

        # If True - sends a request to retrieve a command status
        self._wait_completion = False

        # requested command
        self._command = (0, '')


        #----------------------------------
        self._camera = AndroidCamera(
                size=self.camera_size,
                size_hint=(None, None))
        self._camera.bind(on_preview_frame=self._detect_qrcode_frame)
        self.add_widget(self._camera)

        # create a scanner used for detecting qrcode
        self._scanner = ImageScanner()
        self._scanner.setConfig(0, Config.ENABLE, 0)
        self._scanner.setConfig(Symbol.QRCODE, Config.ENABLE, 1)
        self._scanner.setConfig(0, Config.X_DENSITY, 3)
        self._scanner.setConfig(0, Config.Y_DENSITY, 3)
开发者ID:dzyk,项目名称:android-zbar-qrcode,代码行数:50,代码来源:main.py

示例6: start

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def start(self):
     '''Start the label updating in a separated thread
     '''
     Clock.schedule_interval(self.update_text, 0.2)
开发者ID:Python-PyBD,项目名称:kivy-designer,代码行数:6,代码来源:designer_git.py

示例7: callback

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def callback(self, dt):
     self.manager.current = 'board1'
     self.popup1.open()
     self.current = 0
     Clock.schedule_interval(self.my_callback, 1.0)
开发者ID:Xayom,项目名称:Battleship_Kivy,代码行数:7,代码来源:main.py

示例8: on_start

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def on_start(self):
     Clock.schedule_interval(self.update, 0)
开发者ID:alexander3771,项目名称:kivy_tutorial1,代码行数:4,代码来源:main.py

示例9: __init__

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def __init__(self, *args, **kwargs):
     super(Game, self).__init__(**kwargs)
     print('game init hit')
     Clock.schedule_interval(self.set_fps, .2)
开发者ID:spinningD20,项目名称:kivy_rpg,代码行数:6,代码来源:screens.py

示例10: build

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def build(self):
     gra = GraPong()
     gra.serw_pilki()
     Clock.schedule_interval(gra.odswiez, 1.0/60.0)
     return gra
开发者ID:olaboga13,项目名称:Kivy1,代码行数:7,代码来源:zad1.py

示例11: __init__

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def __init__(self, **kwargs):
     super(RefTreeWidget, self).__init__(**kwargs)
     # update_tree will be call each 4 seconds
     # FIXME The line below has to be uncommented after fixing the reference duplication BUG!
     Clock.schedule_interval(self.update_ref, 20)
开发者ID:coyf,项目名称:agl,代码行数:7,代码来源:main.py

示例12: on_enter

# 需要导入模块: from kivy.properties import Clock [as 别名]
# 或者: from kivy.properties.Clock import schedule_interval [as 别名]
 def on_enter(self, *args):
     self.animation_scheduler = Clock.schedule_interval(self.saver.update, 1.0 / 30.0)
开发者ID:talpah,项目名称:pivystation,代码行数:4,代码来源:main.py


注:本文中的kivy.properties.Clock.schedule_interval方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。