本文整理汇总了Python中ginga.qtw.QtHelp.removeWidget方法的典型用法代码示例。如果您正苦于以下问题:Python QtHelp.removeWidget方法的具体用法?Python QtHelp.removeWidget怎么用?Python QtHelp.removeWidget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ginga.qtw.QtHelp
的用法示例。
在下文中一共展示了QtHelp.removeWidget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: deactivate
# 需要导入模块: from ginga.qtw import QtHelp [as 别名]
# 或者: from ginga.qtw.QtHelp import removeWidget [as 别名]
def deactivate(self, name):
self.logger.debug("deactivating %s" % (name))
lname = name.lower()
if lname in self.focus:
self.clear_focus(lname)
if self.active.has_key(lname):
bnch = self.active[lname]
self.logger.debug("stopping plugin")
self.stop_plugin(bnch.pInfo)
self.logger.debug("removing from tray")
QtHelp.removeWidget(self.hbox, bnch.widget)
bnch.widget = None
bnch.label = None
self.logger.debug("removing from dict")
del self.active[lname]
# Set focus to another plugin if one is running
active = self.active.keys()
if len(active) > 0:
name = active[0]
self.set_focus(name)
示例2: config_autocut_params
# 需要导入模块: from ginga.qtw import QtHelp [as 别名]
# 或者: from ginga.qtw.QtHelp import removeWidget [as 别名]
def config_autocut_params(self, method):
index = self.autocut_methods.index(method)
self.w.auto_method.setCurrentIndex(index)
# remove old params
layout = self.w.acvbox.layout()
for child in QtHelp.children(layout):
QtHelp.removeWidget(layout, child)
# Create new autocuts object of the right kind
ac = AutoCuts.get_autocuts(method)(self.logger)
# Build up a set of control widgets for the autocuts
# algorithm tweakable parameters
paramlst = ac.get_params_metadata()
params = self.autocuts_cache.setdefault(method, {})
self.ac_params = QtHelp.ParamSet(self.logger, params)
w = self.ac_params.build_params(paramlst)
self.ac_params.add_callback('changed', self.autocut_params_changed_cb)
self.w.acvbox.layout().addWidget(w, stretch=1)
示例3: remove_taskbar
# 需要导入模块: from ginga.qtw import QtHelp [as 别名]
# 或者: from ginga.qtw.QtHelp import removeWidget [as 别名]
def remove_taskbar(self, bnch):
self.logger.debug("removing widget from taskbar")
QtHelp.removeWidget(self.hbox, bnch.widget)
bnch.widget = None
bnch.label = None