Plugins/ViewManagerPlugins/Listspace/Listspace.py

changeset 2964
84b65fb9e780
parent 2769
8cbebde7a984
child 3005
3953ddfb991d
equal deleted inserted replaced
2963:745d38097b7f 2964:84b65fb9e780
182 def __init__(self, parent): 182 def __init__(self, parent):
183 """ 183 """
184 Constructor 184 Constructor
185 185
186 @param parent parent widget (QWidget) 186 @param parent parent widget (QWidget)
187 @param ui reference to the main user interface
188 @param dbs reference to the debug server object
189 """ 187 """
190 self.stacks = [] 188 self.stacks = []
191 189
192 QSplitter.__init__(self, parent) 190 QSplitter.__init__(self, parent)
193 ViewManager.__init__(self) 191 ViewManager.__init__(self)
248 self.copyPathAct = self.__menu.addAction(self.trUtf8("Copy Path to Clipboard"), 246 self.copyPathAct = self.__menu.addAction(self.trUtf8("Copy Path to Clipboard"),
249 self.__contextMenuCopyPathToClipboard) 247 self.__contextMenuCopyPathToClipboard)
250 248
251 def __showMenu(self, point): 249 def __showMenu(self, point):
252 """ 250 """
253 Private slot to handle the customContextMenuRequested signal of the viewlist. 251 Private slot to handle the customContextMenuRequested signal of
252 the viewlist.
253
254 @param point position to open the menu at (QPoint)
254 """ 255 """
255 if self.editors: 256 if self.editors:
256 itm = self.viewlist.itemAt(point) 257 itm = self.viewlist.itemAt(point)
257 if itm is not None: 258 if itm is not None:
258 row = self.viewlist.row(itm) 259 row = self.viewlist.row(itm)
308 """ 309 """
309 pass 310 pass
310 311
311 def _removeAllViews(self): 312 def _removeAllViews(self):
312 """ 313 """
313 Protected method to remove all views (i.e. windows) 314 Protected method to remove all views (i.e. windows).
314 """ 315 """
315 self.viewlist.clear() 316 self.viewlist.clear()
316 for win in self.editors: 317 for win in self.editors:
317 for stack in self.stacks: 318 for stack in self.stacks:
318 if stack.hasEditor(win): 319 if stack.hasEditor(win):
320 break 321 break
321 win.closeIt() 322 win.closeIt()
322 323
323 def _removeView(self, win): 324 def _removeView(self, win):
324 """ 325 """
325 Protected method to remove a view (i.e. window) 326 Protected method to remove a view (i.e. window).
326 327
327 @param win editor window to be removed 328 @param win editor window to be removed
328 """ 329 """
329 self.__inRemoveView = True 330 self.__inRemoveView = True
330 ind = self.editors.index(win) 331 ind = self.editors.index(win)
357 self.changeCaption.emit("") 358 self.changeCaption.emit("")
358 self.editorChangedEd.emit(aw) 359 self.editorChangedEd.emit(aw)
359 360
360 def _addView(self, win, fn=None, noName=""): 361 def _addView(self, win, fn=None, noName=""):
361 """ 362 """
362 Protected method to add a view (i.e. window) 363 Protected method to add a view (i.e. window).
363 364
364 @param win editor assembly to be added 365 @param win editor assembly to be added
365 @param fn filename of this editor (string) 366 @param fn filename of this editor (string)
366 @param noName name to be used for an unnamed editor (string) 367 @param noName name to be used for an unnamed editor (string)
367 """ 368 """
420 if fn: 421 if fn:
421 self.editorLineChanged.emit(fn, lineno + 1) 422 self.editorLineChanged.emit(fn, lineno + 1)
422 423
423 def _showView(self, win, fn=None): 424 def _showView(self, win, fn=None):
424 """ 425 """
425 Protected method to show a view (i.e. window) 426 Protected method to show a view (i.e. window).
426 427
427 @param win editor assembly to be shown 428 @param win editor assembly to be shown
428 @param fn filename of this editor (string) 429 @param fn filename of this editor (string)
429 """ 430 """
430 editor = win.getEditor() 431 editor = win.getEditor()

eric ide

mercurial