11 |
11 |
12 from .ConfigurationPageBase import ConfigurationPageBase |
12 from .ConfigurationPageBase import ConfigurationPageBase |
13 from .Ui_EditorCalltipsPage import Ui_EditorCalltipsPage |
13 from .Ui_EditorCalltipsPage import Ui_EditorCalltipsPage |
14 |
14 |
15 import Preferences |
15 import Preferences |
|
16 |
16 |
17 |
17 class EditorCalltipsPage(ConfigurationPageBase, Ui_EditorCalltipsPage): |
18 class EditorCalltipsPage(ConfigurationPageBase, Ui_EditorCalltipsPage): |
18 """ |
19 """ |
19 Class implementing the Editor Calltips configuration page. |
20 Class implementing the Editor Calltips configuration page. |
20 """ |
21 """ |
31 Preferences.getEditor("CallTipsEnabled")) |
32 Preferences.getEditor("CallTipsEnabled")) |
32 |
33 |
33 self.ctVisibleSlider.setValue( |
34 self.ctVisibleSlider.setValue( |
34 Preferences.getEditor("CallTipsVisible")) |
35 Preferences.getEditor("CallTipsVisible")) |
35 self.callTipsBackgroundColour = \ |
36 self.callTipsBackgroundColour = \ |
36 self.initColour("CallTipsBackground", self.calltipsBackgroundButton, |
37 self.initColour("CallTipsBackground", self.calltipsBackgroundButton, |
37 Preferences.getEditorColour) |
38 Preferences.getEditorColour) |
38 |
39 |
39 self.ctScintillaCheckBox.setChecked( |
40 self.ctScintillaCheckBox.setChecked( |
40 Preferences.getEditor("CallTipsScintillaOnFail")) |
41 Preferences.getEditor("CallTipsScintillaOnFail")) |
41 |
42 |
48 |
49 |
49 Preferences.setEditor("CallTipsVisible", |
50 Preferences.setEditor("CallTipsVisible", |
50 self.ctVisibleSlider.value()) |
51 self.ctVisibleSlider.value()) |
51 Preferences.setEditorColour("CallTipsBackground", self.callTipsBackgroundColour) |
52 Preferences.setEditorColour("CallTipsBackground", self.callTipsBackgroundColour) |
52 |
53 |
53 Preferences.setEditor("CallTipsScintillaOnFail", |
54 Preferences.setEditor("CallTipsScintillaOnFail", |
54 self.ctScintillaCheckBox.isChecked()) |
55 self.ctScintillaCheckBox.isChecked()) |
55 |
56 |
56 @pyqtSlot() |
57 @pyqtSlot() |
57 def on_calltipsBackgroundButton_clicked(self): |
58 def on_calltipsBackgroundButton_clicked(self): |
58 """ |
59 """ |
59 Private slot to set the background colour for calltips. |
60 Private slot to set the background colour for calltips. |
60 """ |
61 """ |
61 self.callTipsBackgroundColour = \ |
62 self.callTipsBackgroundColour = \ |
62 self.selectColour(self.calltipsBackgroundButton, |
63 self.selectColour(self.calltipsBackgroundButton, |
63 self.callTipsBackgroundColour) |
64 self.callTipsBackgroundColour) |
|
65 |
64 |
66 |
65 def create(dlg): |
67 def create(dlg): |
66 """ |
68 """ |
67 Module function to create the configuration page. |
69 Module function to create the configuration page. |
68 |
70 |