Tools/TRSingleApplication.py

changeset 500
c3abc7895a01
parent 428
58405c24aa09
child 791
9ec2ac20e54e
--- a/Tools/TRSingleApplication.py	Thu Aug 12 10:11:06 2010 +0200
+++ b/Tools/TRSingleApplication.py	Thu Aug 12 16:11:13 2010 +0200
@@ -9,7 +9,7 @@
 
 import os
 
-from PyQt4.QtCore import SIGNAL
+from PyQt4.QtCore import pyqtSignal
 
 from Utilities.SingleApplication import SingleApplicationClient, SingleApplicationServer
 
@@ -28,9 +28,12 @@
     Class implementing the single application server embedded within the 
     Translations Previewer.
     
-    @signal loadForm(fname) emitted to load a form file
-    @signal loadTranslation(fname, first) emitted to load a translation file
+    @signal loadForm(str) emitted to load a form file
+    @signal loadTranslation(str, bool) emitted to load a translation file
     """
+    loadForm = pyqtSignal(str)
+    loadTranslation = pyqtSignal(str, bool)
+    
     def __init__(self, parent):
         """
         Constructor
@@ -63,7 +66,7 @@
         @param fnames filenames of the forms to be loaded (list of strings)
         """
         for fname in fnames:
-            self.emit(SIGNAL('loadForm'), fname)
+            self.loadForm.emit(fname)
         
     def __saLoadTranslation(self, fnames):
         """
@@ -73,7 +76,7 @@
         """
         first = True
         for fname in fnames:
-            self.emit(SIGNAL('loadTranslation'), fname, first)
+            self.loadTranslation.emit(fname, first)
             first = False
 
 class TRSingleApplicationClient(SingleApplicationClient):

eric ide

mercurial