40 @signal closeSourceWindow(string) emitted after a file has been removed/deleted |
40 @signal closeSourceWindow(string) emitted after a file has been removed/deleted |
41 from the project |
41 from the project |
42 @signal showMenu(string, QMenu) emitted when a menu is about to be shown. The name |
42 @signal showMenu(string, QMenu) emitted when a menu is about to be shown. The name |
43 of the menu and a reference to the menu are given. |
43 of the menu and a reference to the menu are given. |
44 """ |
44 """ |
|
45 sourceFile = pyqtSignal((str, ), (str, int), (str, int, str)) |
|
46 |
45 def __init__(self, project, parent = None): |
47 def __init__(self, project, parent = None): |
46 """ |
48 """ |
47 Constructor |
49 Constructor |
48 |
50 |
49 @param project reference to the project object |
51 @param project reference to the project object |
519 BrowserClassAttributeItem]) |
521 BrowserClassAttributeItem]) |
520 |
522 |
521 for itm in itmList: |
523 for itm in itmList: |
522 if isinstance(itm, BrowserFileItem): |
524 if isinstance(itm, BrowserFileItem): |
523 if itm.isPythonFile(): |
525 if itm.isPythonFile(): |
524 self.emit(SIGNAL('sourceFile'), itm.fileName(), 1, "Python") |
526 self.sourceFile[str, int, str].emit(itm.fileName(), 1, "Python") |
|
527 elif itm.isPython3File(): |
|
528 self.sourceFile[str, int, str].emit(itm.fileName(), 1, "Python3") |
525 elif itm.isRubyFile(): |
529 elif itm.isRubyFile(): |
526 self.emit(SIGNAL('sourceFile'), itm.fileName(), 1, "Ruby") |
530 self.sourceFile[str, int, str].emit(itm.fileName(), 1, "Ruby") |
527 elif itm.isDFile(): |
531 elif itm.isDFile(): |
528 self.emit(SIGNAL('sourceFile'), itm.fileName(), 1, "D") |
532 self.sourceFile[str, int, str].emit(itm.fileName(), 1, "D") |
529 else: |
533 else: |
530 self.emit(SIGNAL('sourceFile'), itm.fileName()) |
534 self.sourceFile[str].emit(itm.fileName()) |
531 elif isinstance(itm, BrowserClassItem): |
535 elif isinstance(itm, BrowserClassItem): |
532 self.emit(SIGNAL('sourceFile'), itm.fileName(), |
536 self.sourceFile[str, int].emit(itm.fileName(), itm.classObject().lineno) |
533 itm.classObject().lineno) |
|
534 elif isinstance(itm,BrowserMethodItem): |
537 elif isinstance(itm,BrowserMethodItem): |
535 self.emit(SIGNAL('sourceFile'), itm.fileName(), |
538 self.sourceFile[str, int].emit( |
536 itm.functionObject().lineno) |
539 itm.fileName(), itm.functionObject().lineno) |
537 elif isinstance(itm, BrowserClassAttributeItem): |
540 elif isinstance(itm, BrowserClassAttributeItem): |
538 self.emit(SIGNAL('sourceFile'), itm.fileName(), |
541 self.sourceFile[str, int].emit( |
539 itm.attributeObject().lineno) |
542 itm.fileName(), itm.attributeObject().lineno) |
540 |
543 |
541 def __addNewPackage(self): |
544 def __addNewPackage(self): |
542 """ |
545 """ |
543 Private method to add a new package to the project. |
546 Private method to add a new package to the project. |
544 """ |
547 """ |