Debugger/DebugViewer.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3021
801289962f4e
child 3145
a9de05d4a22f
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
83 if embeddedShell: 83 if embeddedShell:
84 from QScintilla.Shell import ShellAssembly 84 from QScintilla.Shell import ShellAssembly
85 # add the interpreter shell 85 # add the interpreter shell
86 self.shellAssembly = ShellAssembly(debugServer, vm, False) 86 self.shellAssembly = ShellAssembly(debugServer, vm, False)
87 self.shell = self.shellAssembly.shell() 87 self.shell = self.shellAssembly.shell()
88 index = self.__tabWidget.addTab(self.shellAssembly, 88 index = self.__tabWidget.addTab(
89 self.shellAssembly,
89 UI.PixmapCache.getIcon("shell.png"), '') 90 UI.PixmapCache.getIcon("shell.png"), '')
90 self.__tabWidget.setTabToolTip(index, self.shell.windowTitle()) 91 self.__tabWidget.setTabToolTip(index, self.shell.windowTitle())
91 92
92 self.embeddedBrowser = embeddedBrowser 93 self.embeddedBrowser = embeddedBrowser
93 if embeddedBrowser: 94 if embeddedBrowser:
94 from UI.Browser import Browser 95 from UI.Browser import Browser
95 # add the browser 96 # add the browser
96 self.browser = Browser() 97 self.browser = Browser()
97 index = self.__tabWidget.addTab(self.browser, 98 index = self.__tabWidget.addTab(
99 self.browser,
98 UI.PixmapCache.getIcon("browser.png"), '') 100 UI.PixmapCache.getIcon("browser.png"), '')
99 self.__tabWidget.setTabToolTip(index, self.browser.windowTitle()) 101 self.__tabWidget.setTabToolTip(index, self.browser.windowTitle())
100 102
101 from .VariablesViewer import VariablesViewer 103 from .VariablesViewer import VariablesViewer
102 # add the global variables viewer 104 # add the global variables viewer
128 self.setGlobalsFilterButton = QPushButton( 130 self.setGlobalsFilterButton = QPushButton(
129 self.trUtf8('Set'), self.glvWidget) 131 self.trUtf8('Set'), self.glvWidget)
130 self.glvWidgetHLayout.addWidget(self.setGlobalsFilterButton) 132 self.glvWidgetHLayout.addWidget(self.setGlobalsFilterButton)
131 self.glvWidgetVLayout.addLayout(self.glvWidgetHLayout) 133 self.glvWidgetVLayout.addLayout(self.glvWidgetHLayout)
132 134
133 index = self.__tabWidget.addTab(self.glvWidget, 135 index = self.__tabWidget.addTab(
136 self.glvWidget,
134 UI.PixmapCache.getIcon("globalVariables.png"), '') 137 UI.PixmapCache.getIcon("globalVariables.png"), '')
135 self.__tabWidget.setTabToolTip(index, self.globalsViewer.windowTitle()) 138 self.__tabWidget.setTabToolTip(index, self.globalsViewer.windowTitle())
136 139
137 self.setGlobalsFilterButton.clicked[()].connect( 140 self.setGlobalsFilterButton.clicked[()].connect(
138 self.__setGlobalsFilter) 141 self.__setGlobalsFilter)
181 self.setLocalsFilterButton = QPushButton( 184 self.setLocalsFilterButton = QPushButton(
182 self.trUtf8('Set'), self.lvWidget) 185 self.trUtf8('Set'), self.lvWidget)
183 self.lvWidgetHLayout2.addWidget(self.setLocalsFilterButton) 186 self.lvWidgetHLayout2.addWidget(self.setLocalsFilterButton)
184 self.lvWidgetVLayout.addLayout(self.lvWidgetHLayout2) 187 self.lvWidgetVLayout.addLayout(self.lvWidgetHLayout2)
185 188
186 index = self.__tabWidget.addTab(self.lvWidget, 189 index = self.__tabWidget.addTab(
190 self.lvWidget,
187 UI.PixmapCache.getIcon("localVariables.png"), '') 191 UI.PixmapCache.getIcon("localVariables.png"), '')
188 self.__tabWidget.setTabToolTip(index, self.localsViewer.windowTitle()) 192 self.__tabWidget.setTabToolTip(index, self.localsViewer.windowTitle())
189 193
190 self.sourceButton.clicked[()].connect(self.__showSource) 194 self.sourceButton.clicked[()].connect(self.__showSource)
191 self.stackComboBox.currentIndexChanged[int].connect( 195 self.stackComboBox.currentIndexChanged[int].connect(
194 self.localsFilterEdit.returnPressed.connect(self.__setLocalsFilter) 198 self.localsFilterEdit.returnPressed.connect(self.__setLocalsFilter)
195 199
196 from .CallStackViewer import CallStackViewer 200 from .CallStackViewer import CallStackViewer
197 # add the call stack viewer 201 # add the call stack viewer
198 self.callStackViewer = CallStackViewer(self.debugServer) 202 self.callStackViewer = CallStackViewer(self.debugServer)
199 index = self.__tabWidget.addTab(self.callStackViewer, 203 index = self.__tabWidget.addTab(
204 self.callStackViewer,
200 UI.PixmapCache.getIcon("step.png"), "") 205 UI.PixmapCache.getIcon("step.png"), "")
201 self.__tabWidget.setTabToolTip( 206 self.__tabWidget.setTabToolTip(
202 index, self.callStackViewer.windowTitle()) 207 index, self.callStackViewer.windowTitle())
203 self.callStackViewer.sourceFile.connect(self.sourceFile) 208 self.callStackViewer.sourceFile.connect(self.sourceFile)
204 self.callStackViewer.frameSelected.connect( 209 self.callStackViewer.frameSelected.connect(
205 self.__callStackFrameSelected) 210 self.__callStackFrameSelected)
206 211
207 from .CallTraceViewer import CallTraceViewer 212 from .CallTraceViewer import CallTraceViewer
208 # add the call trace viewer 213 # add the call trace viewer
209 self.callTraceViewer = CallTraceViewer(self.debugServer) 214 self.callTraceViewer = CallTraceViewer(self.debugServer)
210 index = self.__tabWidget.addTab(self.callTraceViewer, 215 index = self.__tabWidget.addTab(
216 self.callTraceViewer,
211 UI.PixmapCache.getIcon("callTrace.png"), "") 217 UI.PixmapCache.getIcon("callTrace.png"), "")
212 self.__tabWidget.setTabToolTip( 218 self.__tabWidget.setTabToolTip(
213 index, self.callTraceViewer.windowTitle()) 219 index, self.callTraceViewer.windowTitle())
214 self.callTraceViewer.sourceFile.connect(self.sourceFile) 220 self.callTraceViewer.sourceFile.connect(self.sourceFile)
215 221
216 from .BreakPointViewer import BreakPointViewer 222 from .BreakPointViewer import BreakPointViewer
217 # add the breakpoint viewer 223 # add the breakpoint viewer
218 self.breakpointViewer = BreakPointViewer() 224 self.breakpointViewer = BreakPointViewer()
219 self.breakpointViewer.setModel(self.debugServer.getBreakPointModel()) 225 self.breakpointViewer.setModel(self.debugServer.getBreakPointModel())
220 index = self.__tabWidget.addTab(self.breakpointViewer, 226 index = self.__tabWidget.addTab(
227 self.breakpointViewer,
221 UI.PixmapCache.getIcon("breakpoints.png"), '') 228 UI.PixmapCache.getIcon("breakpoints.png"), '')
222 self.__tabWidget.setTabToolTip( 229 self.__tabWidget.setTabToolTip(
223 index, self.breakpointViewer.windowTitle()) 230 index, self.breakpointViewer.windowTitle())
224 self.breakpointViewer.sourceFile.connect(self.sourceFile) 231 self.breakpointViewer.sourceFile.connect(self.sourceFile)
225 232
226 from .WatchPointViewer import WatchPointViewer 233 from .WatchPointViewer import WatchPointViewer
227 # add the watch expression viewer 234 # add the watch expression viewer
228 self.watchpointViewer = WatchPointViewer() 235 self.watchpointViewer = WatchPointViewer()
229 self.watchpointViewer.setModel(self.debugServer.getWatchPointModel()) 236 self.watchpointViewer.setModel(self.debugServer.getWatchPointModel())
230 index = self.__tabWidget.addTab(self.watchpointViewer, 237 index = self.__tabWidget.addTab(
238 self.watchpointViewer,
231 UI.PixmapCache.getIcon("watchpoints.png"), '') 239 UI.PixmapCache.getIcon("watchpoints.png"), '')
232 self.__tabWidget.setTabToolTip( 240 self.__tabWidget.setTabToolTip(
233 index, self.watchpointViewer.windowTitle()) 241 index, self.watchpointViewer.windowTitle())
234 242
235 from .ExceptionLogger import ExceptionLogger 243 from .ExceptionLogger import ExceptionLogger
236 # add the exception logger 244 # add the exception logger
237 self.exceptionLogger = ExceptionLogger() 245 self.exceptionLogger = ExceptionLogger()
238 index = self.__tabWidget.addTab(self.exceptionLogger, 246 index = self.__tabWidget.addTab(
247 self.exceptionLogger,
239 UI.PixmapCache.getIcon("exceptions.png"), '') 248 UI.PixmapCache.getIcon("exceptions.png"), '')
240 self.__tabWidget.setTabToolTip( 249 self.__tabWidget.setTabToolTip(
241 index, self.exceptionLogger.windowTitle()) 250 index, self.exceptionLogger.windowTitle())
242 251
243 if self.embeddedShell: 252 if self.embeddedShell:

eric ide

mercurial