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


Python Clock.unschedule方法代码示例

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


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

示例1: _update_files

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def _update_files(self, *args, **kwargs):
        # trigger to start gathering the files in the new directory
        # we'll start a timer that will do the job, 10 times per frames
        # (default)
        self._gitems = []
        self._gitems_parent = kwargs.get('parent', None)
        self._gitems_gen = self._generate_file_entries(
            path=kwargs.get('path', self.path),
            parent=self._gitems_parent)

        # cancel any previous clock if exist
        Clock.unschedule(self._create_files_entries)

        # show the progression screen
        self._hide_progress()
        if self._create_files_entries():
            # not enough for creating all the entries, all a clock to continue
            # start a timer for the next 100 ms
            Clock.schedule_interval(self._create_files_entries, .1) 
开发者ID:BillBillBillBill,项目名称:Tickeys-linux,代码行数:21,代码来源:filechooser.py

示例2: on_touch_up

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def on_touch_up(self, touch):
        if self._get_uid('cavoid') in touch.ud:
            return
        if self in [x() for x in touch.grab_list]:
            touch.ungrab(self)
            self._touch = None
            ud = touch.ud[self._get_uid()]
            if ud['mode'] == 'unknown':
                Clock.unschedule(self._change_touch_mode)
                super(Carousel, self).on_touch_down(touch)
                Clock.schedule_once(partial(self._do_touch_up, touch), .1)
            else:
                self._start_animation()

        else:
            if self._touch is not touch and self.uid not in touch.ud:
                super(Carousel, self).on_touch_up(touch)
        return self._get_uid() in touch.ud 
开发者ID:BillBillBillBill,项目名称:Tickeys-linux,代码行数:20,代码来源:carousel.py

示例3: _on_textinput_focused

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def _on_textinput_focused(self, instance, value, *largs):
        self.focus = value

        win = EventLoop.window
        self.cancel_selection()
        self._hide_cut_copy_paste(win)

        if value:
            if (not (self.readonly or self.disabled) or _is_desktop and
                self._keyboard_mode == 'system'):
                Clock.schedule_interval(self._do_blink_cursor, 1 / 2.)
                self._editable = True
            else:
                self._editable = False
        else:
            Clock.unschedule(self._do_blink_cursor)
            self._hide_handles(win) 
开发者ID:BillBillBillBill,项目名称:Tickeys-linux,代码行数:19,代码来源:textinput.py

示例4: _timer_stop

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def _timer_stop(self):
        if self._timer is not None:
            Clock.unschedule(self._timer)
            self._timer = None 
开发者ID:kivy-garden,项目名称:garden.matplotlib,代码行数:6,代码来源:backend_kivy.py

示例5: exit

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def exit(self, dt):
        Clock.unschedule(self.exit)
        anim = Animation(y = metrics.dp(-50), t = 'in_out_expo')
        anim.start(self) 
开发者ID:anselm94,项目名称:segreto-3,代码行数:6,代码来源:widget.py

示例6: on_touch_move

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def on_touch_move(self, touch, *args):
        if (
            touch.ud['menu_timeout'] and
            squared_dist(touch.pos, touch.opos) > self.cancel_distance ** 2
        ):
            Clock.unschedule(touch.ud['menu_timeout'])
        return super(MenuSpawner, self).on_touch_move(touch, *args) 
开发者ID:kivy-garden,项目名称:garden.modernmenu,代码行数:9,代码来源:__init__.py

示例7: on_touch_up

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def on_touch_up(self, touch, *args):
        if touch.ud.get('menu_timeout'):
            Clock.unschedule(touch.ud['menu_timeout'])
        return super(MenuSpawner, self).on_touch_up(touch, *args) 
开发者ID:kivy-garden,项目名称:garden.modernmenu,代码行数:6,代码来源:__init__.py

示例8: animated_diff_scale_at

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def animated_diff_scale_at(self, d, x, y):
        self._scale_target_time = 1.
        self._scale_target_pos = x, y
        if self._scale_target_anim == False:
            self._scale_target_anim = True
            self._scale_target = d
        else:
            self._scale_target += d
        Clock.unschedule(self._animate_scale)
        Clock.schedule_interval(self._animate_scale, 1 / 60.) 
开发者ID:pythonindia,项目名称:PyCon-Mobile-App,代码行数:12,代码来源:view.py

示例9: trigger_update

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def trigger_update(self, full):
        self._need_redraw_full = full or self._need_redraw_full
        Clock.unschedule(self.do_update)
        Clock.schedule_once(self.do_update, -1) 
开发者ID:pythonindia,项目名称:PyCon-Mobile-App,代码行数:6,代码来源:view.py

示例10: on_hover

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def on_hover(self, *a):
        if self.hover:
            Clock.schedule_once(self.show_label_info,1)
        else:
            Clock.unschedule(self.show_label_info)
            infolabel.remove_info_on_mouse() 
开发者ID:mahart-studio,项目名称:kivystudio,代码行数:8,代码来源:hoverinfobehavior.py

示例11: on_touch_move

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def on_touch_move(self, touch, *args):
        try:
            if (
                touch.ud['menu_timeout'] and
                dist(touch.pos, touch.opos) > self.cancel_distance
            ):
                Clock.unschedule(touch.ud['menu_timeout'])
        except KeyError:
            pass
        return super(MenuSpawner, self).on_touch_move(touch, *args) 
开发者ID:MaslowCNC,项目名称:GroundControl,代码行数:12,代码来源:modernMenu.py

示例12: on_touch_up

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def on_touch_up(self, touch, *args):
        
        if touch.ud.get('menu_timeout'):
            Clock.unschedule(touch.ud['menu_timeout'])
        return super(MenuSpawner, self).on_touch_up(touch, *args) 
开发者ID:MaslowCNC,项目名称:GroundControl,代码行数:7,代码来源:modernMenu.py

示例13: init_osc

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def init_osc(self):
        osc.init()
        self.oscid = osc.listen(ipAddr='127.0.0.1', port=self.receive_port)

        osc.bind(self.oscid, self.receive_osc_message, b'/stdout')
        osc.bind(self.oscid, self.receive_osc_message, b'/stderr')
        osc.bind(self.oscid, self.receive_osc_message, b'/interpreter')
        osc.bind(self.oscid, self.receive_osc_message, b'/pong')
        osc.bind(self.oscid, self.receive_osc_message, b'/requestinput')

    # def begin_osc_listen(self):
    #     Clock.schedule_interval(self.read_osc_queue, 0.1)

    # def end_osc_listen(self):
    #     Clock.unschedule(self.read_osc_queue) 
开发者ID:inclement,项目名称:Pyonic-interpreter,代码行数:17,代码来源:interpreterwrapper.py

示例14: receive_osc_message

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def receive_osc_message(self, message, *args):
        print('received message', message, args)
        address = message[0]
        body = [s.decode('utf-8') for s in message[2:]]

        if address == b'/interpreter':
            if body[0] == 'completed_exec':
                self.dispatch('on_execution_complete')
                self.interpreter_state = 'waiting'
                self.lock_input = False
                # self.end_osc_listen()

            elif body[0] == 'received_command':
                Clock.unschedule(self.command_not_received)

            elif body[0].startswith('omitted'):
                number = body[0].split(' ')[-1]
                self.dispatch('on_missing_labels', number)

        elif address == b'/pong':
            self.pong()

        elif address == b'/stdout':
            self.dispatch('on_stdout', body[0])

        elif address == b'/stderr':
            self.dispatch('on_stderr', body[0])

        elif address == b'/requestinput':
            self.dispatch('on_request_input', body[0]) 
开发者ID:inclement,项目名称:Pyonic-interpreter,代码行数:32,代码来源:interpreterwrapper.py

示例15: restart

# 需要导入模块: from kivy.clock import Clock [as 别名]
# 或者: from kivy.clock.Clock import unschedule [as 别名]
def restart(self):
        if platform == 'android':
            from jnius import autoclass
            service = autoclass('{}.Service{}'.format(package_name, self.service_name))
            mActivity = autoclass('org.kivy.android.PythonActivity').mActivity
            service.stop(mActivity)
            self.start_interpreter(self.thread_name)
        else:
            self.subprocess.kill()
            self.start_interpreter(self.thread_name)

        self.lock_input = True
        self.interpreter_state = 'restarting'
        Clock.unschedule
        Clock.schedule_interval(self.ping, 0.3) 
开发者ID:inclement,项目名称:Pyonic-interpreter,代码行数:17,代码来源:interpreterwrapper.py


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