Plugins/ViewManagerPlugins/Tabview/Tabview.py

changeset 3591
2f2a4a76dd22
parent 3484
645c12de6b0c
child 3621
15f23ed3f216
equal deleted inserted replaced
3590:5280e37405b8 3591:2f2a4a76dd22
341 else: 341 else:
342 self.indicator.setColor(QColor("red")) 342 self.indicator.setColor(QColor("red"))
343 343
344 def addTab(self, assembly, title): 344 def addTab(self, assembly, title):
345 """ 345 """
346 Overwritten method to add a new tab. 346 Public method to add a new tab.
347 347
348 @param assembly editor assembly object to be added 348 @param assembly editor assembly object to be added
349 (QScintilla.EditorAssembly.EditorAssembly) 349 (QScintilla.EditorAssembly.EditorAssembly)
350 @param title title for the new tab (string) 350 @param title title for the new tab (string)
351 """ 351 """
367 if emptyIndex > -1: 367 if emptyIndex > -1:
368 self.removeTab(emptyIndex) 368 self.removeTab(emptyIndex)
369 369
370 def insertWidget(self, index, assembly, title): 370 def insertWidget(self, index, assembly, title):
371 """ 371 """
372 Overwritten method to insert a new tab. 372 Public method to insert a new tab.
373 373
374 @param index index position for the new tab (integer) 374 @param index index position for the new tab (integer)
375 @param assembly editor assembly object to be added 375 @param assembly editor assembly object to be added
376 (QScintilla.EditorAssembly.EditorAssembly) 376 (QScintilla.EditorAssembly.EditorAssembly)
377 @param title title for the new tab (string) 377 @param title title for the new tab (string)
524 self.vm.insertView(assembly, self, targetIndex, 524 self.vm.insertView(assembly, self, targetIndex,
525 editor.getFileName(), editor.getNoName()) 525 editor.getFileName(), editor.getNoName())
526 526
527 def currentWidget(self): 527 def currentWidget(self):
528 """ 528 """
529 Overridden method to return a reference to the current page. 529 Public method to return a reference to the current page.
530 530
531 @return reference to the current page (Editor) 531 @return reference to the current page (Editor)
532 """ 532 """
533 if not self.editors: 533 if not self.editors:
534 return None 534 return None
887 self.changeCaption.emit("") 887 self.changeCaption.emit("")
888 self.editorChangedEd.emit(editor) 888 self.editorChangedEd.emit(editor)
889 889
890 def insertView(self, win, tabWidget, index, fn=None, noName=""): 890 def insertView(self, win, tabWidget, index, fn=None, noName=""):
891 """ 891 """
892 Protected method to add a view (i.e. window). 892 Public method to add a view (i.e. window).
893 893
894 @param win editor assembly to be inserted 894 @param win editor assembly to be inserted
895 @param tabWidget reference to the tab widget to insert the editor into 895 @param tabWidget reference to the tab widget to insert the editor into
896 (TabWidget) 896 (TabWidget)
897 @param index index position to insert at (integer) 897 @param index index position to insert at (integer)

eric ide

mercurial