69 line (str, int) |
69 line (str, int) |
70 @signal sourceFile(filename, lineno, type) emitted to open a Python file |
70 @signal sourceFile(filename, lineno, type) emitted to open a Python file |
71 at a line giving an explicit file type (str, int, str) |
71 at a line giving an explicit file type (str, int, str) |
72 @signal sourceFile(filename, linenos) emitted to open a Python file giving |
72 @signal sourceFile(filename, linenos) emitted to open a Python file giving |
73 a list of lines(str, list) |
73 a list of lines(str, list) |
|
74 @signal sourceFile(filename, lineno, col_offset) emitted to open a Python file at a |
|
75 line and column (str, int, int) |
74 @signal designerFile(filename) emitted to open a Qt-Designer file (str) |
76 @signal designerFile(filename) emitted to open a Qt-Designer file (str) |
75 @signal linguistFile(filename) emitted to open a Qt-Linguist (*.ts) |
77 @signal linguistFile(filename) emitted to open a Qt-Linguist (*.ts) |
76 file (str) |
78 file (str) |
77 @signal trpreview(filenames) emitted to preview Qt-Linguist (*.qm) |
79 @signal trpreview(filenames) emitted to preview Qt-Linguist (*.qm) |
78 files (list of str) |
80 files (list of str) |
90 @signal testFile(filename) emitted to open a Python file for a |
92 @signal testFile(filename) emitted to open a Python file for a |
91 unit test (str) |
93 unit test (str) |
92 @signal pdfFile(filename) emitted to open a PDF file (str) |
94 @signal pdfFile(filename) emitted to open a PDF file (str) |
93 """ |
95 """ |
94 |
96 |
95 sourceFile = pyqtSignal((str,), (str, int), (str, list), (str, int, str)) |
97 sourceFile = pyqtSignal( |
|
98 (str,), (str, int), (str, int, int), (str, list), (str, int, str) |
|
99 ) |
96 designerFile = pyqtSignal(str) |
100 designerFile = pyqtSignal(str) |
97 linguistFile = pyqtSignal(str) |
101 linguistFile = pyqtSignal(str) |
98 trpreview = pyqtSignal((list,), (list, bool)) |
102 trpreview = pyqtSignal((list,), (list, bool)) |
99 projectFile = pyqtSignal(str) |
103 projectFile = pyqtSignal(str) |
100 multiProjectFile = pyqtSignal(str) |
104 multiProjectFile = pyqtSignal(str) |
571 if MimeTypes.isTextFile(itm.fileName()): |
575 if MimeTypes.isTextFile(itm.fileName()): |
572 self.sourceFile[str].emit(itm.fileName()) |
576 self.sourceFile[str].emit(itm.fileName()) |
573 else: |
577 else: |
574 QDesktopServices.openUrl(QUrl(itm.fileName())) |
578 QDesktopServices.openUrl(QUrl(itm.fileName())) |
575 elif isinstance(itm, BrowserClassItem): |
579 elif isinstance(itm, BrowserClassItem): |
576 self.sourceFile[str, int].emit( |
580 self.sourceFile[str, int, int].emit( |
577 itm.fileName(), itm.classObject().lineno |
581 itm.fileName(), itm.lineno(), itm.colOffset() |
578 ) |
582 ) |
579 elif isinstance(itm, BrowserMethodItem): |
583 elif isinstance(itm, BrowserMethodItem): |
580 self.sourceFile[str, int].emit( |
584 self.sourceFile[str, int, int].emit( |
581 itm.fileName(), itm.functionObject().lineno |
585 itm.fileName(), itm.lineno(), itm.colOffset() |
582 ) |
586 ) |
583 elif isinstance(itm, BrowserClassAttributeItem): |
587 elif isinstance(itm, BrowserClassAttributeItem): |
584 self.sourceFile[str, int].emit( |
588 self.sourceFile[str, int, int].emit( |
585 itm.fileName(), itm.attributeObject().lineno |
589 itm.fileName(), itm.lineno(), itm.colOffset() |
586 ) |
590 ) |
587 elif isinstance(itm, BrowserImportItem): |
591 elif isinstance(itm, BrowserImportItem): |
588 self.sourceFile[str, list].emit(itm.fileName(), itm.linenos()) |
592 self.sourceFile[str, list].emit(itm.fileName(), itm.linenos()) |
589 self._activating = False |
593 self._activating = False |
590 |
594 |