RefactoringRope/ConfigurationPage/CallTipsRopePage.py

Wed, 21 Sep 2022 15:30:34 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 21 Sep 2022 15:30:34 +0200
branch
eric7
changeset 389
4f53795beff0
parent 374
958f34e97952
child 394
b34f5dd3db27
permissions
-rw-r--r--

Reformatted source code with 'Black'.

100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
374
958f34e97952 Updated copyright for 2022.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 347
diff changeset
3 # Copyright (c) 2008 - 2022 Detlev Offenbach <detlev@die-offenbachs.de>
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the Rope Calltips configuration page.
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
389
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
10 from Preferences.ConfigurationPages.ConfigurationPageBase import ConfigurationPageBase
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 from .Ui_CallTipsRopePage import Ui_CallTipsRopePage
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
118
d242ba11a04c Fixed a few code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 100
diff changeset
13
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 class CallTipsRopePage(ConfigurationPageBase, Ui_CallTipsRopePage):
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 """
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 Class implementing the Rope Calltips configuration page.
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
389
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
18
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 def __init__(self, plugin):
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 Constructor
389
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
22
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 @param plugin reference to the plugin object
205
55bba6be2cbc Corrected some source documentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 151
diff changeset
24 @type RefactoringRopePlugin
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 ConfigurationPageBase.__init__(self)
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 self.setupUi(self)
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 self.setObjectName("CallTipsRopePage")
389
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
29
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 self.__plugin = plugin
389
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
31
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 # set initial values
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 self.ropeCalltipsCheckBox.setChecked(
389
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
34 self.__plugin.getPreferences("CodeAssistCalltipsEnabled")
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
35 )
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.ctMaxfixesSpinBox.setValue(
389
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
37 self.__plugin.getPreferences("CalltipsMaxFixes")
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
38 )
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
39
100
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 def save(self):
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 """
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 Public slot to save the Rope Calltips configuration.
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 """
2bfe9e3fad8d Ported the code completion and calltips support of the eric4 variant of this plug-in.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 self.__plugin.setPreferences(
389
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
45 "CodeAssistCalltipsEnabled", self.ropeCalltipsCheckBox.isChecked()
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
46 )
4f53795beff0 Reformatted source code with 'Black'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 374
diff changeset
47 self.__plugin.setPreferences("CalltipsMaxFixes", self.ctMaxfixesSpinBox.value())

eric ide

mercurial