本文整理汇总了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
示例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
示例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
示例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