13 from .Ui_EditorAutocompletionPage import Ui_EditorAutocompletionPage |
13 from .Ui_EditorAutocompletionPage import Ui_EditorAutocompletionPage |
14 |
14 |
15 import Preferences |
15 import Preferences |
16 |
16 |
17 |
17 |
18 # TODO: add spinbox for AutoCompletionCacheSize |
|
19 class EditorAutocompletionPage(ConfigurationPageBase, |
18 class EditorAutocompletionPage(ConfigurationPageBase, |
20 Ui_EditorAutocompletionPage): |
19 Ui_EditorAutocompletionPage): |
21 """ |
20 """ |
22 Class implementing the Editor Autocompletion configuration page. |
21 Class implementing the Editor Autocompletion configuration page. |
23 """ |
22 """ |
40 Preferences.getEditor("AutoCompletionReplaceWord")) |
39 Preferences.getEditor("AutoCompletionReplaceWord")) |
41 self.acThresholdSlider.setValue( |
40 self.acThresholdSlider.setValue( |
42 Preferences.getEditor("AutoCompletionThreshold")) |
41 Preferences.getEditor("AutoCompletionThreshold")) |
43 self.acTimeoutSpinBox.setValue( |
42 self.acTimeoutSpinBox.setValue( |
44 Preferences.getEditor("AutoCompletionTimeout")) |
43 Preferences.getEditor("AutoCompletionTimeout")) |
|
44 self.acCacheSizeSpinBox.setValue( |
|
45 Preferences.getEditor("AutoCompletionCacheSize")) |
45 |
46 |
46 def save(self): |
47 def save(self): |
47 """ |
48 """ |
48 Public slot to save the Editor Autocompletion configuration. |
49 Public slot to save the Editor Autocompletion configuration. |
49 """ |
50 """ |
64 "AutoCompletionThreshold", |
65 "AutoCompletionThreshold", |
65 self.acThresholdSlider.value()) |
66 self.acThresholdSlider.value()) |
66 Preferences.setEditor( |
67 Preferences.setEditor( |
67 "AutoCompletionTimeout", |
68 "AutoCompletionTimeout", |
68 self.acTimeoutSpinBox.value()) |
69 self.acTimeoutSpinBox.value()) |
|
70 Preferences.setEditor( |
|
71 "AutoCompletionCacheSize", |
|
72 self.acCacheSizeSpinBox.value()) |
69 |
73 |
70 |
74 |
71 def create(dlg): |
75 def create(dlg): |
72 """ |
76 """ |
73 Module function to create the configuration page. |
77 Module function to create the configuration page. |