本文整理汇总了Python中etkdocking.DockGroup.remove方法的典型用法代码示例。如果您正苦于以下问题:Python DockGroup.remove方法的具体用法?Python DockGroup.remove怎么用?Python DockGroup.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类etkdocking.DockGroup
的用法示例。
在下文中一共展示了DockGroup.remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_current_item
# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.DockGroup import remove [as 别名]
def test_get_current_item(self):
dockitem = DockItem()
dockgroup = DockGroup()
self.assertTrue(dockgroup.get_current_item() is None)
index = dockgroup.append_item(dockitem)
self.assertTrue(dockgroup.get_current_item() == index)
dockgroup.remove(dockitem)
self.assertTrue(dockgroup.get_current_item() is None)
dockitem.destroy()
dockgroup.destroy()
示例2: test_remove
# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.DockGroup import remove [as 别名]
def test_remove(self):
win = gtk.Window()
dockitem = DockItem()
dockgroup = DockGroup()
dockgroup.add(dockitem)
win.add(dockgroup)
win.show_all()
assert dockitem.flags() & gtk.REALIZED
dockgroup.remove(dockitem)
self.assertTrue(dockitem not in dockgroup)
win.destroy()
assert not dockitem.flags() & gtk.REALIZED
assert not dockgroup.flags() & gtk.REALIZED
示例3: test_remove_signal
# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.DockGroup import remove [as 别名]
def test_remove_signal(self):
remove_events = []
item_removed_events = []
def on_remove(self, widget):
remove_events.append(widget)
def on_item_removed(dockgroup, child):
item_removed_events.append(child)
dockitem = DockItem()
dockitem.add(gtk.Button())
dockgroup = DockGroup()
dockgroup.connect('remove', on_remove)
dockgroup.connect('item-removed', on_item_removed)
dockgroup.add(dockitem)
dockgroup.remove(dockitem)
self.assertTrue(dockitem in remove_events)
self.assertTrue(dockitem in item_removed_events)
dockitem.destroy()
dockgroup.destroy()