Preferences/ConfigurationPages/EditorCalltipsPage.py

changeset 2230
2b1b9265156c
parent 1509
c0b5e693b0eb
child 2262
2371836c3c45
equal deleted inserted replaced
2229:78539385a8df 2230:2b1b9265156c
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the Editor Calltips configuration page. 7 Module implementing the Editor Calltips configuration page.
8 """ 8 """
9
10 from PyQt4.QtCore import pyqtSlot
11 9
12 from .ConfigurationPageBase import ConfigurationPageBase 10 from .ConfigurationPageBase import ConfigurationPageBase
13 from .Ui_EditorCalltipsPage import Ui_EditorCalltipsPage 11 from .Ui_EditorCalltipsPage import Ui_EditorCalltipsPage
14 12
15 import Preferences 13 import Preferences
31 self.ctEnabledCheckBox.setChecked( 29 self.ctEnabledCheckBox.setChecked(
32 Preferences.getEditor("CallTipsEnabled")) 30 Preferences.getEditor("CallTipsEnabled"))
33 31
34 self.ctVisibleSlider.setValue( 32 self.ctVisibleSlider.setValue(
35 Preferences.getEditor("CallTipsVisible")) 33 Preferences.getEditor("CallTipsVisible"))
36 self.callTipsBackgroundColour = \ 34 self.initColour("CallTipsBackground", self.calltipsBackgroundButton,
37 self.initColour("CallTipsBackground", self.calltipsBackgroundButton, 35 Preferences.getEditorColour)
38 Preferences.getEditorColour)
39 36
40 self.ctScintillaCheckBox.setChecked( 37 self.ctScintillaCheckBox.setChecked(
41 Preferences.getEditor("CallTipsScintillaOnFail")) 38 Preferences.getEditor("CallTipsScintillaOnFail"))
42 39
43 def save(self): 40 def save(self):
47 Preferences.setEditor("CallTipsEnabled", 44 Preferences.setEditor("CallTipsEnabled",
48 self.ctEnabledCheckBox.isChecked()) 45 self.ctEnabledCheckBox.isChecked())
49 46
50 Preferences.setEditor("CallTipsVisible", 47 Preferences.setEditor("CallTipsVisible",
51 self.ctVisibleSlider.value()) 48 self.ctVisibleSlider.value())
52 Preferences.setEditorColour("CallTipsBackground", self.callTipsBackgroundColour) 49 self.saveColours(Preferences.setEditorColour)
53 50
54 Preferences.setEditor("CallTipsScintillaOnFail", 51 Preferences.setEditor("CallTipsScintillaOnFail",
55 self.ctScintillaCheckBox.isChecked()) 52 self.ctScintillaCheckBox.isChecked())
56
57 @pyqtSlot()
58 def on_calltipsBackgroundButton_clicked(self):
59 """
60 Private slot to set the background colour for calltips.
61 """
62 self.callTipsBackgroundColour = \
63 self.selectColour(self.calltipsBackgroundButton,
64 self.callTipsBackgroundColour)
65 53
66 54
67 def create(dlg): 55 def create(dlg):
68 """ 56 """
69 Module function to create the configuration page. 57 Module function to create the configuration page.

eric ide

mercurial