--- a/AssistantEric/ConfigurationPages/CallTipsEricPage.py Thu Dec 30 11:32:05 2021 +0100 +++ b/AssistantEric/ConfigurationPages/CallTipsEricPage.py Wed Sep 21 16:59:53 2022 +0200 @@ -7,9 +7,7 @@ Module implementing the Eric Calltips configuration page. """ -from Preferences.ConfigurationPages.ConfigurationPageBase import ( - ConfigurationPageBase -) +from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase from .Ui_CallTipsEricPage import Ui_CallTipsEricPage @@ -17,36 +15,40 @@ """ Class implementing the Eric Calltips configuration page. """ + def __init__(self, plugin): """ Constructor - + @param plugin reference to the plugin object """ ConfigurationPageBase.__init__(self) self.setupUi(self) self.setObjectName("CallTipsEricPage") - + self.__plugin = plugin - + # set initial values self.calltipsCheckBox.setChecked( - self.__plugin.getPreferences("CalltipsEnabled")) + self.__plugin.getPreferences("CalltipsEnabled") + ) self.ctContextCheckBox.setChecked( - self.__plugin.getPreferences("CallTipsContextShown")) + self.__plugin.getPreferences("CallTipsContextShown") + ) self.hierarchyCheckBox.setChecked( - self.__plugin.getPreferences("CallTipsFollowHierarchy")) - + self.__plugin.getPreferences("CallTipsFollowHierarchy") + ) + def save(self): """ Public slot to save the Eric Calltips configuration. """ self.__plugin.setPreferences( - "CalltipsEnabled", - self.calltipsCheckBox.isChecked()) + "CalltipsEnabled", self.calltipsCheckBox.isChecked() + ) self.__plugin.setPreferences( - "CallTipsContextShown", - self.ctContextCheckBox.isChecked()) + "CallTipsContextShown", self.ctContextCheckBox.isChecked() + ) self.__plugin.setPreferences( - "CallTipsFollowHierarchy", - self.hierarchyCheckBox.isChecked()) + "CallTipsFollowHierarchy", self.hierarchyCheckBox.isChecked() + )