40 @signal trpreview(string list) emitted to preview translations in the |
40 @signal trpreview(string list) emitted to preview translations in the |
41 translations previewer |
41 translations previewer |
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) |
|
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 |
559 if itm.fileExt() == '.ts': |
561 if itm.fileExt() == '.ts': |
560 self.emit(SIGNAL('linguistFile'), itm.fileName()) |
562 self.emit(SIGNAL('linguistFile'), itm.fileName()) |
561 else: |
563 else: |
562 self.emit(SIGNAL('trpreview'), [itm.fileName()]) |
564 self.emit(SIGNAL('trpreview'), [itm.fileName()]) |
563 else: |
565 else: |
564 self.emit(SIGNAL('sourceFile'), itm.fileName()) |
566 self.sourceFile.emit(itm.fileName()) |
565 |
567 |
566 def __openFileInEditor(self): |
568 def __openFileInEditor(self): |
567 """ |
569 """ |
568 Private slot to handle the Open in Editor menu action. |
570 Private slot to handle the Open in Editor menu action. |
569 """ |
571 """ |
570 itmList = self.getSelectedItems() |
572 itmList = self.getSelectedItems() |
571 for itm in itmList[:]: |
573 for itm in itmList[:]: |
572 self.emit(SIGNAL('sourceFile'), itm.fileName()) |
574 self.sourceFile.emit(itm.fileName()) |
573 |
575 |
574 def __removeLanguageFile(self): |
576 def __removeLanguageFile(self): |
575 """ |
577 """ |
576 Private method to remove a translation from the project. |
578 Private method to remove a translation from the project. |
577 """ |
579 """ |