Preferences/ShortcutDialog.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1112
8a7d1b9d18db
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
10 from PyQt4.QtCore import * 10 from PyQt4.QtCore import *
11 from PyQt4.QtGui import * 11 from PyQt4.QtGui import *
12 12
13 from .Ui_ShortcutDialog import Ui_ShortcutDialog 13 from .Ui_ShortcutDialog import Ui_ShortcutDialog
14 14
15
15 class ShortcutDialog(QDialog, Ui_ShortcutDialog): 16 class ShortcutDialog(QDialog, Ui_ShortcutDialog):
16 """ 17 """
17 Class implementing a dialog for the configuration of a keyboard shortcut. 18 Class implementing a dialog for the configuration of a keyboard shortcut.
18 19
19 @signal shortcutChanged(QKeySequence, QKeySequence, bool, string) emitted 20 @signal shortcutChanged(QKeySequence, QKeySequence, bool, string) emitted
20 after the OK button was pressed 21 after the OK button was pressed
21 """ 22 """
22 shortcutChanged = pyqtSignal(QKeySequence, QKeySequence, bool, str) 23 shortcutChanged = pyqtSignal(QKeySequence, QKeySequence, bool, str)
23 24
24 def __init__(self, parent = None, name = None, modal = False): 25 def __init__(self, parent=None, name=None, modal=False):
25 """ 26 """
26 Constructor 27 Constructor
27 28
28 @param parent The parent widget of this dialog. (QWidget) 29 @param parent The parent widget of this dialog. (QWidget)
29 @param name The name of this dialog. (string) 30 @param name The name of this dialog. (string)
77 Private slot to handle the OK button press. 78 Private slot to handle the OK button press.
78 """ 79 """
79 self.hide() 80 self.hide()
80 self.shortcutChanged.emit( 81 self.shortcutChanged.emit(
81 QKeySequence(self.keyLabel.text()), 82 QKeySequence(self.keyLabel.text()),
82 QKeySequence(self.alternateKeyLabel.text()), 83 QKeySequence(self.alternateKeyLabel.text()),
83 self.noCheck, self.objectType) 84 self.noCheck, self.objectType)
84 85
85 def __clear(self): 86 def __clear(self):
86 """ 87 """
87 Private slot to handle the Clear button press. 88 Private slot to handle the Clear button press.

eric ide

mercurial