當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。