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


Python GlobalData.currentWidget方法代码示例

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


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

示例1: jumpToCode

# 需要导入模块: from utils.globals import GlobalData [as 别名]
# 或者: from utils.globals.GlobalData import currentWidget [as 别名]
 def jumpToCode( self, fileName, line ):
     " Jumps to the source code "
     editorsManager = GlobalData().mainWindow.editorsManager()
     editorsManager.openFile( fileName, line )
     editor = editorsManager.currentWidget().getEditor()
     editor.gotoLine( line )
     editorsManager.currentWidget().setFocus()
     return
开发者ID:eaglexmw,项目名称:codimension,代码行数:10,代码来源:bpointviewer.py

示例2: __onFrameDoubleClicked

# 需要导入模块: from utils.globals import GlobalData [as 别名]
# 或者: from utils.globals.GlobalData import currentWidget [as 别名]
    def __onFrameDoubleClicked( self, item, column ):
        " Triggered when a frame is double clicked "
        # The frame has been switched already because the double click
        # signal always comes after the single click one
        fileName = item.getFilename()
        lineNumber = item.getLineNumber()

        editorsManager = GlobalData().mainWindow.editorsManager()
        editorsManager.openFile( fileName, lineNumber )
        editor = editorsManager.currentWidget().getEditor()
        editor.gotoLine( lineNumber )
        editorsManager.currentWidget().setFocus()
        return
开发者ID:eaglexmw,项目名称:codimension,代码行数:15,代码来源:stackviewer.py

示例3: __onJumpToCode

# 需要导入模块: from utils.globals import GlobalData [as 别名]
# 或者: from utils.globals.GlobalData import currentWidget [as 别名]
    def __onJumpToCode( self ):
        " Jumps to the corresponding source code line "
        if self.__currentItem is not None:
            if self.__currentItem.getType() == STACK_FRAME_ITEM:
                fileName = self.__currentItem.getFileName()
                if '<' not in fileName and '>' not in fileName:
                    lineNumber = self.__currentItem.getLineNumber()

                    editorsManager = GlobalData().mainWindow.editorsManager()
                    editorsManager.openFile( fileName, lineNumber )
                    editor = editorsManager.currentWidget().getEditor()
                    editor.gotoLine( lineNumber )
                    editorsManager.currentWidget().setFocus()
        return
开发者ID:eaglexmw,项目名称:codimension,代码行数:16,代码来源:clientexcptviewer.py

示例4: keyPressEvent

# 需要导入模块: from utils.globals import GlobalData [as 别名]
# 或者: from utils.globals.GlobalData import currentWidget [as 别名]
 def keyPressEvent( self, event ):
     """ Handles the key press events """
     if event.key() == Qt.Key_Escape:
         editorsManager = GlobalData().mainWindow.editorsManager()
         activeWindow = editorsManager.currentWidget()
         if activeWindow:
             activeWindow.setFocus()
         event.accept()
         self.hide()
     return
开发者ID:eaglexmw,项目名称:codimension,代码行数:12,代码来源:importlist.py


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