Preferences/ShortcutDialog.py

changeset 500
c3abc7895a01
parent 464
a2b1d1770ef0
child 791
9ec2ac20e54e
--- a/Preferences/ShortcutDialog.py	Thu Aug 12 10:11:06 2010 +0200
+++ b/Preferences/ShortcutDialog.py	Thu Aug 12 16:11:13 2010 +0200
@@ -16,9 +16,11 @@
     """
     Class implementing a dialog for the configuration of a keyboard shortcut.
     
-    @signal shortcutChanged(QKeySequence, QKeySequence, bool, objectType) emitted 
+    @signal shortcutChanged(QKeySequence, QKeySequence, bool, string) emitted 
         after the OK button was pressed
     """
+    shortcutChanged = pyqtSignal(QKeySequence, QKeySequence, bool, str)
+    
     def __init__(self, parent = None, name = None, modal = False):
         """
         Constructor
@@ -36,7 +38,7 @@
         self.keyIndex = 0
         self.keys = [0, 0, 0, 0]
         self.noCheck = False
-        self.objectType = None
+        self.objectType = ""
         
         self.primaryClearButton.clicked[()].connect(self.__clear)
         self.alternateClearButton.clicked[()].connect(self.__clear)
@@ -75,7 +77,7 @@
         Private slot to handle the OK button press.
         """
         self.hide()
-        self.emit(SIGNAL('shortcutChanged'), 
+        self.shortcutChanged.emit(
                   QKeySequence(self.keyLabel.text()),
                   QKeySequence(self.alternateKeyLabel.text()), 
                   self.noCheck, self.objectType)
@@ -166,4 +168,4 @@
                 self.keys[2]).toString())
         elif self.keyIndex == 4:
             self.__setKeyLabelText(QKeySequence(self.keys[0], self.keys[1],
-                self.keys[2], self.keys[3]).toString())
\ No newline at end of file
+                self.keys[2], self.keys[3]).toString())

eric ide

mercurial