eric6/QScintilla/ShellWindow.py

changeset 8265
0090cfa83159
parent 8220
006ee31b4835
equal deleted inserted replaced
8264:f95dde35d0ab 8265:0090cfa83159
63 self.setWindowTitle(self.tr("eric Shell")) 63 self.setWindowTitle(self.tr("eric Shell"))
64 64
65 self.setStyle(Preferences.getUI("Style"), 65 self.setStyle(Preferences.getUI("Style"),
66 Preferences.getUI("StyleSheet")) 66 Preferences.getUI("StyleSheet"))
67 67
68 self.__lastDebuggerId = ""
69
68 # initialize the APIs manager 70 # initialize the APIs manager
69 self.__apisManager = APIsManager(parent=self) 71 self.__apisManager = APIsManager(parent=self)
70 72
71 # initialize the debug server and shell widgets 73 # initialize the debug server and shell widgets
72 self.__debugServer = DebugServer(originalPathString, 74 self.__debugServer = DebugServer(originalPathString,
73 preventPassiveDebugging=True, 75 preventPassiveDebugging=True,
74 parent=self) 76 parent=self)
77 self.__debugServer.clientDebuggerId.connect(self.__clientDebuggerId)
78
75 self.__shell = Shell(self.__debugServer, self, None, True, self) 79 self.__shell = Shell(self.__debugServer, self, None, True, self)
80 self.__shell.registerDebuggerIdMethod(self.getDebuggerId)
81
76 self.__searchWidget = SearchWidget(self.__shell, self, showLine=True) 82 self.__searchWidget = SearchWidget(self.__shell, self, showLine=True)
77 83
78 centralWidget = QWidget() 84 centralWidget = QWidget()
79 layout = QVBoxLayout() 85 layout = QVBoxLayout()
80 layout.setContentsMargins(1, 1, 1, 1) 86 layout.setContentsMargins(1, 1, 1, 1)
129 self.__debugServer.shutdownServer() 135 self.__debugServer.shutdownServer()
130 self.__shell.closeShell() 136 self.__shell.closeShell()
131 Preferences.syncPreferences() 137 Preferences.syncPreferences()
132 138
133 event.accept() 139 event.accept()
140
141 def __clientDebuggerId(self, debuggerId):
142 """
143 Private slot to receive the ID of a newly connected debugger backend.
144
145 @param debuggerId ID of a newly connected debugger backend
146 @type str
147 """
148 self.__lastDebuggerId = debuggerId
149
150 def getDebuggerId(self):
151 """
152 Public method to get the most recently registered debugger ID.
153
154 @return debugger ID
155 @rtype str
156 """
157 return self.__lastDebuggerId
134 158
135 ################################################################## 159 ##################################################################
136 ## Below are API handling methods 160 ## Below are API handling methods
137 ################################################################## 161 ##################################################################
138 162

eric ide

mercurial