src/eric7/QScintilla/TypingCompleters/CompleterBase.py

branch
eric7
changeset 10431
64157aeb0312
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10430:e440aaf179ce 10431:64157aeb0312
21 21
22 def __init__(self, editor, parent=None): 22 def __init__(self, editor, parent=None):
23 """ 23 """
24 Constructor 24 Constructor
25 25
26 @param editor reference to the editor object (QScintilla.Editor) 26 @param editor reference to the editor object
27 @param parent reference to the parent object (QObject) 27 @type QScintilla.Editor
28 If parent is None, we set the editor as the parent. 28 @param parent reference to the parent object. If parent is None, we set
29 the editor as the parent.
30 @type QObject
29 """ 31 """
30 if parent is None: 32 if parent is None:
31 parent = editor 33 parent = editor
32 34
33 super().__init__(parent) 35 super().__init__(parent)
37 39
38 def setEnabled(self, enable): 40 def setEnabled(self, enable):
39 """ 41 """
40 Public slot to set the enabled state. 42 Public slot to set the enabled state.
41 43
42 @param enable flag indicating the new enabled state (boolean) 44 @param enable flag indicating the new enabled state
45 @type bool
43 """ 46 """
44 if enable: 47 if enable:
45 if not self.enabled: 48 if not self.enabled:
46 self.editor.SCN_CHARADDED.connect(self.charAdded) 49 self.editor.SCN_CHARADDED.connect(self.charAdded)
47 else: 50 else:
51 54
52 def isEnabled(self): 55 def isEnabled(self):
53 """ 56 """
54 Public method to get the enabled state. 57 Public method to get the enabled state.
55 58
56 @return enabled state (boolean) 59 @return enabled state
60 @rtype bool
57 """ 61 """
58 return self.enabled 62 return self.enabled
59 63
60 def charAdded(self, charNumber): 64 def charAdded(self, charNumber):
61 """ 65 """
65 specific behavior for the language. 69 specific behavior for the language.
66 70
67 Note 2: charNumber can be greater than 255 because the editor is 71 Note 2: charNumber can be greater than 255 because the editor is
68 in UTF-8 mode by default. 72 in UTF-8 mode by default.
69 73
70 @param charNumber value of the character entered (integer) 74 @param charNumber value of the character entered
75 @type int
71 """ 76 """
72 pass # just do nothing 77 pass # just do nothing
73 78
74 def readSettings(self): 79 def readSettings(self):
75 """ 80 """

eric ide

mercurial