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


Python GUI.invoke_after方法代码示例

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


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

示例1: process

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
    def process(self):
        for job in self.jobs:
            job.percent_complete = min(
                job.percent_complete + random.randint(0, 3), 100)

        if any(job.percent_complete < 100 for job in self.jobs):
            GUI.invoke_after(100, self.process)
开发者ID:bergtholdt,项目名称:traitsui,代码行数:9,代码来源:Table_editor_with_progress_column.py

示例2: close

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
def close():
    """Close the scene."""
    f = mlab.gcf()
    e = mlab.get_engine()
    e.window.workbench.prompt_on_exit = False
    e.window.close()
    mlab.options.backend = 'auto'
    # Hack: on Linux the splash screen does not go away so we force it.
    GUI.invoke_after(500, e.window.workbench.application.gui.stop_event_loop)
开发者ID:B-Rich,项目名称:mayavi,代码行数:11,代码来源:test_mlab_envisage.py

示例3: close

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
    def close(self):
        """ Close the dialog. """

        self._closing = True

        # We don't call our superclass' 'close' method immediately as there
        # may be one final call to '_pulse_and_reschedule' already on the
        # event queue. This makes sure that we call 'close' *after* that final
        # update.
        GUI.invoke_after(self.delay, super(PulseProgressDialog, self).close)
开发者ID:bobye,项目名称:uchicago-pyanno,代码行数:12,代码来源:pulse_progress_dialog.py

示例4: main

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
def main():
    """ Entry point for standalone testing/debugging. """

    from pyface.api import GUI

    gui = GUI()

    progress_dialog = PulseProgressDialog(title="Test", message="Doing something possibly interesting...")
    progress_dialog.open()

    gui.invoke_after(3000, progress_dialog.close)
    gui.start_event_loop()

    return
开发者ID:bobye,项目名称:uchicago-pyanno,代码行数:16,代码来源:pulse_progress_dialog.py

示例5: _anytrait_changed

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
 def _anytrait_changed ( self, name, old, new ):
     if name[:4] == 'var_':
         name = name[4:]
         if (not self._no_block_update) and (self.block is not None):
             if isinstance( old, ArangeGenerator ):
                 old.on_trait_change( self._array_changed, 'array',
                                      remove = True )
             if isinstance( new, ArangeGenerator ):
                 new.on_trait_change( self._array_changed, 'array' )
                 new = new.array
             self.context[ name ] = new
             self._needs_update = True
             #print "Adding update func"
             def update_func():
                 if self._needs_update:
                     self._blocks[ name ].execute( self.context )
                     self._needs_update = False
             GUI.invoke_after(10, update_func)
开发者ID:BabeNovelty,项目名称:blockcanvas,代码行数:20,代码来源:interactor.py

示例6: close

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
 def close(self):
   """ Close progress bar window. """
   GUI.invoke_after(0.1, super(PulsableProgressDialog, self).close)
   sleep(0.2)
开发者ID:asthakeshan,项目名称:piksi_tools,代码行数:6,代码来源:update_view.py

示例7: f

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
 def f():
     do_mlab()
     # Automatically close window in 2500 msecs.
     GUI.invoke_after(2500, close)
开发者ID:GaelVaroquaux,项目名称:mayavi,代码行数:6,代码来源:test_mlab_show.py

示例8: test_mlab_show

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
def test_mlab_show():
    """Test mlab.show()"""
    do_mlab()
    # Automatically close window in 2500 msecs.
    GUI.invoke_after(2500, close)
    mlab.show()
开发者ID:GaelVaroquaux,项目名称:mayavi,代码行数:8,代码来源:test_mlab_show.py

示例9: _schedule_pulse

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
 def _schedule_pulse(self):
     """ Schedule a pulse for 'self.delay' milliseconds from now. """
     GUI.invoke_after(self.delay, self._pulse_and_reschedule)
开发者ID:bobye,项目名称:uchicago-pyanno,代码行数:5,代码来源:pulse_progress_dialog.py

示例10: f

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
 def f():
     run_mlab_examples()
     # Automatically close window in 100 msecs.
     GUI.invoke_after(100, close)
开发者ID:B-Rich,项目名称:mayavi,代码行数:6,代码来源:test_mlab_show.py

示例11: test_mlab_show

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
def test_mlab_show():
    """Test mlab.show()"""
    run_mlab_examples()
    # Automatically close window in 100 msecs.
    GUI.invoke_after(100, close)
    mlab.show()
开发者ID:B-Rich,项目名称:mayavi,代码行数:8,代码来源:test_mlab_show.py

示例12: f

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
 def f():
     from mayavi.preferences.api import preference_manager
     preference_manager.root.show_splash_screen = False
     mlab.options.backend = 'envisage'
     mlab.test_contour3d()
     GUI.invoke_after(3000, close)
开发者ID:B-Rich,项目名称:mayavi,代码行数:8,代码来源:test_mlab_envisage.py

示例13: _start_fired

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
 def _start_fired(self):
     self.populate()
     GUI.invoke_after(1000, self.process)
开发者ID:bergtholdt,项目名称:traitsui,代码行数:5,代码来源:Table_editor_with_progress_column.py

示例14: f

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
 def f():
     mlab.options.backend = 'envisage'
     mlab.test_contour3d()
     GUI.invoke_after(3000, close)
开发者ID:GaelVaroquaux,项目名称:mayavi,代码行数:6,代码来源:test_mlab_envisage.py

示例15: _new_workbench_window_created

# 需要导入模块: from pyface.api import GUI [as 别名]
# 或者: from pyface.api.GUI import invoke_after [as 别名]
	def _new_workbench_window_created(self, event):
		try:
			GUI.invoke_after(500.0, self.mcss_ui_plugin.edit_new_mcss_experiment, event.window) # do it in the UI thread, not too fast for workbench_window to have been created and hopefully slow enough (not tested on a slow computer), but not too slow for user #@UndefinedVariable  
		except AttributeError:
			pass # give up
开发者ID:jvb,项目名称:infobiotics-dashboard,代码行数:7,代码来源:app.py


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