Preferences/ConfigurationPages/EditorAutocompletionPage.py

branch
maintenance
changeset 5948
6f958d5765f4
parent 5389
9b1c800daff3
child 5949
22657f04f332
equal deleted inserted replaced
5937:cc296ba99a3f 5948:6f958d5765f4
27 super(EditorAutocompletionPage, self).__init__() 27 super(EditorAutocompletionPage, self).__init__()
28 self.setupUi(self) 28 self.setupUi(self)
29 self.setObjectName("EditorAutocompletionPage") 29 self.setObjectName("EditorAutocompletionPage")
30 30
31 # set initial values 31 # set initial values
32 self.acEnabledCheckBox.setChecked( 32 self.acEnabledGroupBox.setChecked(
33 Preferences.getEditor("AutoCompletionEnabled")) 33 Preferences.getEditor("AutoCompletionEnabled"))
34 self.acCaseSensitivityCheckBox.setChecked( 34 self.acCaseSensitivityCheckBox.setChecked(
35 Preferences.getEditor("AutoCompletionCaseSensitivity")) 35 Preferences.getEditor("AutoCompletionCaseSensitivity"))
36 self.acReversedCheckBox.setChecked(
37 Preferences.getEditor("AutoCompletionReversedList"))
36 self.acReplaceWordCheckBox.setChecked( 38 self.acReplaceWordCheckBox.setChecked(
37 Preferences.getEditor("AutoCompletionReplaceWord")) 39 Preferences.getEditor("AutoCompletionReplaceWord"))
38 self.acThresholdSlider.setValue( 40 self.acThresholdSlider.setValue(
39 Preferences.getEditor("AutoCompletionThreshold")) 41 Preferences.getEditor("AutoCompletionThreshold"))
40 self.acScintillaCheckBox.setChecked( 42 self.acScintillaCheckBox.setChecked(
41 Preferences.getEditor("AutoCompletionScintillaOnFail")) 43 Preferences.getEditor("AutoCompletionScintillaOnFail"))
44 self.acTimeoutSpinBox.setValue(
45 Preferences.getEditor("AutoCompletionTimeout"))
46 self.acCacheSizeSpinBox.setValue(
47 Preferences.getEditor("AutoCompletionCacheSize"))
48 self.acCacheTimeSpinBox.setValue(
49 Preferences.getEditor("AutoCompletionCacheTime"))
50 self.acWatchdogDoubleSpinBox.setValue(
51 Preferences.getEditor("AutoCompletionWatchdogTime") / 1000.0)
42 52
43 def save(self): 53 def save(self):
44 """ 54 """
45 Public slot to save the Editor Autocompletion configuration. 55 Public slot to save the Editor Autocompletion configuration.
46 """ 56 """
47 Preferences.setEditor( 57 Preferences.setEditor(
48 "AutoCompletionEnabled", 58 "AutoCompletionEnabled",
49 self.acEnabledCheckBox.isChecked()) 59 self.acEnabledGroupBox.isChecked())
50 Preferences.setEditor( 60 Preferences.setEditor(
51 "AutoCompletionCaseSensitivity", 61 "AutoCompletionCaseSensitivity",
52 self.acCaseSensitivityCheckBox.isChecked()) 62 self.acCaseSensitivityCheckBox.isChecked())
63
64 Preferences.setEditor(
65 "AutoCompletionReversedList",
66 self.acReversedCheckBox.isChecked())
53 Preferences.setEditor( 67 Preferences.setEditor(
54 "AutoCompletionReplaceWord", 68 "AutoCompletionReplaceWord",
55 self.acReplaceWordCheckBox.isChecked()) 69 self.acReplaceWordCheckBox.isChecked())
56 Preferences.setEditor( 70 Preferences.setEditor(
57 "AutoCompletionThreshold", 71 "AutoCompletionThreshold",
58 self.acThresholdSlider.value()) 72 self.acThresholdSlider.value())
59 Preferences.setEditor( 73 Preferences.setEditor(
60 "AutoCompletionScintillaOnFail", 74 "AutoCompletionScintillaOnFail",
61 self.acScintillaCheckBox.isChecked()) 75 self.acScintillaCheckBox.isChecked())
76 Preferences.setEditor(
77 "AutoCompletionTimeout",
78 self.acTimeoutSpinBox.value())
79 Preferences.setEditor(
80 "AutoCompletionCacheSize",
81 self.acCacheSizeSpinBox.value())
82 Preferences.setEditor(
83 "AutoCompletionCacheTime",
84 self.acCacheTimeSpinBox.value())
85 Preferences.setEditor(
86 "AutoCompletionWatchdogTime",
87 self.acWatchdogDoubleSpinBox.value() * 1000)
62 88
63 89
64 def create(dlg): 90 def create(dlg):
65 """ 91 """
66 Module function to create the configuration page. 92 Module function to create the configuration page.

eric ide

mercurial