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


Python DockGroup.destroy方法代码示例

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


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

示例1: test_item_removed_signal

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:30,代码来源:test_dockpaned.py

示例2: test_item_added_signal

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:28,代码来源:test_dockpaned.py

示例3: test_item_added_signal

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:28,代码来源:test_dockgroup.py

示例4: test_add

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.DockGroup import destroy [as 别名]
    def test_add(self):
        dockgroup = DockGroup()
        dockpaned = DockPaned()
        dockpaned.add(dockgroup)

        self.assertTrue(dockgroup in dockpaned)

        dockgroup.destroy()
        dockpaned.destroy()
开发者ID:dieterv,项目名称:etk.docking,代码行数:11,代码来源:test_dockpaned.py

示例5: test_add

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.DockGroup import destroy [as 别名]
    def test_add(self):
        dockitem = DockItem()
        dockgroup = DockGroup()
        dockgroup.add(dockitem)

        self.assertTrue(dockitem in dockgroup)

        dockitem.destroy()
        dockgroup.destroy()
开发者ID:dieterv,项目名称:etk.docking,代码行数:11,代码来源:test_dockgroup.py

示例6: test_get_n_items

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:12,代码来源:test_dockgroup.py

示例7: test_append_item

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:12,代码来源:test_dockgroup.py

示例8: test_remove

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:12,代码来源:test_dockpaned.py

示例9: test_item_num

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:13,代码来源:test_dockgroup.py

示例10: test_len

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:14,代码来源:test_dockpaned.py

示例11: test_get_n_handles

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:14,代码来源:test_dockpaned.py

示例12: test_child_destroy

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:15,代码来源:test_dockpaned.py

示例13: test_get_current_item

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:15,代码来源:test_dockgroup.py

示例14: test_get_nth_item

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:15,代码来源:test_dockpaned.py

示例15: test_item_num

# 需要导入模块: from etkdocking import DockGroup [as 别名]
# 或者: from etkdocking.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()
开发者ID:dieterv,项目名称:etk.docking,代码行数:15,代码来源:test_dockpaned.py


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