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


Python QStackedLayout.setStackingMode方法代码示例

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


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

示例1: _MainContainer

# 需要导入模块: from PyQt4.QtGui import QStackedLayout [as 别名]
# 或者: from PyQt4.QtGui.QStackedLayout import setStackingMode [as 别名]
class _MainContainer(QWidget):

###############################################################################
# MainContainer SIGNALS
###############################################################################
    """
    newFileOpened(QString)
    allTabClosed()
    runFile(QString)
    addToProject(QString)
    showFileInExplorer(QString)
    recentTabsModified()
    currentEditorChanged(QString)
    fileOpened(QString)
    ---------migrationAnalyzed()
    findOcurrences(QString)
    ---------updateFileMetadata()
    editorKeyPressEvent(QEvent)
    locateFunction(QString, QString, bool) [functionName, filePath, isVariable]
    updateLocator(QString)
    beforeFileSaved(QString)
    fileSaved(QString)
    openPreferences()
    --------openProject(QString)
    ---------dontOpenStartPage()
    """

###############################################################################

    def __init__(self, parent=None):
        super(_MainContainer, self).__init__(parent)
        self._parent = parent
        self._vbox = QVBoxLayout(self)
        self._vbox.setContentsMargins(0, 0, 0, 0)
        self._vbox.setSpacing(0)
        self.stack = QStackedLayout()
        self.stack.setStackingMode(QStackedLayout.StackAll)
        self._vbox.addLayout(self.stack)

        self.splitter = dynamic_splitter.DynamicSplitter()
        self.setAcceptDrops(True)
        self._files_handler = files_handler.FilesHandler(self)
        self._add_file_folder = add_file_folder.AddFileFolderWidget(self)

        #documentation browser
        self.docPage = None
        #Code Navigation
        self._locator = locator.GoToDefinition()
        self.__codeBack = []
        self.__codeForward = []
        self.__bookmarksFile = ''
        self.__bookmarksPos = -1
        self.__breakpointsFile = ''
        self.__breakpointsPos = -1
        self.__operations = {
            0: self._navigate_code_jumps,
            1: self._navigate_bookmarks,
            2: self._navigate_breakpoints}

        self.connect(self, SIGNAL("locateFunction(QString, QString, bool)"),
                     self.locate_function)

        IDE.register_service('main_container', self)

        #Register signals connections
        connections = (
            {'target': 'menu_file',
             'signal_name': 'openFile(QString)',
             'slot': self.open_file},
            {'target': 'explorer_container',
             'signal_name': 'goToDefinition(int)',
             'slot': self.editor_go_to_line},
            {'target': 'explorer_container',
             'signal_name': 'pep8Activated(bool)',
             'slot': self.reset_pep8_warnings},
            {'target': 'explorer_container',
             'signal_name': 'lintActivated(bool)',
             'slot': self.reset_lint_warnings},
            )

        IDE.register_signals('main_container', connections)

        self.selector = main_selector.MainSelector(self)
        self._opening_dialog = False
        self.add_widget(self.selector)

        if settings.SHOW_START_PAGE:
            self.show_start_page()

        self.connect(self.selector, SIGNAL("changeCurrent(int)"),
                     self._change_current_stack)
        self.connect(self.selector, SIGNAL("removeWidget(int)"),
                     self._remove_item_from_stack)
        self.connect(self.selector, SIGNAL("ready()"),
                     self._selector_ready)
        self.connect(self.selector, SIGNAL("animationCompleted()"),
                     self._selector_animation_completed)
        self.connect(self, SIGNAL("closeDialog(PyQt_PyObject)"),
                     self.remove_widget)

#.........这里部分代码省略.........
开发者ID:adamscieszko,项目名称:ninja-ide,代码行数:103,代码来源:main_container.py


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