本文整理匯總了Python中etk.docking.DockGroup.destroy方法的典型用法代碼示例。如果您正苦於以下問題:Python DockGroup.destroy方法的具體用法?Python DockGroup.destroy怎麽用?Python DockGroup.destroy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類etk.docking.DockGroup
的用法示例。
在下文中一共展示了DockGroup.destroy方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_item_added_signal
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_item_added_signal(self):
add_events = []
item_added_events = []
def on_add(self, widget):
add_events.append(widget)
def on_item_added(dockpaned, child):
item_added_events.append(child)
dockgroup1 = DockGroup()
dockgroup2 = DockGroup()
dockpaned = DockPaned()
dockpaned.connect('add', on_add)
dockpaned.connect('item-added', on_item_added)
dockpaned.add(dockgroup1)
dockpaned.insert_item(dockgroup2)
self.assertTrue(dockgroup1 in item_added_events)
self.assertTrue(dockgroup1 in add_events)
self.assertTrue(dockgroup2 in item_added_events)
self.assertFalse(dockgroup2 in add_events)
dockgroup2.destroy()
dockgroup1.destroy()
dockpaned.destroy()
示例2: test_item_removed_signal
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_item_removed_signal(self):
remove_events = []
item_removed_events = []
def on_remove(self, widget):
remove_events.append(widget)
def on_item_removed(dockpaned, child):
item_removed_events.append(child)
dockgroup1 = DockGroup()
dockgroup2 = DockGroup()
dockpaned = DockPaned()
dockpaned.connect('remove', on_remove)
dockpaned.connect('item-removed', on_item_removed)
dockpaned.add(dockgroup1)
dockpaned.add(dockgroup2)
dockpaned.remove(dockgroup1)
dockpaned.remove_item(0)
self.assertTrue(dockgroup1 in item_removed_events)
self.assertTrue(dockgroup1 in remove_events)
self.assertTrue(dockgroup2 in item_removed_events)
self.assertFalse(dockgroup2 in remove_events)
dockgroup1.destroy()
dockgroup2.destroy()
dockpaned.destroy()
示例3: test_item_added_signal
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_item_added_signal(self):
add_events = []
item_added_events = []
def on_add(self, widget):
add_events.append(widget)
def on_item_added(dockgroup, child):
item_added_events.append(child)
dockitem1 = DockItem()
dockitem2 = DockItem()
dockgroup = DockGroup()
dockgroup.connect('add', on_add)
dockgroup.connect('item-added', on_item_added)
dockgroup.add(dockitem1)
dockgroup.insert_item(dockitem2)
self.assertTrue(dockitem1 in item_added_events)
self.assertTrue(dockitem1 in add_events)
self.assertTrue(dockitem2 in item_added_events)
self.assertFalse(dockitem2 in add_events)
dockitem2.destroy()
dockitem1.destroy()
dockgroup.destroy()
示例4: test_add
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_add(self):
dockitem = DockItem()
dockgroup = DockGroup()
dockgroup.add(dockitem)
self.assertTrue(dockitem in dockgroup)
dockitem.destroy()
dockgroup.destroy()
示例5: test_add
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_add(self):
dockgroup = DockGroup()
dockpaned = DockPaned()
dockpaned.add(dockgroup)
self.assertTrue(dockgroup in dockpaned)
dockgroup.destroy()
dockpaned.destroy()
示例6: test_append_item
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_append_item(self):
dockitem = DockItem()
dockgroup = DockGroup()
index = dockgroup.append_item(dockitem)
self.assertTrue(index == 0)
self.assertTrue(dockgroup.get_nth_item(0) is dockitem)
dockitem.destroy()
dockgroup.destroy()
示例7: test_get_n_items
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_get_n_items(self):
dockgroup = DockGroup()
self.assertTrue(dockgroup.get_n_items() == len(dockgroup) == 0)
dockitem = DockItem()
dockgroup.add(dockitem)
self.assertTrue(dockgroup.get_n_items() == len(dockgroup) == 1)
dockitem.destroy()
dockgroup.destroy()
示例8: test_remove
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_remove(self):
dockgroup = DockGroup()
dockpaned = DockPaned()
dockpaned.add(dockgroup)
dockpaned.remove(dockgroup)
self.assertTrue(dockgroup not in dockpaned)
dockgroup.destroy()
dockpaned.destroy()
示例9: test_item_num
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_item_num(self):
dockitem1 = DockItem()
dockitem2 = DockItem()
dockgroup = DockGroup()
dockgroup.add(dockitem1)
self.assertTrue(dockgroup.item_num(dockitem1) == 0)
self.assertTrue(dockgroup.item_num(dockitem2) is None)
dockitem1.destroy()
dockgroup.destroy()
示例10: test_get_n_handles
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_get_n_handles(self):
dockgroup1 = DockGroup()
dockgroup2 = DockGroup()
dockpaned = DockPaned()
dockpaned.add(dockgroup1)
dockpaned.add(dockgroup2)
self.assertTrue(dockpaned._get_n_handles() == 1)
dockgroup2.destroy()
dockgroup1.destroy()
dockpaned.destroy()
示例11: test_len
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_len(self):
dockgroup1 = DockGroup()
dockgroup2 = DockGroup()
dockpaned = DockPaned()
dockpaned.add(dockgroup1)
dockpaned.add(dockgroup2)
self.assertTrue(len(dockpaned) == 2)
dockgroup2.destroy()
dockgroup1.destroy()
dockpaned.destroy()
示例12: test_child_destroy
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_child_destroy(self):
dockgroup = DockGroup()
dockpaned = DockPaned()
dockpaned.add(dockgroup)
self.assertTrue(len(dockpaned) == len(dockpaned._items) == 1)
dockgroup.destroy()
self.assertTrue(len(dockpaned) == len(dockpaned._items) == 0)
dockgroup.destroy()
dockpaned.destroy()
示例13: test_get_nth_item
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_get_nth_item(self):
dockgroup1 = DockGroup()
dockgroup2 = DockGroup()
dockpaned = DockPaned()
dockpaned.add(dockgroup1)
dockpaned.add(dockgroup2)
self.assertTrue(dockpaned.get_nth_item(0) == dockgroup1)
self.assertTrue(dockpaned.get_nth_item(1) == dockgroup2)
dockgroup2.destroy()
dockgroup1.destroy()
dockpaned.destroy()
示例14: test_get_current_item
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [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()
示例15: test_item_num
# 需要導入模塊: from etk.docking import DockGroup [as 別名]
# 或者: from etk.docking.DockGroup import destroy [as 別名]
def test_item_num(self):
dockgroup1 = DockGroup()
dockgroup2 = DockGroup()
dockpaned = DockPaned()
dockpaned.add(dockgroup1)
dockpaned.add(dockgroup2)
self.assertTrue(dockpaned.item_num(dockgroup1) == 0)
self.assertTrue(dockpaned.item_num(dockgroup2) == 1)
dockgroup2.destroy()
dockgroup1.destroy()
dockpaned.destroy()