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


Python QApplication.postEvent方法代码示例

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


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

示例1: postUndockedEvent

# 需要导入模块: from enaml.qt.QtGui import QApplication [as 别名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 别名]
    def postUndockedEvent(self):
        """ Post a DockItemUndocked event to the root dock area.

        """
        root_area = self.manager().dock_area()
        if root_area.dockEventsEnabled():
            event = QDockItemEvent(DockItemUndocked, self.objectName())
            QApplication.postEvent(root_area, event)
开发者ID:rutsky,项目名称:enaml,代码行数:10,代码来源:q_dock_container.py

示例2: _onSlideOutFinished

# 需要导入模块: from enaml.qt.QtGui import QApplication [as 别名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 别名]
    def _onSlideOutFinished(self):
        """ Handle the 'finished' signal from a slide out animation.

        """
        item = self.sender().targetObject()
        item.setAnimation(None)
        container = item.widget()
        area = container.manager().dock_area()
        if area.dockEventsEnabled():
            event = QDockItemEvent(DockItemExtended, container.objectName())
            QApplication.postEvent(area, event)
开发者ID:gabrielcnr,项目名称:enaml,代码行数:13,代码来源:q_dock_bar.py

示例3: post_docked_event

# 需要导入模块: from enaml.qt.QtGui import QApplication [as 别名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 别名]
    def post_docked_event(self, container):
        """ Post the docked event for the given container.

        Parameters
        ----------
        container : QDockContainer
            The dock container which was undocked.

        """
        root_area = container.manager().dock_area()
        if root_area.dockEventsEnabled():
            event = QDockItemEvent(DockItemDocked, container.objectName())
            QApplication.postEvent(root_area, event)
开发者ID:ContinuumIO,项目名称:ashiba,代码行数:15,代码来源:layout_builder.py

示例4: closeEvent

# 需要导入模块: from enaml.qt.QtGui import QApplication [as 别名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 别名]
    def closeEvent(self, event):
        """ Handle the close event for the dock item.

        This handler will reject the event if the item is not closable.

        """
        event.ignore()
        if self._closable:
            event.accept()
            area = self.rootDockArea()
            if area is not None and area.dockEventsEnabled():
                event = QDockItemEvent(DockItemClosed, self.objectName())
                QApplication.postEvent(area, event)
开发者ID:MatthieuDartiailh,项目名称:enaml,代码行数:15,代码来源:q_dock_item.py

示例5: _onSlideInFinished

# 需要导入模块: from enaml.qt.QtGui import QApplication [as 别名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 别名]
    def _onSlideInFinished(self):
        """ Handle the 'finished' signal from a slide in animation.

        """
        item = self.sender().targetObject()
        item.setAnimation(None)
        item.hide()
        self._untrackForResize(item)
        container = item.widget()
        area = container.manager().dock_area()
        if area.dockEventsEnabled():
            event = QDockItemEvent(DockItemRetracted, container.objectName())
            QApplication.postEvent(area, event)
开发者ID:gabrielcnr,项目名称:enaml,代码行数:15,代码来源:q_dock_bar.py

示例6: _onVisibilityTimer

# 需要导入模块: from enaml.qt.QtGui import QApplication [as 别名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 别名]
    def _onVisibilityTimer(self):
        """ Handle the visibility timer timeout.

        This handler will post the dock item visibility event to the
        root dock area.

        """
        area = self.rootDockArea()
        if area is not None and area.dockEventsEnabled():
            timer, visible = self._vis_changed
            evt_type = DockItemShown if visible else DockItemHidden
            event = QDockItemEvent(evt_type, self.objectName())
            QApplication.postEvent(area, event)
            self._vis_changed = None
开发者ID:MatthieuDartiailh,项目名称:enaml,代码行数:16,代码来源:q_dock_item.py

示例7: _onCurrentChanged

# 需要导入模块: from enaml.qt.QtGui import QApplication [as 别名]
# 或者: from enaml.qt.QtGui.QApplication import postEvent [as 别名]
    def _onCurrentChanged(self, index):
        """ Handle the 'currentChanged' signal for the tab widget.

        """
        # These checks protect against the signal firing during close.
        container = self.widget(index)
        if container is None:
            return
        manager = container.manager()
        if manager is None:
            return
        area = manager.dock_area()
        if area is None:
            return
        if area.dockEventsEnabled():
            event = QDockItemEvent(DockTabSelected, container.objectName())
            QApplication.postEvent(area, event)
开发者ID:MatthieuDartiailh,项目名称:enaml,代码行数:19,代码来源:q_dock_tab_widget.py


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